Filtering DataGridView without changing datasource

前端 未结 7 1985
渐次进展
渐次进展 2020-11-22 06:55

I\'m developing user control in C# Visual Studio 2010 - a kind of \"quick find\" textbox for filtering datagridview. It should work for 3 types of datagridview datasources:

7条回答
  •  天命终不由人
    2020-11-22 07:32

    You could create a DataView object from your datasource. This would allow you to filter and sort your data without directly modifying the datasource.

    Also, remember to call dataGridView1.DataBind(); after you set the data source.

提交回复
热议问题