Link to home
Start Free TrialLog in
Avatar of kahvedzic
kahvedzicFlag for Bosnia and Herzegovina

asked on

gridview rowdatabound event on button click

Hi,
I create gridview rowdatabound event for my gridview, it works on page load. Problem is when I use gridview bind on button click, rowdatabound is not called and code from this event is not working except on page load. How to make gridview rowdatabound work on every gridview bind?

Thanks people.
Avatar of Stephan
Stephan
Flag of Netherlands image

Strange, it should by working with this line:

Gridview1.DataBind();

(Gridview1 is the id of your gridview).
Avatar of sagir
sagir

should work. sometimes the debugger wont catch that (it's a bug). but put a Response.Write over there and see that it prints out on DataBound().
Avatar of kahvedzic

ASKER

It might be bug, but code that is in rowdatabound does not execute on button click. In rowdatabound I have code for hiding one gridview column. Column is invisible on page load, but on button click this column is visible.
Can you post the whole code please?
ASKER CERTIFIED SOLUTION
Avatar of kahvedzic
kahvedzic
Flag of Bosnia and Herzegovina image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial