![]() |
|
|
|||||||
![]() |
ASP Net - How to edit in GridView using asp:BoundField-Urgent pls. reply asa |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Hi
I am using asp:BoundField code for my GridView Control. Something like: <asp:GridView ID="GridView2" runat="server" AutoGenerateEditButton="True" OnRowEditing="GridView2_RowEditing"> <Columns> ............................ ............................ <asp:BoundField HeaderText="Term Date" DataField="termdate"> <ControlStyle Width="100px" /> </asp:BoundField> .......................... .......................... </Columns> </asp:GridView> I need to edit this termdate. In the code-behind I am using the following code for editing.. In the code-behind I am using the following code to edit the termdate: protected void GridView2_RowUpdating(object sender, GridViewUpdateEventArgs e) { GridViewRow row = GridView2.SelectedRow; string enrollid = GridView2.Rows[e.RowIndex].Cells[4].Text.Trim(); updateEnrollRestriction(enrollid, GridView2.Rows[e.RowIndex].Cells[4].Text.Trim()); } Since my termdate column is converting to a editable textbox on Update-Click, I am getiing the erollid as an empty string ? Any ideas how I can make this work ? Appreciate any help! -- Thanks, SDRoy =?Utf-8?B?U0RSb3k=?= |
|
|
|
|
#2 |
|
Posts: n/a
|
Use e.NewValues["termdate"].
Vlad Iliescu |
|
![]() |
| Thread Tools | Search this Thread |
|
|