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
2265
UltraGrid Grouping with Text and Images
posted

I have the following flat table structure in my UltraDataSource which is then bound to my UltraGrid.

Now that view is not really useful to a user.  I want to be able to organise the data such that the user can view Account->Permission assignments either by Account or by Permission.  The Icon is related to the Account - if it is a group or is a user.

I have a combo where the user can select a view.  This dynamically changes the SortedColumns.  I am using OutlookGroupBy to display the hierarchy.  The following code is executed when the user selects a view in the combo:

            ultraGrid1.DisplayLayout.Bands[0].Groups.Clear();
            ultraGrid1.DisplayLayout.Bands[0].SortedColumns.Clear();
            this.ultraGrid1.DisplayLayout.ViewStyleBand = ViewStyleBand.OutlookGroupBy;
 
            string column = ultraCombo1.Value == "By User" ? "AccountName" : "PermissionName";
            var col = ultraGrid1.DisplayLayout.Bands[0].Columns[column];
            var colIcon = ultraGrid1.DisplayLayout.Bands[0].Columns["Icon"];
            //ultraGrid1.DisplayLayout.Bands[0].SortedColumns.Add("Icon", false, true);
            ultraGrid1.DisplayLayout.Bands[0].SortedColumns.Add(column, falsetrue);
            this.ultraGrid1.Rows.ExpandAll(true);

This displays the 2 views as follows:

View By User

View By Permission

            

This all looks ok.  However, I want the icon to be displayed alongside the account at all times.  I also don't want the summary to display the column name - just the value (and maybe the number of items in it).

Is this the way to do the grouping?  Or do I need to create some sort of dynamic multi band layout which would be dependant on the selected view?

I want to add some filtering to the scenario on the account name - so I would have a separate textbox and when the user types characters into it - it filters the accounts listed in the grid.

Thanks

Andez

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi Andez,

    There seems to be something missing from your post. You say "I have the following flat table structure in my UltraDataSource which is then bound to my UltraGrid." But then there is no structure or any information following it. So I'm not sure what you are referring to.

    It looks like maybe you tried to include images in your post, but if so, they didn't come through. Maybe you could go to the Options Tab and attach a zip file with the images.

Children