Hi,

 

It is because you are passing the same values for the two textboxes and you
are taking from the available datagrid  [ see in your code: Dim uname as
TextBox = e.Item.Cells(2).Controls(0) ] 

So better try the following:

 

1.    In your datagrid, instead of Databound, have it as template columns
like below:

 

(Replace the DataItem.std with your column, for example DataItem.Username
and id as DataItem.txtUsername etc.) 

 

** Note: You got to do this for all the columns which you want to edit **

 

<asp:TemplateColumn HeaderText="Standard Time">

<ItemTemplate>

<asp:Label runat="server" Text='<%# DataBinder.Eval(Container,
"DataItem.Std") %>'></asp:Label>

</ItemTemplate>

<EditItemTemplate>

<asp:TextBox runat="server" id="txtStd" Text='<%# DataBinder.Eval(Container,
"DataItem.Std") %>'></asp:TextBox>

</EditItemTemplate>

</asp:TemplateColumn>

 

2.    And then get the entered updated value in your code like this:

 

            Dim std As Integer = CType(e.Item.FindControl("txtStd"),
TextBox).Text

      

      So in your case, it could be like this:

 

            Dim uname as string = CType(e.Item.FindControl("txtUsername"),
textbox).text

 

Try this and this will certainly work !!.

 

Hth,

Karthick

 



[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to