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
No Data
Reply
  • 20255
    Verified Answer
    Offline posted

    Hello EVEN CHEN,

    Thank you for contacting us.

    Please refer have a look at the forum thread below where a similar requirement have been discussed.

    http://es.infragistics.com/community/forums/t/60738.aspx

    If Peter's suggestion is not suitable for you, I have attached a small sample that is showing how to make a Multi-Column DropDownEditor provider to edit WebDataGrid cells. When item from the grid(the one nested in the DropDownprovider) is choosen all cells in the row that is being edited are taking new values, depending on the selection of the grid in the provider.

    If the sample do not fulfill your requirements, could you please send me isolated sample in order to show me the issue. This will be highly appreciated.

    WDGMultiColumnWDDEditorProvider.zip
Children