:: Forum >>

case sensitivity

Hi Alex,
Thank YOu for ur wonderful grid. I have two issues related to the gird. In one of my column i have a data as data1, data1, [email protected]#$%^&*, etc when i click on this particular column am getting the column sorted as data1, [email protected]#$%^&*, data1
Also, can u help me out to make my sorting case sensitive or insensitive.
am using version 1
Any help for this.
Monday, May 7, 2007
The values for sorting are obtained by the setDataProperty method. You can attach functions to this method, to let javascript know what kind of data is in the column.

In the below example, there is a grid myGrid with 2 columns (data is stored in the array myData). The first column contains case-sensitive strings, the second case-insensitive ones.

//set data types for column sorting
function string(text){return text;}; //case sensitive strings
function stringCi(text){return text.toLowerCase();}; //case insensitive strings

//setDataProperty for the columns
var toValue = [string,stringCi]; //[column1, column2]
myGrid.setDataProperty('value', function(i,j){return toValue[j](my_data[i][j]);});


Good luck!
Rekcor
Tuesday, May 15, 2007

This topic is archived.


Back to support forum

Forum search