Hi, I have an anoying problem with the XamDataGrid and moving of fields. The problem is quite simple, under certian circumstances (external to the grid) I want to make two fields visable and move them to column positions 0 and 1. So I do the following, {grid}.FieldLayouts[ 0 ].Fields.Move( i , newPosition );
This works fine except when the user has rearanged the columns manually in which case normally my columns are already in the correct position but the actualPosition poins to a different location. Thus what is the correct way to programatically move a column so it works under both scenarios? I hate the actual position attribute as it's flakey exspecially if you hide a column (you get several columns at position x which makes life very difficult).
thanks
Muumi
Hello Muumi,
It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking through your post and I suggest you set each Field’s ActualPosition Property, but note that this won’t change the Index if the Field in the Fields Collection, only its position in the FieldLayout.
Feel free to write me if you have further questions.