5 Answers, 1 is accepted
0
Hello Forest,
Here is an example:
Regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Here is an example:
| protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e) |
| { |
| if (e.CommandName == RadGrid.ExpandCollapseCommandName) |
| { |
| //your code |
| } |
| } |
Regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Forest
Top achievements
Rank 1
answered on 17 Apr 2009, 05:41 PM
Thanks.
When the event fires, is the detailstable already databound or not yet?
What I'm trying to do is - after expanding the row - iterate through the rows of the details table (the second level fo the heirarchy) and put them in edit mode so the user can start editing right away instead of pressing an edit button.
Any suggestions ?
When the event fires, is the detailstable already databound or not yet?
What I'm trying to do is - after expanding the row - iterate through the rows of the details table (the second level fo the heirarchy) and put them in edit mode so the user can start editing right away instead of pressing an edit button.
Any suggestions ?
0
Princy
Top achievements
Rank 2
answered on 20 Apr 2009, 04:46 AM
Hello Forest,
You can try out the following code to achieve the required scenario:
c#:
Thanks
Princy.
You can try out the following code to achieve the required scenario:
c#:
| protected void RadGrid1_PreRender(object sender, EventArgs e) |
| { |
| foreach (GridDataItem dataItem in RadGrid1.MasterTableView.Items) |
| { |
| if (dataItem.Expanded) |
| { |
| GridTableView nestedView = (GridTableView)dataItem.ChildItem.NestedTableViews[0]; |
| foreach (GridDataItem item in nestedView.Items) |
| { |
| item.Edit = true; |
| } |
| nestedView.Rebind(); |
| } |
| } |
Thanks
Princy.
0
Forest
Top achievements
Rank 1
answered on 20 Apr 2009, 01:18 PM
I had to combine both of your solutions to get everything in edit mode. It works, but with one problem.
The child grids do not retain their values after I change them - if I collapse a panel, it rebinds back to the original data from the db. Anyway I can stop this and have the grid update the values for each cell. I don't see an UpdateCell method.
Thanks,
Forest
The child grids do not retain their values after I change them - if I collapse a panel, it rebinds back to the original data from the db. Anyway I can stop this and have the grid update the values for each cell. I don't see an UpdateCell method.
Thanks,
Forest
0
Hello Forest,
Could you provide a demo project which illustrate your approach? We could find an appropriate solution for you when we debug your code locally. You can attach the files to formal support ticket.
Kind regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Could you provide a demo project which illustrate your approach? We could find an appropriate solution for you when we debug your code locally. You can attach the files to formal support ticket.
Kind regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.