I have seen a number of posts about the ability to have a DropdownProvider in my web data grid, but can't seem to get it to show. This is how I have my web data grid defined are:
<ig:WebDataGrid ID="dgCompatibilityViewData" runat="server" Width="100%" StyleSetName="LucidDream" OnPreRender="dgCompatibilityViewData_PreRender"> <EditorProviders> <ig:DropDownProvider ID="ddlCompatibilityValues"> <EditorControl runat="server" ID="CompatibilityDropDown" ClientIDMode="Predictable" DropDownContainerMaxHeight="200px" EnableAnimations="False" EnableDropDownAsChild="False" DisplayMode="DropDownList" TextField="Compatibility"> <Items> <ig:DropDownItem Selected="False" Text="V" Value="V"> </ig:DropDownItem> <ig:DropDownItem Selected="False" Text="C" Value="C"> </ig:DropDownItem> <ig:DropDownItem Selected="False" Text="L" Value="L"> </ig:DropDownItem> <ig:DropDownItem Selected="False" Text="X" Value="X"> </ig:DropDownItem> <ig:DropDownItem Selected="False" Text="W" Value="W"> </ig:DropDownItem> <ig:DropDownItem Selected="False" Text="-" Value="-"> </ig:DropDownItem> </Items> <DropDownItemBinding ValueField="Compatibility" TextField="Compatibility" /> </EditorControl> </ig:DropDownProvider> </EditorProviders> <EmptyRowsTemplate> <div style="text-align: center"> <br /> <br /> <asp:Label runat="server" ID="emptyWgLAbel" Text="Select two sets of products to view compatibility info using the drop down menu's above."></asp:Label> </div> </EmptyRowsTemplate> </ig:WebDataGrid>
and based on a specified event, data is to be loaded dynamically, column data is also dynamic, so I generate the DataBoundColumns programmatically, and define the one column that should appear with drop-down options using this code:
//Compatibility Column BoundDataField compatibilityField = new BoundDataField(true); compatibilityField.Key = "Compatibility"; compatibilityField.Header.Text = productName; EditingCore core = new EditingCore(); core.Enabled = true; core.AutoCRUD = false; CellEditing editing = new CellEditing(); core.Behaviors.Add(editing);
EditingColumnSetting setting = new EditingColumnSetting(); setting.ColumnKey = "Compatibility"; setting.EditorID = dgCompatibilityViewData.EditorProviders[0].ID; editing.ColumnSettings.Add(setting);
dgCompatibilityViewData.Columns.Add(compatibilityField);dgCompatibilityViewData.Behaviors.Add(core);
I must be missing something???
Paul
Hi,
Thank you for posting in the Infragistics community !
Your code seems fine at first glance, but the order in which you define and columns and behaviors, create editors and data bind may be essential for the proper grid functioning. Please provide the whole code so that I can see that sequence. This will enable me to investigate the issue and suggest accordingly. Looking forward to hearing from you.
Unfortunately, there is a Intellectual Property issue preventing me from posting the entire code, well, at least at the public forum level and also, there is SQL data driving the grid now.
Is there a blog or sample that could show case the order? Do you need a functioning solution or you just need to look at the code?