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
975
Programmatically change the width/height of a DataRecord
posted

Hi,

I would like to know how to change the size of a record programmatically.  I am writing some code that will auto size the fields and records based on the content of the CellValuePresenters. For the fields, I can simply say field.Height or field.Width and set the size. But I cannot do this with Records. I have tried setting the DataRecordPresenter size but this doesn't quite get the job done. There must be some easy way to set the record size that I'm not seeing.

Thanks,

-Chris

  • 138253
    Offline posted

    Hello Chris,

     

    Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically I get an element of type VirtualizingDataRecordCellPanel from the DataRecordPresenter and set its height. I also added a code which you can uncomment, if you want to change the height of the editors inside the cells as well. Please let me know if this helps you or you need further assistance on this matter.

     

    Looking forward for your reply.

    XamDataGridRecordHeight.zip