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
2395
* Width Columns and AutoFit When Double-Clicking Field Separator
posted

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?

XamDataGridAutoSizeHeaderTest.zip
  • 138253
    Offline posted

    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.