Information générale
Titre:
Filtering DataGridViewRows with unknown columns
Versions des environnements
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement