General information
Title:
Filtering DataGridViewRows with unknown columns
Environment versions
Network:
Windows 2003 Server
Hello all,
I need to filter a DataGridView based on unknown conditions at design time.
The dataGridView has 6 columns and the user could select one or more columns and one or more rows.
Then i need to get the data of that rows and columns and filter the datagrid based on this values.
In VFP i would do something like:
create a string like: FilterString = "set filter to "
loop through the table
at every selected row i would fill the string like this: FilterString = FilterString + "ColumnName = '" + ColumnValue + "' and "
At the end i would have a string like: "set filter to ColumnName = 'value1' and ColumnName2 = 'value2' and ColumnName3 = 'value3'"
then i would execute the inner string command with: &FilterString or (FilterString)
Can i do something like that with C#?
Thank you,
Joaquim
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only