Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
220
DropdownProvider
posted

How to bind DropdownProvider data(List) by sever side?

By the way,i want to create a Multi-Column WebDropDown as DropdownProvider .


I bind data by OnItemsRequested event,but it didn't worked.



<EditorProviders>
<ig:DropDownProvider ID="ddlSOPActionCode" >
<EditorControl ID="WebDropDown1" TextField="SOPActionCode" Width="150px" ValueField="SOPActionCode" OnItemsRequested="WebDropDown1_ItemsRequested"
runat="server" >
<DropDownItemBinding TextField="SOPActionCode" ValueField="SOPActionCode"></DropDownItemBinding>
</EditorControl>
</ig:DropDownProvider>
</EditorProviders>
<Behaviors>
<ig:EditingCore BatchUpdating="true">
<EditingClientEvents CellValueChanging="uwgSOP_Editing_CellValueChanging" />
<Behaviors>
<ig:CellEditing Enabled="true">
<ColumnSettings>
<ig:EditingColumnSetting ColumnKey="SOPActionCode" EditorID="ddlSOPActionCode" />
</ColumnSettings>
<CellEditingClientEvents EnteringEditMode="uwgSOP_CellEditing_EnteringEditMode">
</CellEditingClientEvents>
<EditModeActions EnableOnKeyPress="True" MouseClick="Single" EnableOnActive="true" />
</ig:CellEditing>
<ig:RowDeleting Enabled="true" />
<ig:RowAdding Alignment="Top" EditModeActions-EnableOnActive="true" EditModeActions-MouseClick="Single"
Enabled="false">
<EditModeActions MouseClick="Single" EnableOnActive="True"></EditModeActions>
<AddNewRowClientEvents />
</ig:RowAdding>
</Behaviors>
</ig:EditingCore>
</Behaviors>



  protected void WebDropDown1_ItemsRequested(object sender, Infragistics.Web.UI.ListControls.DropDownItemsRequestedEventArgs e)
    {

        string value = e.Value.ToString();
        Infragistics.Web.UI.ListControls.WebDropDown wdd = sender as  Infragistics.Web.UI.ListControls.WebDropDown;
        wdd.CurrentValue = "Select a Product";

        //Set the drop-down container width
        wdd.DropDownContainerWidth = 500;
        //Create a new drop-do
        Infragistics.Web.UI.ListControls.DropDownItem productsItem = new Infragistics.Web.UI.ListControls.DropDownItem();
        //Set the text of the drop-down item
        productsItem.Text = "SOPActionCode";
        productsItem.Value = "SOPActionCode";
        //Add the drop-down item to the WebDropDown
        wdd.Items.Add(productsItem);

        //Creat a template with WebDataGrid
        wdd.ItemTemplate = new MultiColumnTemplate();



        MultiColumnTemplate obj = new MultiColumnTemplate();
        obj.InstantiateIn(wdd);
        wdd.ClientEvents.ValueChanging = "wddAction_ValueChanging";


    }


Parents Reply Children
No Data