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.ID; editing.ColumnSettings.Add(setting);
I must be missing something???
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?
Thank you from quick response.
Just the workflow should be enough, for example smth like:
// binding grid with sample code how you do it
// adding columns with sample code how you do it
// call method to configure behaviors
I will be able to create a sample following this scenario. If it reproduces the issue I will investigate it, if not I can send it to you to further modify it in order to reproduce the issue. It is also possible that I move this case out of the forum if you want to share something that is not suitable for the forum.
Please let me know how you wish to proceed with this.
will all values in the column default to a drop-down, if everything is to work as intended? Or, do I need to click/double-click on a value to place it in edit mode?
As a side note, the grid is located inside a webtab. I have other issues with the ability for the web grid to occupy 100% height of the actual web tag content and for the actual web tab to occupy 100% of the page, but that is a different CSS/style issue that I haven't been able to address, but will address it later.
Back on point, the webgrid ends up being data-bound once I click on an image button and on post-back, I add the columns dynamically within the click method and then bind the data. What options do I have for posting the files? Could I send them across to you? I can post the solution to this thread to close it off once we figure out the problem.