DataGrid: Highlight Selected Row

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • pakapaka
    Indigo Rose Customer
    • Jan 2007
    • 169

    DataGrid: Highlight Selected Row

    Dear All
    I have a tree object and a datagrid object.
    When I select a node from the tree, the data in the DataGrid plugin is automatically updated. How do highlight a specific default row in the Datagrid plugin when the data is refreshed (without performing a mouse over)
    Thanks
    Pakapaka
  • RizlaUK
    Indigo Rose Customer
    • May 2006
    • 5478

    #2
    you can use Grid.SetSelectedRange to set the selected item

    and use Grid.EnsureVisible to make sure the selected item is visable in the grid
    Embrace change in your life, you never know, it could all work out for the best

    Comment

    • pakapaka
      Indigo Rose Customer
      • Jan 2007
      • 169

      #3
      Thanks but I should clarify
      ....when I select a random tree node, the data is refreshed in the Datagrid AND the first row in the Datagrid is automatically selected. However I need to have the first row HIGHLIGHTED whenever I select a different tree node

      Correct me if am wrong, but the Ensure.Visible command only makes sure I dont have to scroll up or down to see the row, it does not HIGHLIGHT the row
      Yours

      Pakapaka

      Comment

      • RizlaUK
        Indigo Rose Customer
        • May 2006
        • 5478

        #4
        no it dose not, thats just to make sure its visable as i dident know you want to select the first row

        Grid.SetSelectedRange sets the selected/highlighted item or range of items,

        to select the 1st item use

        Code:
        Grid.SetSelectedRange("Grid", 1, 0, 1, 0, true, true);
        and to highlight all cell's in the row set the grid to list mode

        Code:
        Grid.SetListMode("Grid", true);
        Embrace change in your life, you never know, it could all work out for the best

        Comment

        • pakapaka
          Indigo Rose Customer
          • Jan 2007
          • 169

          #5
          ...yep, that does it . Thanksssss

          Comment

          Working...
          X