Gridview and a button

T

ThisBytes5

I'm trying to get a button in the grid view, not the button that you
have as an option, but rather an actual button.

I've got it close to what I want, but not a 100%. I've used a template
field in teh grid and have the following in the grid view code in the
ASPX:

<asp:TemplateField HeaderText="Active">
<ItemStyle CssClass="ActiveCell" />
<ItemTemplate>
<input type='button' name='btnActive'
value='<%# GetActiveButtonText(Eval("Enabled")) %>'
class='<%#
GetActiveButtonClass(Eval("Enabled")) %>' onclick='<%#
GetActiveButtonClick(Eval("SubscriberId"), Eval("SubscriptionId"),
Eval("Enabled")) %>' />
</ItemTemplate>
</asp:TemplateField>


I can't get the input button to disable when I need it to, haven't
quite figured that part out.
Any ideas? Am I missing something obvious?

Thanks
Wayne
 

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

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top