Walsodar
2013-02-20T12:53:16Z
Hello. I've got a recordset containing data of steel profiles: ProfileID, ProfileName, ProfileWeight, ProfileSurface. There are three combo objects: Name, Weight and Surface. All three combo objects have got vItemValues = ProfileID and sItemTextes = ProfileName, ProfileWeight, ProfileSurface respectively. When a user will pick a profile name in the Name combo object then combos Weight and Surface should display values for this profile. Assigning cellvalues in AfterCommitEdit event doesn't work. How to do it? Regards.
Igor/10Tec
2013-02-20T15:23:49Z
Walsodar, do you want to say that assigning cell values ONLY in the AfterCommitEdit event does not have any effect? Have you tried to update the required cells using the DrawCell or even the Refresh methods of iGrid?

In any case, we would like to see a sample that demonstrates the issue to understand what is wrong. Can you prepare and send us one to our support service?
Walsodar
2013-02-21T09:18:26Z
Hi. It depends on what type cell is. Assume we have two columns in igrid and iGrid_AfterCommitEdit procedure contains one line of code:
If lCol = 1 Then iGrid.CellValue(lRow, 2) = iGrid.CellValue(lRow, 1)
Let's consider following cases when you enter a value into a cell in column 1:
1. Both columns are text type. You can see entered value in a cell of column2 after you hit Enter key.
2. First column is text type, second is combo type. Entered value is present in a cell of column2 but it is not visible. Even if you use DrawCell and igrid.Refresh.
3. First column is combo type, second - doesn't matter. Picked from combo list value is not available inside iGrid_AfterCommitEdit procedure. Cellvalue property is empty. So you can't assign anything to a cell in column 2.
I'm a user of ActiveX igrid 3.0 since it has been released and till now I used it to display ready data from different databases. But now I have to make some calculations on provided data and this issue unexpectedly stopped me. Regards.
Igor/10Tec
2013-02-21T11:49:46Z
The following code works perfectly and displays the selected value in the Immediate window when we select an item in the combo list in the first column:

Private Sub Form_Load()
   With iGrid1
      With .Combos.Add("abc")
         .AddItem "111", 111
         .AddItem "222", 222
         .AddItem "333", 333
      End With
   
      .ColCount = 3
      .ColDefaultCell(1).eType = igCellCombo
      .ColDefaultCell(1).sCtrlKey = "abc"
      .RowCount = 5
   End With
End Sub

Private Sub iGrid1_AfterCommitEdit(ByVal lRow As Long, ByVal lCol As Long)
   Debug.Print iGrid1.CellValue(lRow, lCol)
End Sub

Tested this with the current latest version of iGrid (5.0.74).

That's why I asked you to send us a sample we can use to reproduce the problem.
Walsodar
2013-02-21T12:33:49Z
I've downloaded the latest version of igrid and tested in my project. It works as I wanted to. So the issue concerns version 3.0 because code you have provided didn't work with the 3.0 too. So, now it is time to spend money for the newest version... Thanks for fast reply and best regards.