I've attached a sample app to illustrate my problem.
We've defined several fields with a width of *. We always want every column visible, hence the * width. We also disable the horizontal scrollbar in the FieldLayoutInitialized event.
We have one editable field (My Note in the sample app). If it has an extremely, obscenely long string value, the text is clipped as you would expect. If you click and drag the field separator, it will expand until it runs out of room based on the columns on the right. This is also as expected.
However, if you double-click the field separator, it expands the field as far as it needs, pushing the right hand columns off the screen. Since we disable the horizontal scroll bar, you're unable to see the righthand columns without expanding the window.
To see this in the sample app, enter a very large string value (just hold down a character key for 10-15 seconds), then double click the Note field separator to make it autosize.
Is there a way to make double clicking the field separator behave the same as clicking and dragging it?
Hello Dierk,
Thank you for your post. I have been looking into it and I can suggest you set the XamDataGrid’s FieldSettings’ AutoSizeOptions Property to “None” in order to achieve the functionality you want. Please let me know if this helps you or you have further questions on this matter.
Looking forward for your reply.
Hi Stefan,
Thanks for the response. Looks like that's a little too drastic of a change, as that totally disables actions from double-clicking the field separator. I'd prefer to double-click and have the field expand to enough width to take up the size of the containing grid while still leaving the other right-hand columns visible for moving or resizing.
Is there a way to override the double click behavior on the field splitters? Are those the FixedFieldSplitter objects?
I am just checking if you require any assistance or clarification on the matter.
We've decided to change our approach for now and will keep the horizontal scroll bar rather than hide it. Thanks for the assistance.
Thank you for your feedback. I believe that other community members may benefit from this as well.
Thanks again.