This is a migrated thread and some comments may be shown as answers.

Gridview Row height binding

3 Answers 74 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Khirod
Top achievements
Rank 1
Khirod asked on 28 Apr 2013, 07:56 PM
Dear Experts,
Is it possible to bind gridview row height in silverlight?
I have a collection with one property defined to be binded with row height. Here gridview text wrapping is enabled which wraps text on column width change. It changes the row height as well. But my collection is not updating with the changed row height. Can you suggest how to acheive this by using binding?


Regards,
Khirod

3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 29 Apr 2013, 12:23 PM
Hi Khirod,

If you wrap the text for the column, then not all the rows will be resized with the same size. Actually every one will be re sized based on how long is the text to be displayed in the cell. Would you like to monitor the height for each row?

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Khirod
Top achievements
Rank 1
answered on 29 Apr 2013, 06:08 PM
Hi Didie,

The requirement is to monitor height of each row. I am now doing the required functionality by itterating each row items in column width change event. But when i double click the column separator, collections are not being updated with proper row height value in the event. If i delay for fractions of milliseconds after column width change event and itterate through each item, I am getting proper value. I think this functionality will work without delay if use binding. But I am not getting how to acheive the same through binding.

Regards,
Khirod
0
Dimitrina
Telerik team
answered on 01 May 2013, 01:34 PM
Hello Khirod,

In that case, I would suggest you to define a new property for your bound business object to keep the height settings per row level. Then apply a RowStyle (Style targeting the GridViewRow visual element) and set binding for the row's Height property.
 

Greetings,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Khirod
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Khirod
Top achievements
Rank 1
Share this question
or