We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

"Flat" hierarchical display, sharing columns

Hello: Referencing this message: http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=25202 I would like to do something similar with the GridGroupingControl for ASPX. Example: I have 4 levels of hierarchy: Units/Regions/Divisions/Items. Units, Regions, Divisions share the same "columns" - Name and Count. Items will just have one column. I would like it so that when I expand Units, the Regions name column "shares" the same column as the parent, and the Count column shares the same column as the parent. How can I achieve this with the GGC? Thank you. MS

4 Replies

AD Administrator Syncfusion Team March 9, 2006 03:23 PM UTC

Hi Michael, I have attached a sample with the features you mentioned, and we would suggest you to provide the grid datasource with a single table which you could acheive using a join command. Data Source for the Grid: ------------------------- 1) To arrive at the interface you had requested, we propose that you first create a join of all the tables (Units, Regions, Divisions and Items) using SQL and create a single table. 2) Then specify this table as the data source for the grid. 3) We have created a dummy table called "Items.mdb" which reflects the schema of this "joined table" that you would provide the grid - as suggested in step 1. In case you don''t have Access, I have attached the screenshot of the table as seen within Access. 4) Once we done with with the above said steps, we have configured the grid in appropriate ways to arrive at the look and feel you wanted. Configuring the Grid: --------------------- 1) QueryCellStyleInfo event is handled and the "Group Caption Cells" are manually populated with appropriate data. 2) An "unbound column" called "Count" has been added and again populated in the above QueryCellStyleInfo handler. 3) ItemTemplates are specified for the ItemName column to make them hyper links. 4) The look and feel of the grid is pretty basic in this sample, but can be customized in any way you want. By Following the above procedure : You dont have to follow the procedure as i mentioned in this forum to acheive hyperlinks in nested tables. The procedure which I mentioned rel='nofollow' href="http://www.syncfusion.com/support/forums/message.aspx?MessageID=41629">here is for the nested table approach and here we dont use any nested column. Please let us know if you have any questions. Thanks, A.Sivakumar

FlatHierarchyWithSharingColumns.zip


MS Michael Shorten March 9, 2006 04:48 PM UTC

A.Sivakumar: Thank you very much for the example. I do have one followup question though... if we wanted all the columns to be shared, ie., the +/- cells are always in the "0" column, the names in the first, etc, - how could I achieve that, using your sample as a starting point? MS


MS Michael Shorten March 9, 2006 06:02 PM UTC

I''ve also run into a strange bug - when I fully expand the tree out to see the hyperlink columns, I can''t reduce the group back by click the "-" - not sure why? MS


AD Administrator Syncfusion Team March 10, 2006 12:48 PM UTC

Hi Michael, The behavior you saw in that sample is because the table doesn''t have a primary key. The sample has been modified as per your request ("The +/- cells are in one column, the names in the other, etc") with an unbound column "Level" having ''+/-'' in that column (Illustrated in the sample), and the new mdb file has been attached. As we had already mentioned, the look and feel of the grid is pretty basic in this sample. It could be customized as per your requirement. Thanks, A.Sivakumar

HierrachyWithSeperateColumn For PlusMinusCells.zip

Loader.
Live Chat Icon For mobile
Up arrow icon