Hi,
I am using the UltraWingrid, I have a wincombo as an editor inside the grid.
I don't have a problem when the Wincombo is selecting one value. If I implement multiple values as shown in
http://help.infragistics.com/NetAdvantage/WinForms/2011.2/CLR2.0/?page=WinCombo_Selecting_Multiple_Values_within_WinCombo.html
and I try to update I get the following error:
Unable to update the data value: Value in the editor is not valid
I have put a breakpoint on almost all the eventssuch as BeforeExitEditMode and afterExitEditMode and the values seems correct, the combination of all the selected values.
Please advise this seems an error in the grid since it accepts and update a single value correctly.
Jayson.
Hi Jayson,
What's the DataType of the grid column? It needs to be an object array.
Hi Mike,
Thanks for the reply, the datatype is a string, I am retrieving it from the database. I tried using an unbound column and setting its datatype to an object array, however I am not able to assign the column values to the value from the database.
Is there an example on how to implement the solution?
Thanks, Jayson.
I am checking about the progress of this issue. Please let me know If you need any further assistance on this.
Hi Boris,
I left this issue a while ago and now it is coming back to be one of the requirements. I have looked at the forms and I can't find an exact answer. I have also updated to the latest version 11.2.20112.2135 and I am getting the same issue.
You can build a sample so easy by adding a grid and an ultracomboeditor:
Enclosed please find the code, you can copy it and paste it:
Public Class Form1
Private MakeOrdersDataTable As DataTable
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'TEST_DBDataSet.Book1' table. You can move, or remove it, as needed. UltraComboEditor1.DataSource = MakeCustomerDataTable() UltraComboEditor1.CheckedListSettings.CheckBoxStyle = Infragistics.Win.CheckStyle.CheckBox UltraComboEditor1.CheckedListSettings.CheckBoxAlignment = ContentAlignment.MiddleRight UltraComboEditor1.CheckedListSettings.EditorValueSource = Infragistics.Win.EditorWithComboValueSource.CheckedItems UltraComboEditor1.CheckedListSettings.ListSeparator = ", " UltraComboEditor1.CheckedListSettings.ItemCheckArea = Infragistics.Win.ItemCheckArea.CheckBox
End Sub
Private Sub UltraButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UltraButton2.Click Dim dataSet As New DataSet() dataSet.Tables.Add(MakeCustomersDataTable) Me.UltraGrid1.DataSource = dataSet
Private Function MakeCustomersDataTable() As DataTable ' Declare a DataTable to contain the program generated data Dim dataTable As New DataTable("Customers")
Dim colWork As New DataColumn("CustomerID", GetType(Int32)) dataTable.Columns.Add(colWork)
' Add CustomerID column to key array and bind to DataTable Dim Keys(0) As DataColumn Keys(0) = colWork dataTable.PrimaryKey = Keys
' Create and add a CustomerName column colWork = New DataColumn("CustomerName", GetType(Object)) ' colWork.MaxLength = 50 dataTable.Columns.Add(colWork)
' Create and add a LastOrderDate column colWork = New DataColumn("LastOrderDate", GetType(Date)) dataTable.Columns.Add(colWork)
' Add a row Dim row As DataRow = dataTable.NewRow() row("CustomerID") = 1 row("CustomerName") = "John" row("LastOrderDate") = Now dataTable.Rows.Add(row)
' Add another row row = dataTable.NewRow() row("CustomerID") = 2 row("CustomerName") = "Fred" row("LastOrderDate") = Now.AddDays(-101) dataTable.Rows.Add(row)
Return dataTable End Function
Private Function MakeCustomerDataTable() As DataTable ' Declare a DataTable to contain the program generated data Dim dataTable As New DataTable("Customer")
Dim colWork As New DataColumn("CustomerName", GetType(String)) colWork.MaxLength = 50 dataTable.Columns.Add(colWork) Dim row As DataRow = dataTable.NewRow()
row("CustomerName") = "John"
dataTable.Rows.Add(row)
row = dataTable.NewRow()
row("CustomerName") = "Fred"
Private Sub UltraGrid1_InitializeLayout(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles UltraGrid1.InitializeLayout
e.Layout.Bands(0).Columns("CustomerName").EditorComponent = UltraComboEditor1 e.Layout.Bands(0).Columns("CustomerName").Style = UltraWinGrid.ColumnStyle.DropDownList e.Layout.Bands(0).Columns("CustomerName").CellActivation = Activation.AllowEdit
End SubEnd Class
When you run the sample:
1) Click on Ultrabutton1 the grid will be poulated.
2) In the Grid CustomerName cfiled lick on the dropdown and choose 2 values John and Fred.
3) Click on the Ultrabutton again and you will get the error message.
If you want I can attach the sample.
Thanks, Magued
Hi Magued,
I can't get your code to compile. Can you put together a small sample project and attach it to your post?
Enclosed please find a sample that recreates the issue.
Thanks for the follow up and please send me regarding any questions.
Hello Jayson,
I have opened a private case for you so that I can link it to this development issue. This way you will be notified automatically when the dev issue is updated. The case number is "CAS-127243-S0T9R0". You will see it located here: https://ko.infragistics.com/my-account/support-activity
Let me know if you have any questions regarding this matter.
Thanks Mike,
This worked. I currently don't need anything else. As for the support case it is up to development to investigate.
Regards, Jayson