Вид dataGridView столбцы в C#? (Windows Form)

Попробуйте использовать инструмент под названием Octoparse.

Отказ от ответственности: я никогда не использовал это сам, но только приблизился к использованию этого. Итак, исходя из моих знаний о его функциях, я думаю, что это будет полезно для ваших нужд.

46
задан Cœur 16 April 2017 в 04:49
поделиться

4 ответа

There's a method on the DataGridView called "Sort":

this.dataGridView1.Sort(this.dataGridView1.Columns["Name"], ListSortDirection.Ascending);

This will programmatically sort your datagridview.

104
ответ дан 26 November 2019 в 20:09
поделиться

You can control the data returned from SQL database by ordering the data returned:

orderby [Name]

If you execute the SQL query from your application, order the data returned. For example, make a function that calls the procedure or executes the SQL and give it a parameter that gets the orderby criteria. Because if you ordered the data returned from database it will consume time but order it since it's executed as you say that you want it to be ordered not from the UI you want it to be ordered in the run time so order it when executing the SQL query.

6
ответ дан 26 November 2019 в 20:09
поделиться

Use Datatable.Default.Sort property and then bind it to the datagridview.

0
ответ дан 26 November 2019 в 20:09
поделиться
dataGridView1.Sort(dataGridView1.Columns[0],ListSortDirection.Ascending);
14
ответ дан 26 November 2019 в 20:09
поделиться
Другие вопросы по тегам:

Похожие вопросы: