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
190
Grid Sorting
posted

I am building a data source sorted the way I want, which is 

     list.OrderBy(x => x.EffectiveDate).ThenBy(x => x.InstallmentDate).ThenBy(x => x.SortOrder).ToList();

Then, in the InitializeLayout I have

    e.Layout.Bands[0].Columns["EffectiveDate"].SortIndicator = SortIndicator.Ascending;
    e.Layout.Bands[0].Columns["PostDate"].SortIndicator = SortIndicator.Ascending;
    e.Layout.Bands[0].Columns["InstallmentDate"].SortIndicator = SortIndicator.Ascending;

As soon as this code runs, the grid is no longer sorted by my query, but by these 3 columns. How do I load the grid sorted the way I want, and still show the sort indicators for later use?

Thanks