I want to to add some blank space in between 2 rows of xamdatagrid grid. Can you please suggest how can I achieve this?
Hello Richa,
You can add space between two records by simply increasing the bottom (or top) margin of one of the records. It would really depend on the exact functionality you are looking for and under what conditions (if any) this visual change should be triggered.
For example:
Approach (1) Space between every 2 records.
<Style TargetType="igDP:DataRecordPresenter"> <Setter Property="Margin" Value="0,0,0,10" /></Style>
Approach (2) Space between a specific record and the one beneath it.This will create a blank space between the record whose DataItem.Name property is "Item 7" and the record beneath it.
<Style TargetType="igDP:DataRecordPresenter"> <Style.Triggers> <DataTrigger Binding="{Binding Path=Record.DataItem.Name, RelativeSource={RelativeSource Self}}" Value="Item 7"> <Setter Property="Margin" Value="0,0,0,10" /> </DataTrigger> </Style.Triggers></Style>
I have attached a sample application that demonstrates the approaches from above.
If you have any questions, please let me know.
My requirement is like I have a hierarchical xamdatagrid and I want a border for each parent row with its child rows
and each of the parent rows should have some blank spacing in between . I have attached the image for reference. I also want to allow drag and drop functionality between the rows. Please let me know how can I achieve this