Hi, I'm trying to add a dropdown listbox into a column within the webdatagrid at run time.
I don't seem to be able to link the provider to the column.
Code:
' create ddl editor provider Dim provider1 As New Infragistics.Web.UI.GridControls.DropDownProvider provider1.ID = "DropdownlistProvider" provider1.EditorControl.Items.Add(New Infragistics.Web.UI.ListControls.DropDownItem("INVOICE")) provider1.EditorControl.Items.Add(New Infragistics.Web.UI.ListControls.DropDownItem("CREDIT"))
' assign provider to Invoice_Type column. Dim editor2 As New EditingColumnSetting(WebDataGrid1) editor2.ColumnKey = "Invoice_Type" editor2.EditorID = "WebDataGrid1_DropDownProvider1" ' works, this is setup in html!! editor2.EditorID = "DropdownlistProvider" ' doesn't work, setup in code above. WebDataGrid1.Behaviors.EditingCore.Behaviors.CellEditing.ColumnSettings.Add(editor2)
Thanks for the help,Graham.
Hi Graham,
It has been a while since your post, however in case you still need assistance I would be glad to help.
From what I see you need to use the following to assign the provider correctly:
editor2.EditorID = provider1.ID
You also need to add the provider to the grid's provider collection.
Please refer to the following article illustrating how a provider can be added to a WebDataGrid from the code-behind:
http://help.infragistics.com/NetAdvantage/ASPNET/2011.2/CLR4.0/?page=WebDataGrid_Using_Editor_Providers.html
Please let me know if you have any questions.
Best Regards,
Petar IvanovDeveloper Support EngineerInfragistics, Inc.http://ko.infragistics.com/support