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
885
Dropdown Provider Issues
posted

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

Parents Reply Children
No Data