Question : how to disable gridview refresh on select row event

How can I disable refresh of gridview when clicking Select button.
Example:
Gridview loads on page load event, in first column I have select button and when I want to select first row, after clicking on select gridview is refreshing and changing color of that row. Problem is if I have a new row in Grid after clicking on button select it will select that new first row except one that I select.
What I want is to disable a refresh of gridview on button select click so I can select row that I want and refresh gridview manualy.

Answer : how to disable gridview refresh on select row event

It is not clear from your explanation that which control you are using for selection. but lets assume if you have a checkbox control then you can insert "onClientClick" attribute in design of the gridview and could write something like below:

OnClientClick = "javascript:return false;"

this additional attribute will prevent a page from refreshing itself. as we know the server controls by default create a postback to the page, the client side script will prevent it from doing so.

I hope this helps...
Random Solutions  
 
programming4us programming4us