I use WebHierarchicalDataGrid, there are several bands (several levels of data).
For each band the RowEditingTemplate is specified.
I see that final page markup contains "rendered" template for each parent row. In other words, if a dropdown element is specified as template for child band, it will be rendered for each parent rows.
It is very insufficient, because the dropdown has a lot of values, and if my grid has a lot of rows, the size of page of will be excessively increased.
UltraWebGrid renders template only one time.
Maybe there is any option that forces to render template only once?
Thank you,
I've tried, it works.
Could you aslo say what event I should subscribe for to get changes on the server side, something like 'UpdateRowBatch' for UltraWebGrid.
And is there any client side method that can invoke postback,
I used to invoke postback using following method, but now I think it is obsolete
igtbl_doPostBack(gridName);
Alexander
HI Alexander,
There is no default behavior in the WDG or WHDG to have a button that adds a row. We only have the RowAdding behavior. You call grid.get_rows().add(valArray), where grid is a ContainerGrid object (not the WHDG object). This could be done on a button click. On Editing Core, you will need Batch Updating on. Batch Updating was added in 11.2. Then an empty row would be added to the grid without posting back right away. Then the user could enter edit mode on the new row to set the values. You could commit with another button somewhere.
regards,David Young
Hi, David!
Thank you for answer.
Could you explain me one else thing regarding WebHierarchicalDataGrid.
Using UltraWebGrid I've implemented following scenario:
User clicks on the button, the new row is added to the grid on the client side(not postbacks), actually it is empty row, and 'edit template' is opened for that newly added row.User enters values and clicks 'OK'. After that the postback is invoked.
Is it possible to do the same for WebHierarchicalDataGrid?
Could new row be added without postback?
for now the code below lead to immediate postback
grid.get_rows().add(new Array(1, 'text'));
Please explain, for now I am getting rid of old UltraWebGrid and there are a lot of things that I have to remake.
Hi AlexanderZh,
Currently, this is the expected behavior. It is because each child grid derives from the WebDataGrid, so has its own options, and thus sends down a template for itself. It would need to be fixed by us for this to work. I would submit a feature request.