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

[Solved] Client side formatting - undesired visual effect

2 Answers 135 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Maria
Top achievements
Rank 1
Maria asked on 09 Dec 2009, 11:43 AM
Hello,

I have the following scenario at my application:

  • Columns are auto-generated, I don't know which columns I will get at design time.
  • I should display cell contents in max two rows.
  • If cell content doesn't fit on two rows I have to get a shorter version of the cell content and also add an ellipsis script to expand/collapse the content.

I have been reading RadGrid documentation related to grid formatting from client side and as far as I've seen I should use OnGridCreating and OnGridCreated client events to do it.

Everything works OK formatting my cell's content from one of those events except that the user is able to see the grid before I apply any format and a few milliseconds later the formatted version. This flickering effect the user sees is very annoying specially when the contents of the grid are very large.

Is there any way to format cell's content at client side BEFORE the grid is displayed?

Thanks ahead,

Maria Henao

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 09 Dec 2009, 12:13 PM
Hi Maria,

You can set

<telerik:RadGrid  style="visibility:hidden"  />

on the server and remove the style after you have adjusted the RadGrid layout on the client:

gridClientObject.get_element().style.visibility = ""; // or style.visibility = "visible"


Best wishes,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Maria
Top achievements
Rank 1
answered on 09 Dec 2009, 04:08 PM
Thank you so much! it does exactly what I was trying to achieve.
Tags
Grid
Asked by
Maria
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Maria
Top achievements
Rank 1
Share this question
or