SPgridview过滤问题 [英] SPgridview filtering Issue

查看:56
本文介绍了SPgridview过滤问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我已经构建了一个包含过滤,排序和分页的SPgridview。

在网格中,我有一个数字类型列和其他是字符串列。



过滤数字类型列时出现问题,过滤列按升序显示值,如(10000,10001, 12,145,.....)。



实际上它按字符串类型而不是nueric类型对值进行排序..



预期结果应该是12,145,10000,10001,.......



i花了很多钱在谷歌的时间..无法找到解决方案。请帮助。



如何解决问题?

Hi All,

I have built a SPgridview with Filtering, Sorting and Paging.
In the grid , i have one numeric type column and other are string columns.

There is a issue while filtering the numeric type column, the filter column showing the values in ascending order like (10000, 10001, 12,145,..... ).

Actually it sorting the values in string type instead of nueric type..

Expected result should be like that 12,145, 10000, 10001,.......

i have spent much time in google.. Not able to find the solution. Pls help.

How to fix the issue?

推荐答案

试试这个,根据你的字段名称修改到您的应用程序

try this, change your field name according to your application
BoundField colDescriptione = new BoundField();
colDescriptione.DataField = "Description";
colDescriptione.HeaderText = "Description";
colDescriptione.SortExpression = "Description";
this.oGrid.Columns.Add(colDescriptione);


这篇关于SPgridview过滤问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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