How to know if the user has done single selection of row and multiple selection of rows. I use the following code:
if(grdSearch.Row==grdSearch.RowSel)
{
MessageBox.Show("single row selected");
}
else
{
MessageBox.Show("multiple row selected");
}
but this only works if the user do drag and drop selection using mouse. but when the user select using CTRL key then RowSel and Row are same value. How to differentiate between single selection and multiple selection by the user.
I know this is for VB, but it may help someone searching for this similar thing. I have a boolean column in column 0, so by allowing the user to check each box, they're setting the value to -1. This script loops through the entire record set and creates a string of values from column 3 so I can insert it into my SQL Query.
Dim list As String = ""
For Each row As C1.Win.C1FlexGrid.Row In flexgrid.Rows
If flexgrid.GetData(row.Index, 0) = -1 Then
If list <> vbNullString Then list = list & ", "
list = list & "'"
list = list & flexgrid.GetData(row.Index, 3)
list = list & "'"
End If
Next