data grid control problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • cfyam

    #1

    data grid control problem

    After I set the datagrid allowsort is true, the position of data binding
    will not correct when i click the row header!
    How can I slove the problem?


  • Dmitriy Lapshin [C# / .NET MVP]

    #2
    Re: data grid control problem

    Hello,

    There are several possible problems matching your description. Could you
    please be more specific on what do you want to achieve and what is going
    wrong?

    --
    Dmitriy Lapshin [C# / .NET MVP]
    X-Unity Unit Testing and Integration Environment

    Deliver reliable .NET software

    "cfyam" <cfyam@mail.apo l.com.tw> wrote in message
    news:#kAoFkIZDH A.1940@TK2MSFTN GP10.phx.gbl...[color=blue]
    > After I set the datagrid allowsort is true, the position of data binding
    > will not correct when i click the row header!
    > How can I slove the problem?
    >
    >[/color]

    Comment

    • Preeti

      #3
      Re: data grid control problem

      You will have to do something like this in the DataGrid_SortCo mmand Event.

      DataView SortedView =(DataView)(Dat aGrid1.DataSour ce);
      SortedView.Sort = e.SortExpressio n+" DESC";
      DataGrid1.DataS ource=SortedVie w;
      DataGrid1.DataB ind();

      This will sort in the descending order.

      Comment

      Working...