Datagrid help needed...

  • Thread starter Raphaël Désalbres
  • 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
 
D

David Waz...

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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,079
Messages
2,570,574
Members
47,206
Latest member
Zenden

Latest Threads

Top