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
985
Hiding a list column from the grid
posted

Hello,

Hope you are well.

I am facing a number of issues while trying to hide a list column (property) from the grid. When you run the application attached, you will find that each row is expandable. Once you expand top level row, a header for subrows will appear called 'Persons'. Now you have to expand 'Persons' again to get the list of child rows!

Try opening the source file Person.cs, and now comment out the following:

private List<string> mAnimals = new List<string>();

[Browsable(false)]
public List<string> Animals
{
get
{
return mAnimals;
}
set
{
mAnimals = value;
}
}

Once you you comment out the non-Browsable public list 'Animals' or change its access modifier from 'public' to 'private', and run the application again, you can expand each row and display its subrows in one step. The subrows' header 'Persons' won't be appearing this time. In my case, I am trying to achieve this output without removing the list property or changing its access modifier from 'public' to something else. I am also facing other behavioural issues while having two public lists, though the browsable property of one of them is set to false. 

Please help me, how can I eliminate the extra expandable header displayed each time you expand a top level row? 

XamDataGridComboCellModified2.zip