anmcgrath / BlazorDatasheet

Simple excel-like datasheet Blazor component
MIT License
163 stars 40 forks source link

Deploy on a new VS2022 Blazer Project #68

Closed raghina closed 4 months ago

raghina commented 4 months ago

Hi anmcgrath.. I´ve tried the demo, and a great component... I´ve also downloaded your BlazorDatasheet component package from this git repository into Visual Studio 2022 (with NET8.0), built only the server project (blazordatasheet.server), and also worked fine.. The same main page of the Demo was available. But now i´d like to create a entire new Blazer Project (NET8.0 and server rendering), to test the BlazorDatasheet component, but i got some issues: The same main demo page should be shown.. but only the external border with scroll bars was showed.. the functional part of the datasheet, no.. (the datasheet grid layout, headers, cells, lines, etc.. nothing.. totally blanked.. ). Please, could you give some help to fix this issue? to identify which point or config is necessary to work fine as the built of DataSheet.Server Project... (Could be something about the stylish definitions, and rendering?)

1) On this new project i´ve included/copied this projects/code from this git repository:

2) Included on app.razor file (from new Server Blazor Project) this aditional lines:

<script src="_content/BlazorDatasheet/blazor-datasheet.js" type="text/javascript"></script>

3) Include on my main Blazer Page file a tag for call/Reuse the main page from demo and server project (Index Page) :

In advance, thks for some orientation..

anmcgrath commented 4 months ago

Hi @raghina

Can you please check that you have done the following:

In Program.cs ensure you have

builder.Services.AddBlazorDatasheet();

In App.razor add

<link href="_content/BlazorDatasheet/sheet-styles.css" rel="stylesheet"/>

In your home page, add interactive server render mode to the shared pages index:

<BlazorDatasheet.SharedPages.Pages.Index @rendermode="InteractiveServer"/>

Although I would recommend using the BlazorDatasheet component directly rather than embedding the example page.

raghina commented 4 months ago

Hi anmcgrath, Thks for your return on this setup ajustments. Worked fine!!! And also saw your update on git main page, with same "guidelines".. Thank you...

But, Please.. I´d ask, is possible, for a aditional orientation/Tip on "CellChange" event handeling..

I´ve tried this below code, "forcing" the "onchange" on Datasheet tag definition, but got an error (of course.. wrong definition on code..)

-->New Razor Page code using BlazorDataSheet Component<-- (based from Index.razor Page on BlazorDataSheet.SharedPages.., with this modification trying CellChange Handeling) .....

...... private void HandleCellChange(CellValueChange e) { string sNewValue = e.NewValue.ToString();

   // *** DO SOMETHING!!!!  ****

   return;

} .......

anmcgrath commented 4 months ago

Hi @raghina the cell change event is on the Sheet that's associated with the datasheet, so you can check which cell(s) changes with

Sheet.Cells.CellsChanged += (sender, args) => { };

ADefWebserver commented 4 months ago

@anmcgrath - Can you close this issue?

raghina commented 4 months ago

Hi Anmcgrath, i´ve seen your Git reply email just now (travelling return just today.. reflecting few time on final tests and issue closing).. Thank you for the last orientation and sorry for some inconvenience on this issue closing delay.. (and again, a great work on this component.. )

Em sáb., 18 de mai. de 2024 às 17:18, anmcgrath @.***> escreveu:

Closed #68 https://github.com/anmcgrath/BlazorDatasheet/issues/68 as completed.

— Reply to this email directly, view it on GitHub https://github.com/anmcgrath/BlazorDatasheet/issues/68#event-12856901014, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZ4QWM7447QAF322EXSRZDZC6ZRDAVCNFSM6AAAAABHH3IV4OVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJSHA2TMOJQGEYDCNA . You are receiving this because you were mentioned.Message ID: @.***>