Asp.Net 2013 Vol 1.
CLR 4.5
Situation:
WebHierarchicalDataGrid with datasource "well" defined.
I have Two tables
The first table contains an ID used by the second as a reference
(typically, the first table is the company and the second table is a site of the company and of course, the site table contains a CompanyID field).
Data are very well displayed.
Editing is allowed.
when I edited a row, everything works fine.
When I want to add a row, the CompanyID is not automatically set so there is an SQL error saying the field is empty. If a put the value of the CompanyID
in the field, the insert works fine.
So the question is simple : What do I have to do in order to make the filling of this field automatically ?
Thanks
Hi Nicolas,
I'm just following up to see if you need any further assistance with this issue. If so please do not hesitate to contact me.
Hello Nicolas,
I have made a sample that demonstrates this approach, make the filling of the ID field automatically. Handle the RowExpanded event of the WebDataGrid, get the value of the ID field and set it to the ID field cell of the nested grid:
If you have any further questions regarding this don't hesitate to contact me!