Thursday, January 29, 2004

It's the little things in life!

Aaaaaaaaarrrrrrrrrrrrrrgggggggggggggg! Okay, so it's not as important as Ctrl-Alt-Del. But this one little feature means a lot to me. Why does it have to be so obscure?

The feature I want is ImageButtons for your DataGrid commands! You can have regular buttons, or text buttons, but NOT IMAGE BUTTONS! Umm... DUH! Wouldn't that make things easy? Well... I haven't looked into the classes, so maybe I'm asking for a lot, but boy... you'ld think somebody out there would write or post something warning me. 4 hours wasted!

How do you do it? Here's how:
<asp:TemplateColumn HeaderText="Remove">
  <asp:LinkButton id="lnkbutDelete" runat="server" Text="<img border=0 src='images/remove4.gif' alt=delete>" CommandName="Delete" CausesValidation="false"></asp:LinkButton>

Notice how it was slipped into the Text attribute? How convenient. There you go, my latest rant. Why do I have to feel so stupid all the time...

No comments: