Home Forums WinForms controls Xceed Grid for WinForms Current Row Changed Grid Event

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #15819 |

    When current row is changed, I will load data into my other controls based on the row selected. Works fine when row is changed using mouse clicks or key down.

    When any column is sorted, it changes current row to the first row and after loading my other controls(current row changed event) it doen’t paint itself properly. Comes back blank and I have to move scroll bar for it to paint properly.

    Does anybody know any solution to this?

    Thanks!

    Imported from legacy forums. Posted by xUser (had 2423 views)

    Xceed Support
    Member
    Post count: 5658

    When you do a sort, the CurrentRow is re-assign to the first row in the grid. There may be, at some point, a state at which the CurrentRow is null and that is why it may not render itself properly. In the CurrentRowChanged event, you could add a condition:

    e.g.,
    if(CurrentRow != null)
    {//…}

    Imported from legacy forums. Posted by CharlesB (had 3260 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.