Calling procedures from datagrid template column

OrdevePodyday

New Member
What I'm trying to do is display a column value in a datagrid column, if the user clicks the value, i want to show a dropdown list box in the same cell and allow the user to select a new value for that column. Right now i'm creating a template column, with a link button bound to the column value, and a dropdownlist box with the visibility set to false. i have set the onclick event of the link button to a public sub in my code behind page. then in the sub i planned to just set the visibility of the control to true, however i don't know how to get which row (index in the items arrray??) the click came from. my aspx code is something like this..<BR><asp:templatecolumn><BR><itemtemplate><BR><asp:linkbutton runat="server" id="cmdStatus" runaat="server" onclick="cmdStatus_Click" ><BR><%# DataBinder.eval(Container.DataItem,"status")%><BR></asp:linkbutton><BR><br /><BR><asp:dropdownlist id="selStatus" runat="server" visible="False"><BR><asp:listitem value=http://aspmessageboard.com/archive/index.php/"New" selected="True"/> <asp:listitem value="Closed" /> <BR></asp:dropdownlist> <BR></itemtemplate><BR><asp:templatecolumn><BR><BR>The cmdStatus_Click sub would then just set a visible property to true.<BR><BR>Any help with this, or a better way to do it would be great.<BR>Thanks
 
Back
Top