eramgarden Posted May 5, 2004 Posted May 5, 2004 I have a datagrid, I removed the "edit" button, and "edititemtemplate" because I wanted users to bypass "edit" and go directly to "update"/"cancel" buttons... I added a LinkButton for "update" ...Everything is fine so far.. Now, when the user clicks "Update", I want to get the datagrid's values and update BUT .. The linkButton does NOT have "e As DataGridCommandEventArg". It looks like this: Private Sub lbUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lbUpdate.Click So, I cant have, for example: dim sShort= CType(e.Item.FindControl("short_desc"), TextBox).Text I tried this : Dim SShort = dgIncid.FindControl("txtDesc") but i dont get the value... So, how can I get to the datagrid's columns if I'm using a LinkButton?? Quote
LostProgrammer Posted May 5, 2004 Posted May 5, 2004 Set the commandname property of the linkbutton to Update and then set the OnUpdateCommand event of the datagird to LB_Update(sender As Object, e As DatagridCommandEvent Args) or whatever. Then you will be able to use e.Item.FindControl("cntrlName") -lp Quote
eramgarden Posted May 6, 2004 Author Posted May 6, 2004 Not sure how your example works but you set my on the right path..i found this and it works: http://www.developerfusion.com/show/3801/3 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.