Sort columns of a table
-
Is there any Windows Forms components that allow to sort the content of a table by the column? That is the user press the name of the column and the table is ordered ascending and descending. And furthermore, there is a component that allow to search using one field or several of the table? Now we use DataTable. Thank you
-
Is there any Windows Forms components that allow to sort the content of a table by the column? That is the user press the name of the column and the table is ordered ascending and descending. And furthermore, there is a component that allow to search using one field or several of the table? Now we use DataTable. Thank you
Hello
123456uio wrote:
Is there any Windows Forms components that allow to sort the content of a table by the column?
DataGridView does that by default, and you can still do that in a ListView also by handling the ColumnClick event and sort the items youself.
123456uio wrote:
component that allow to search using one field or several of the table?
Well, you can do this several ways, but a built-in method?!! I don't know! You can still search a ListView with
FindItemWithText()
method, but as long as you got a DataTable I prefer searching the table rather than the control.Regards:rose: