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
440
Hide/Display/Sort Rows With No Parent
posted

Hi

I have had a look round the documentation, knowledge base and forum but it looks as thought what I am trying to do is impossible! Any ideas would be appreciated.

So, a patient has medical notes, purchases (plus in some cases medical text that appears on a label associated with a specific product) and lab test results. Each type of data naturally has its own source table. What we need to do is list all of these items, ordered by DateTimeStamp DESCENDING, with a different row layout for each. Now the tricky bit, the user needs to be able to hide or show these rows by type - e.g. they may want to see all the data one time but then just show the notes - ideally without repeating the query or refreshing the grid.

My original thought was to show each set of data in a different band, then hide/show bands as necessary. But, of course, the sequence (date & time DESCENDING) needs to be maintained when they do the hide/show.

Can I achieve this?

Many thanks

Jerry

  • 469350
    Offline posted

    Hi Jerry,

    You are correct. This is impossible - with the WinGrid. WinGrid cannot support non-homogenous data sources. So if each type of child row has different fields and needs to be displayed using a different RowLayout, then the grid cannot do it. 

    You can do this with the WinTree, however. If you set the WinTree's ViewStyle to FreeForm, each individual node in the tree can use a differnent ColmunSet and a different RowLayout (or I think it's called NodeLayout in the tree). You will probably have to create the ColumnSets yourself, so it's more work. And the tree does not have some of the features of the grid such as filtering or summaries. But if you don't need those features, then the tree might be a good option.