I have a treeview in the lefthand side of my aspx page. When I clicked on any of the nodes, there will be a grid showing the details on the right hand side. There is an edit button also for each row for editing the details. Everything
is working perfectly fine.
The issue: if I clicked on the Edit link, Update and Cancel button will apppear in the Grid. And without performing any updating(means without doing any edit), if I clicked on the left hand side of any other node, corresponding details will appear in the Grid
without collapsing the row. if I code as below, update event itself is not firing.
if (GridView1.EditIndex >= 0)
GridViewEditIndex = -1;
Anybody have any idea why it is happening? How can make the row collapsible even though the Update and Cancel button in the Grid is open in GridRow? Please help. Please let me know if I need to provide more info.
Do you mean "row collapsible" is in edit mode in GridView? If so you can save the EditIndex in a Session or ViewState and in SelectedNodeChanged event of TreeView you can set the GridView to this EditIndex (Remember setting EditIndex should be before binding
GridView).
If my understanding is not correct, please describe in detail and show some source code and events.
Thankyou for your replies. What you haves said is perfectly right. The setting of the EditIndex should be done before binding the GridView. That's where I went wrong. I was actually setting after binding it. That' where the problem
meeram395
Member
5 Points
25 Posts
GridView Row not collapsing while clicking on any node on the treeview
Feb 23, 2009 04:07 PM|LINK
The issue: if I clicked on the Edit link, Update and Cancel button will apppear in the Grid. And without performing any updating(means without doing any edit), if I clicked on the left hand side of any other node, corresponding details will appear in the Grid without collapsing the row. if I code as below, update event itself is not firing.
if (GridView1.EditIndex >= 0)
GridViewEditIndex = -1;
Anybody have any idea why it is happening? How can make the row collapsible even though the Update and Cancel button in the Grid is open in GridRow? Please help. Please let me know if I need to provide more info.
Qin Dian Tan...
All-Star
113532 Points
12480 Posts
Microsoft
Re: GridView Row not collapsing while clicking on any node on the treeview
Feb 26, 2009 07:41 AM|LINK
Hi meeram395,
Do you mean "row collapsible" is in edit mode in GridView? If so you can save the EditIndex in a Session or ViewState and in SelectedNodeChanged event of TreeView you can set the GridView to this EditIndex (Remember setting EditIndex should be before binding GridView).
If my understanding is not correct, please describe in detail and show some source code and events.
Thanks,
If you have any feedback about my replies, please contactmsdnmg@microsoft.com.
Microsoft One Code Framework
meeram395
Member
5 Points
25 Posts
Re: GridView Row not collapsing while clicking on any node on the treeview
Feb 27, 2009 12:19 PM|LINK
Hi,
Thankyou for your replies. What you haves said is perfectly right. The setting of the EditIndex should be done before binding the GridView. That's where I went wrong. I was actually setting after binding it. That' where the problem
Issue is resolved and Thanks a lot for the same.