Datagrid help needed...

  • Thread starter Thread starter Raphaël Désalbres
  • Start date Start date
R

Raphaël Désalbres

Hello, everyone,

I have built a datagrid, with update features. I have added a "Template",
and I added an option button on that template, with a OnCheckChanged="Massa"
...

I have added the following code:

Sub Massa(ByVal sender As System.Object, ByVal e As CommandEventArgs)

'Code...

End Sub


The problem is I have to know which of the option button has been clicked...
How can I do that?

Thanks,

Raphaël Désalbres
 
You need to bind an indicator of some type to the control.
For example, this is a "remove" button in my datagrid

<ASP:TEMPLATECOLUMN HEADERTEXT="">
<ITEMTEMPLATE>
<ASP:BUTTON ID="btnRemove" RUNAT="server"
ONCOMMAND="btnRemove_Command" COMMANDARGUMENT='<%#
DataBinder.Eval(Container.DataItem, "RefID") %>' TEXT="Remove" />
</ITEMTEMPLATE>
</ASP:TEMPLATECOLUMN>

Then I can get the CommandArgument parameter (my Record ID in this case) and
handle the event accordingly...
 
Back
Top