C#对具有文本和整数的datagridview列进行排序 [英] c# sort datagridview column having text and integers

查看:138
本文介绍了C#对具有文本和整数的datagridview列进行排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在datagridview中有一列.此列在每个单元格中包含获取值".

当我单击获取值"时,它将执行一些计算并在单击的单元格中显示该值.结果为整数类型.

现在,我想像整数一样对文本进行排序,然后像:
那样对文本进行排序
1
15
150
获得价值
获得价值
获得价值
获得价值
.
.
.
.
.
.

等待您的回应.

谢谢
Kapil

Hello All,

I am having a column in my datagridview. This column contains "Get Value" in each cell.

When I click on the "Get Value" it perform some calculations and display the value in the clicked cell. The result is of Integer type.

Now I want to sort it like Integer then the text, like :

1
15
150
Get Value
Get Value
Get Value
Get Value
.
.
.
.
.
.

Awaiting your response.

Thanks
Kapil

推荐答案

要自定义datagridview中的排序,请阅读本文-
To customize sort in a datagridview, go through this article - How to: Customize Sorting in the Windows Forms DataGridView Control[^].


这篇关于C#对具有文本和整数的datagridview列进行排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆