Hello there,
since I posted with the wrong account the last time, I ask again:
I need a master- and a detail-grid, something like this example: http://es.infragistics.com/community/forums/t/46501.aspx
So far, so easy, but I need the detail-grid to act like a sub-row, and not in the bottom of the master-grid.
Is this possible without a hierarchical datagrid, otherwise I have to redo everything =)
Kinda like this one: http://es.infragistics.com/products/aspnet/sample/hierarchical-data-grid/multi-column-headers
Thanks for your response
Müller Matthias
Hello Matthias,
I am sorry but this is not possible with WedDataGrid. The good news is that WebHierarchicalDataGrid is designed just for such a scenario and implementing it will not be hard. All you have to do is create your hierarchical datasource and give that to the grid.
Thanks,
Olga Kerchentseva
ASP.NET Principal Software Engineer
Infragistics, Inc.
Hello Olga,
sadly I cant just change the control.
The good news are, I dont need anything else to do while the subcontrol is shown.
My approach would be to add an empty row and set the second grid in this one.
What do you think? I know I can add an empty row with this code:
function addEmptyRow() { var grid = $find("<%=dgrIndRoleAttributes.ClientID%>"); // get a reference to the grid var values = new Array(grid.get_columns().get_length()); // create a new empty row grid.get_rows().add(values); // add the new row }
But this just adds it at the end, is there a possibility to add a empty row at a specified index?
Hi,
No, I am sorry there is no way to add a new row in the middle of the grid. The only way you can do that is by directly manipulating the HTML of the grid, but you do that then the grid will not work properly as you would be injecting foreign HTML in the middle of its rows. You may want to consider using the WebDialogWindow control and showing the sub-grid in the dialog, which you can position directly below the parent row.
Olga
I kinda came to the same conclusion. Is there a example how to do this with the webdialogwindow?
Hello Jason,
ah sorry I forgott to close it seems.
No we did this with some javascript stuff, not as good looking as with the hierarchical grid, but it works.
Regards
Matthias
Hello Müller,
Do you require any further assistance at this time?
WebDataGrid is not designed to show data in subgrids, WebHierarchicalDataGrid does implement this feature. If you don’t want to switch to WebHierarchicalDataGrid, then creating a subgrid inside WebDataGrid will involve a custom implementation.
Thanks
Ah thats what you meant.
Sadly the customer said explicit he doesnt want a popout. He wants it like a subgrid.
Seems like I have to sharp my js skills...
You can find examples of how to use WebDialogWindow here http://es.infragistics.com/products/aspnet/dialog-window