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
65
First Column of Wingrid Extending too large when datasource is IList
posted

Hello,

I am having UltraWingrid wherein I am binding the hierarchical data using List<T>. The version of ultrawingrid is v10.3.

This list object is dynamically created which contains hierarchical data similar to a treeview.  Currently we are creating the hierarchy using Employee - Manager concept. I have attached the Employee Class and EmployeeList class that we are using for this purpose along with the snapshot of how the grid looks when the list is bound.

The problem is that when I use the list object, the first column of the grid is having too much width. Also we are not able to find a way to resize this column programatically. I have attached sample windows application in which I am using the grid.  You can execute the code and see the result to get what I am saying.

Any help regarding this would be appreciated. Its urgent.

Thanks,

Amit Waghchoure

 

 

 

 

UltrawinGridDemo.zip
Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi Amit,

    By default, the grid synchronizes the column widths of every band. So in a case like this where you have a recursive data source, there are essentially an infinite number of bands and for each band the grid indents a little bit. This means that the first column gets very big in order to accommodate the indentation all the way down the hierarchy. The grid limits you to 100 bands of depth by default, but that still means 100 level of indentation.

    So there are a number of ways you can handle this.

    1. Set MaxBandDepth on the grid to a smaller value. I recommend a value of between 5 and 8. This will give you pretty good performance on a decent machine and most users probably won't drill down more than 5 levels, anyway. 
    2. You could set AllowColSizing to Free. This will stop the grid from synchronizing the column widths and allow each band's columns to be sized independently.

     

Children