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

datagrid Edit, Update, Cancel Button Column

P: n/a
I created a c# web form.
I added a DataGrid1 to it.
I added the Edit, Update, Cancel Button Column.
I added two Bound columns.
All is well.

But when I run the app and press the edit button, the text
box widht is not dynamic. its fixed! So only a portion
of my text is shown.

Question: Is their a way to dynamically change the size
of the text box in the code behind.

note: I have looked at
DataGrid1_EditCommand(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)

And I tried to cast a textbox on the column of interest
but .net says invalid cast?

txt = (TextBox)(e.Item.Cells[2].Controls[0]);

Can anyone assist?



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.