views:

243

answers:

1

Is there one? or should I just resort to using the good old manual html table + manual population from code behind?

Or is there a way to disable postback on gridView?

A: 

The GridView control does not "autopostback" as you mentioned in your question's title. Do you perhaps have controls in your gridview such as dropdown lists, checkbox, etc...? If you do then check their AutoPostBack property and if it is set to true, then set it to false if that is what you want and need.

The GridView control does not cause any postbacks by itself. As mentioned above, if you have sorting enabled in your GridView, that will also cause a postback, which you can "hide" by adding AJAX to your page.

A simple (not the most efficient) way to do this will be to add a ScriptManager control to your page to enable AJAX controls in it, then add an UpdatePanel control and move your GridView inside this UpdatePanel. This will make the PostBacks "invisible".

The preferred way to do the above will be using a leaner AJAX library such as JQuery.

Ricardo