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
175
Need to click twice on the column header to sort
posted

Hi, 

I am using 2012.2 release. We have a webdatagrid which has sorting enabled:

<ig:Sorting Enabled="true" SortingMode="Multi" />

The problem is every time we want to sort by the column, we need to click on the column header twice, the first click does add the sorting image to the column header, but the data is not sorted correctly, the 2nd click will sort the the data correctly.
Any help will be appreciated!
Qiuyu
Parents
  • 135
    Verified Answer
    posted

    Hello Qiuyu,

    Thank you for contacting Infragistics using forum!

    Based on your information, I have created an isolated sample application and try to reproduce the behavior but it was not able to replicate and sorting is working fine without any issue.

    I have attached the sample project I used to test this, please test the sample application and let me know.  Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem. My test was performed using version 12.2.20122.2107 CLR 4.0.

    One more thing I would like to add with my last reply, that is if you are binding the WebDataGrid using the if (!IsPostBack) { // databinding code here }

    You should handle the WebDataGridProposedProject_ColumnSorted event and rebind the grid again to have sorting effect on the grid look like that:

    protected void WebDataGridProposedProject_ColumnSorted(object sender, Infragistics.Web.UI.GridControls.SortingEventArgs e)
        {
            DataTable dt = getdata();
            this.WebDataGridProposedProject.DataSource = dt;
            this.WebDataGridProposedProject.DataBind();
        }

    Otherwise only column sort indicator will be changed and no sorting will be applied on the grid. Please test this also. Thank you.

    Incase if you are still facing any issue please feel free to modify the sample application I have provided to you and revert I will look at that and try to help you on this. Thank you.

    WDG_CS_clr4_12.2_Sorting_Issue_Qiuyu.zip
Reply Children