I have a column containing an alphanumeric format.And kendo grid sorts that column like this:
1399/1
1399/100
1399/2
I created a model proprety
public string DisplayNoX
{
get
{
if (this.DisplayNo != null)
{
return Regex.Replace(this.DisplayNo, "[0-9]+", match => match.Value.PadLeft(10, '0'));
}
return this.DisplayNo;
}
}
in Grid:
columns.Bound(p => p.DisplayNoX).Title("?????").Width(130).ClientTemplate("#=DisplayNo#");
It is okay for sorting,But filtering not work because what user search as "1399/1" is "0000001399/0000000001"
I don't know how to handle this ? for both sort and filter.
I read some posts about custom sorting and filtering.
But I can not figure out what is the best and the fastest solution for my situation with hundreds of thousands records.
question from:
https://stackoverflow.com/questions/65924021/kendo-grid-alphanumeric-column-sorting-trick-causes-filtering-problem 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…