Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
45
Client side custom sorting issues with UltraWebGrid with LoadOnDemand.Xml settings
posted

Hi,

I want to have my own custom sorting algorithm in JS on a ultraWebGrid column, and also allow users directly modifing cell values.

I followed the Url below to do the Client side sorting of a particular column in the UltraWebGrid.

http://help.infragistics.com/Help/NetAdvantage/ASPNET/2010.1/CLR3.5/html/WebGrid_Defining_a_Custom_Sorting_Algorithm_Client_Side.html

I cannot get it to work until I do the following:

UltraWebGrid1_InitializeLayout() {

e.Layout.LoadOnDemand = Infragistics.WebUI.UltraWebGrid.LoadOnDemand.NotSet; // or other non-Xml options...

} 

because in the sorting Javascript (below), if the LoadOnDemand is Xml or 3, it performs sortXml(),

not my custom sorting function.

function igtbl_clctnSort(sortedCols)
{
 if(
  !this.Band.IsGrouped && this.Grid.LoadOnDemand==3)
  return this.sortXml(); ...

}

However, once I set the LoadOnDemand property to anything other than Xml, custom sorting works,

but if I edit a data cell (with column  DataType= System.String),

then I move the mouse focus to another cell, the cell value will change from the new value I entered,

back to the old value! I think it may cause a post back somehow. I can only fix this problem by setting the LoadOnDemand back to Xml.

But then I cannot do custom sorting!

Any ideas? I am using NetAdvantage_ASPNET_20092 for CLR3.5

Thanks.

 

Parents
  • 820
    posted

    try this..

    dgGrid.DisplayLayout.LoadOnDemand =

    LoadOnDemand.Automatic;

    dgGrid.ResetColumns();

    dgGrid.ResetRows();

    -Ani

Reply Children