Tuesday, September 29, 2009

Build a ButtonList (Ajax Control)

New PainControls are released. You can download it from:

http://cid-79833c0a838434be.skydrive.live.com/self.aspx/PainControls/PainControls%203.0.0.0929.rar

It contains the following Ajax Controls:

TimePicker
DropDown
DropPanel
Simple Schedule
ButtonList

About ButtonList:
Check the following image.


There are three item button you can select. It is like a DropDownList, but it's composted of several Button. You can select one of the items, and it will call SelectedIndexChanged event.

You can use this control by the following code.

<Pain:ButtonList runat="server" ID="ButtonList1" OnSelectedIndexChanged="ButtonList1_SelectedIndexChanged" >
<asp:ListItem>day</asp:ListItem>
<asp:ListItem>month</asp:ListItem>
<asp:ListItem>year</asp:ListItem>
</Pain:ButtonList>

No comments: