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
300
XamDataGrid - Link Fields when moving
posted

Hi,

I have a grid with two rows of fields. I want to link the rows together so when they are re-ordered by a user, the rows stay together.

e.g.

| Name | Address | Phone | 

| Surname | Country | Area Code | 

when user drags Name to Col2, Surname should also move to Col2, Row1 (e.g. stay in the same column).

Using the FieldPositionChanged event I can set the ActualPosition of the linked field easy enough and this works well when moving fields from right to left (Phone to Col1) but not the other way. Is there a better way to do this rather than looping through every single field and adjusting the ActualPosition.

I've attached an example app (vs 2015)

BlotterSpike.zip