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
Hello,
Has been any progress made in this subject? I mean, did Infragistics during all these 6 years introduced any functionality allowing changing DataRecord size in xamDataGrid while preserving possibility of user to change size manually?
Best regards
Hello Chris,
I can suggest you see this forum thread:
http://ko.infragistics.com/community/forums/t/50652.aspx
where it is explained how to achieve the functionality you want. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Hi Stefan,
Thanks for the information. So just to clarify, is there any way to "autosize" the records and fields when loading so that the contents of the CellValuePresenters are fully visible, while also maintaining the built in re-sizing features?
Once you manually set the height of the Records, all the built-in functionalities for record auto-sizing will no longer work, because till then the elements Height Property is not initialized. Currently there isn't seems to be a way to work around this, so you can suggest new product idea for future versions (or vote for existing ones) at http://ideas.infragistics.com.
There are many benefits to submitting an product idea:
- Direct communication with our product management team regarding your product idea.
- Notifications whenever new information regarding your idea becomes available.
- Ability to vote on your favorite product ideas to let us know which ones are the most important to you. You will have ten votes for this and can change which ideas you are voting for at any time.
- Allow you to shape the future of our products by requesting new controls and products altogether.
- You and other developers can discuss existing product ideas with members of our Product Management team.
Steps to create your idea:
The Product Idea site puts you in the driver’s seat and allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.
Thank you for looking into this. I still have an issue where after I set the height/width of the record, if the user tries to manually change the size of the record, it doesn't work. I used your example to test except I added DataRecordSizingMode = "IndividuallySizable" under FieldLayoutSettings. It seems that after setting the record height/width, the record will no longer resize automatically if the user changes the size in the grid. Is there a way around this? I would like to retain the ability for the user to manually resize after the app automatically sizes the records on loading.