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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
474,405
Messages
2,571,545
Members
48,797
Latest member
Fractal_Prime_357
Top