By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,900 Members | 1,301 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,900 IT Pros & Developers. It's quick & easy.

Advice on editable datagrid

P: n/a
Hi,

Could you help me to understand how datagrid works.
I'm trying to make a datagrid editable. Now most of the tutorials I read
says that i should turn the Enable ViewState off. Why is that?

If i turn this off then i need to support building the datagrid because
the datagrid is not persistant.
Right?

If i put the EnableViewState off then i don't get any call to:
protected override void LoadViewState(object savedState).
Right?

If i put EnableViewState on then i get calls to this function but if i
rebuild the datagrid in this function then is it still not recommended
to have EnableViewState?

If i don't have the EnableViewState and have an editable datagrid and in
the Page_Load function i have the recommended:
if (!Page.IsPostBack)
and in the if clause i have a function call to build the datagrid. Ok

If i click on the edit button in the datagrid then i will not get any
events to EditCommand because the IsPostBack is true and no datagrid was
built.
Right?

Please leave some comments/suggestions on this

Yours sincerely
Andla

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.