RadGridview Relation expanded

1 posts, 0 answers
  1. Bao
    Bao avatar
    54 posts
    Member since:
    Jan 2015

    Posted 21 May 2019 Link to this post

     Hi ,

    I am using the relational gridview. when i click the button , i want the node will be expanded by condition . Follow the link : https://docs.telerik.com/devtools/winforms/controls/gridview/hierarchical-grid/how-to/expanding-all-rows . is it the best way to do it ? because i see it is really slow when expanding.

     

    void ExpandAllRows(GridViewTemplate template, bool expanded) {
     foreach(GridViewRowInfo row in template.Rows) {

      if(row.Tag == conditionID){
      row.IsExpanded = expanded;

     }
     }
     if (template.Templates.Count > 0) {
      foreach(GridViewTemplate childTemplate in template.Templates) {
       ExpandAllRows(childTemplate, true);
      }
     }
    }

Back to Top