i386 Solutions
Skip Navigation LinksHome > Products > i386.UI ASP.net Controls > Picklist Example > Picklist Databinding Example
Picklist Examples
Left & Right Listbox with ability to move up and down items. Push items to and from each Listbox. The buttons can be configure also as images. Supports Master Pages and Data Binding too! Double Click support and move or copy items. Very configurable control.

In this example one side is Data bound to an XML data source. You can data bind it to whatever .NET supports. Also the move buttons and 'All' items buttons are not displayed.


Values Left:

Values Right:

Code ASPX

<cc1:PickList id="PickList1" runat="server" Height="267px" Width="591px" EnableLeftMoveButtons="False" EnableRightMoveButtons="False" EnableAllItemsButtons="False">
          <ItemsRight>
                <asp:ListItem>Mangos</asp:ListItem>
                <asp:ListItem>Pineapples</asp:ListItem>
                <asp:ListItem>Kweis</asp:ListItem>
         </ItemsRight>
</cc1:Picklist>

Code Behind
    protected string XmlDataFile = "DropDownDateTimeDataGrid.xml";
	    protected void Page_Load(object sender, EventArgs e)
	    {
	        if (!IsPostBack) Bind();
	    }
	    private void Bind()
	    {
	        DataSet DS = new DataSet();
	        string XMLFile = Server.MapPath(XmlDataFile);
	        DS.ReadXml(Server.MapPath(XmlDataFile));
	        PickList1.LeftListBox.DataSource = DS.Tables[0];
	        PickList1.LeftListBox.DataTextField = "title";
	        PickList1.LeftListBox.DataValueField = "ID";
	        PickList1.LeftListBox.DataBind();

	    }
	        
i386 Solutions
i386 Solutions i386 Solutions
i386 Solutions i386 Solutions i386 Solutions