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
290
Covering cells in a row based on a condition
posted

I have a grid that should display full information for some rows and only basic info and description for the others. E.g. there is a number, a description field and details after it for rows of type A and there's just a number and a description for a row of type B. The description field should extend till the end of the row and cover not relevant cells. The description is longer for B rows, so it makes sense for this column to be wide. All objects in a collection are of the same C# type, but there's a property that returns the type A or B. What are my choices? Would multiple fieldlayouts be a way? How? I also want the grid to always use the field descriptions from the A row even if the first row is B. I'd prefer XAML only solution, but I'll take whatever I can get :) Any ideas? Thanks.

Parents
No Data
Reply
  • 290
    posted

    So I am one step further. In code behind I used an AssigningFieldLayoutToItem event to set a different fieldlayout based on the type property. But I got header labels for each group of layouts. Which I  got rid of by setting LabelLocation="Hidden" in FieldLayoutSettings. So the data looks exactly as I want it, but I have no labels now :) Is there a way to force one particular fieldlayout to create a header with labels? It would be enough if they just sat there, with no sorting or whatever functionality. I could even live with the columns not being resizable if it made things easier, but zooming in and out should keep the labels and cells synchronized.

    Ivan

Children