Hi Vamsi,
The reason for this behavior is that grid has different row index and column index in the MultiRow mode. When the Multi rows per record check box is checked, you are having a different layout of columns specified by binder.LayoutColumns
binder.LayoutColumns(New String() {"CustomerID", "CompanyName", "-", "ContactTitle", "ContactName", "-", ".", "Address", "-", "-", "City", "-", "-", ".", "PostalCode", "Country", "-", "Phone", "Fax", "Region"})
So you should have the same logic implemented for this rows and columns too. In the Model.QueryCellInfo, you should have a condition that if checkbox is true, the logic for MultiRows, if not the logic for single row.
Private Sub CustomerGridQueryCellInfo(ByVal sender As Object, ByVal e As GridQueryCellInfoEventArgs)
If Not Me.toggleMultiRowCheckBox.Checked Then
If e.ColIndex > 0 And e.RowIndex > 1 Then
If (e.ColIndex = 1 Or e.ColIndex = 5) And e.RowIndex Mod 3 = 0 Then
e.Style.Enabled = False
Exit Sub
End If
End If
Else
// Extra 2 headers are counted as Rows
If e.ColIndex > 0 And e.RowIndex > 5 Then
// The logic for your case
If (e.RowIndex Mod 9 = 0 Or e.RowIndex Mod 9 = 1) And e.ColIndex = 1 Then
e.Style.Enabled = False
End If
End If
End If
End Sub
Here is the
modified VB sample.
Regards,
Jay N