网格视图编号列未正确排序 [英] Grid view number column not sorting properly

查看:55
本文介绍了网格视图编号列未正确排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

排序:

DgvResults.DataSource = Dv
If DgvResults.RowCount > 0 Then
    DgvResults.CurrentCell = DgvResults.Item(cmbInd, 0)
End If
Try
    If IsNumeric(DgvResults.Rows(0).Cells(CmbSearchBy.SelectedIndex).Value) Then
         DgvResults.Columns(CmbSearchBy.SelectedIndex).ValueType = GetType(Integer)
    End If

  DgvResults.Sort(DgvResults.Columns(CmbSearchBy.SelectedIndex), System.ComponentModel.ListSortDirection.Descending)
Catch ex As Exception







'CmbSearchB y这个组合框包含相应排序的每个列值



当有一个数字类型的列没有正确排序时,所以

我在排序之前将数字列valuetype转换为number但没有用...



请问任何人都可以回答我的问题......




'CmbSearchBy This combo box contains every column value to sort accordingly

when there is a column with numeric type it is not sorting correctly,so
I have converted numeric column "valuetype" to "number" before sorting but no use...

pls can anybody answer my question...

推荐答案

将整数列绑定并尝试此操作。
Bind the column in integer and try this.


这篇关于网格视图编号列未正确排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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