What about the uid? Change that to a template column
too? Or can I leave it as a databound column?
--- Karthick Kumar <[EMAIL PROTECTED]>
wrote:
> 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]
>
>
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/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/