I have a search form inside UpdatePanel "A" that populates a result Gridview within "A" using datatable. When a "Select" is invoked in GridView row, the SelectedIndexChanged event is getting fired. The code works fine till
here. [One Issue found - The selectedindex is -1 and row count is zero
]
My requirement is to populate another UpdatePanel "B" contents with the row data (plus one large text field that's not shown in GridView - that I have to show in "B"). "B" also has other button actions.
"B" is not showing data even after calling "B.update()" method inside SelectedIndexChanged event handler.
Hi,
I think you want to bind large text field in UpdatePanel B after selecting gridview Row. You can only update data using update() function but you can not render any control inside it using it, Bcoz Page_Render event fires before it (Page Life Cycle) So B
is not showing any data inside it...
KcinMum
0 Points
3 Posts
Gridview SelectedIndexChanged event in UpdatePanel
Apr 24, 2012 05:16 AM|LINK
Hi,
I have a search form inside UpdatePanel "A" that populates a result Gridview within "A" using datatable. When a "Select" is invoked in GridView row, the SelectedIndexChanged event is getting fired. The code works fine till here. [One Issue found - The selectedindex is -1 and row count is zero
]
My requirement is to populate another UpdatePanel "B" contents with the row data (plus one large text field that's not shown in GridView - that I have to show in "B"). "B" also has other button actions. "B" is not showing data even after calling "B.update()" method inside SelectedIndexChanged event handler.
Please help
Regards,
CK
surajjoshi13
Member
11 Points
25 Posts
Re: Gridview SelectedIndexChanged event in UpdatePanel
Apr 24, 2012 07:56 AM|LINK
Hi,
I think you want to bind large text field in UpdatePanel B after selecting gridview Row. You can only update data using update() function but you can not render any control inside it using it, Bcoz Page_Render event fires before it (Page Life Cycle) So B is not showing any data inside it...
KcinMum
0 Points
3 Posts
Re: Gridview SelectedIndexChanged event in UpdatePanel
Apr 24, 2012 12:06 PM|LINK
Ok... Now I have another strange observation:
I'm even more confused now.
KcinMum
0 Points
3 Posts
Re: Gridview SelectedIndexChanged event in UpdatePanel
Apr 24, 2012 03:51 PM|LINK
Well - Found solution
Moved to SelectedIndexChanging event and added "Gridvw.SelectedIndex = e.NewSelectedIndex" as first line in the event handler
Works !