Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Datagrid Control (http://www.velocityreviews.com/forums/f60-asp-net-datagrid-control.html)
-   -   Edit on Template Column (http://www.velocityreviews.com/forums/t760800-edit-on-template-column.html)

randy 06-28-2004 02:49 PM

Edit on Template Column
 
I have a datagrid with a Edit, Update, Cancel column. I clicked the
"Convert this column into a Template Column" so I can mimic the below
example and put a link button in the footer template area.

http://www.dotnetbips.com/displayarticle.aspx?id=125

The problem is, I need to click "edit" twice for the Edit Template textboxes
to show (or refresh the page). I put my code in the DataGrid1_ItemCommand()
event like so...

If e.commandname.toupper = "EDIT" Then
datagrid.EditItemIndex = e.item.itemindex
End if

If I rebind the datagrid after setting the EditItemIndex property The edit
textboxes come up the first time but they are blank. There IS data in my
source.

If e.commandname.toupper = "EDIT" Then
datagrid.EditItemIndex = e.item.itemindex

datagrid1.datasource = datatable
datagrid1.databind
End if

I want to note that the rest of my columns are template columns so I can
have the "Add New" textboxes just like the example at that website.

Much thanks,

-Randy




All times are GMT. The time now is 02:27 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57