Hi.
i want to show grid in the master/detail relation. I bind Dataset to grid it shows the grid in master/detail manner.
but i have probelm it shows all columns in the child grid. i want to show only 2 column in it. but it show all cloumn which child table has.
Handle the InitializeLayout event of the grid and you can set the Hidden property on any columns you don't want the user to see. For example:
e.Layout.Bands[0].Columns["column name"].Hidden = true;
Thanks . it is working now.
i have one more Question. How will i arragne the columns position in Child Band. e.g in e.Layout.Bands[1].
i want to move the position of column 2 to 5th position. Is it Posible?
Yes. You can use the same event and set the column.Header.VisiblePosition on each column.
Thanks for your reply.
when i expand the row. it shows its child record. i have hide the column header of the child band. But it repeates the column header of Parent band at the end of the child band/records before start of next parent records.
can i set that parent band column header shows only once in the grid?
Yes, see the HeaderPosition property on the Override.
I couldn't find the HeaderPosition element that you mentioned but did find the following which seems to achieve the same goal
<gridName>.DisplayLayout.Bands[0].Override.HeaderPlacement = HeaderPlacement.FixedOnTop;
Oops, sorry about that. You are right, it's HeaderPlacement. :)