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

Possible Bug - Multilanguage RTL and LTR

2 Answers 112 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ahmuser
Top achievements
Rank 1
Ahmuser asked on 08 Apr 2011, 09:14 AM
It seems that there is a bug in the Telerik Grid Control.

I have a database that contains a
1 - numerical field - integer
2 - memo field - contents of the field are in Arabic
3 - memo field - contents of the field are in English

I set up the grid with all columns displayed 

When RTL is set to True
The grid displays with the Arabic correctly displayed, but the English is incorrectly displayed.  Scrollbar appears on the Left.

When RTL is set to False
The grid displayed with the English correctly displayed, but the Arabic incorrectly displayed.  Scrollbar appears on the Right.


It is not a choice for me to display either the English only or the Arabic only - I need to display both at the same time.  Does anybody have any possible solution?

I would also like the ability to choose the side I would like to place my scrollbar - on the left of the grid or the right.

This is a realworld situation and desperately need some help.
Are there any alternative products that would help achieve this?

Many thanks




2 Answers, 1 is accepted

Sort by
0
Accepted
Jack
Telerik team
answered on 12 Apr 2011, 05:08 PM
Hi Ahmuser,

Thank you for this question. The Right-to-Left feature of RadGridView changes the layout and the writing direction. This causes all texts to start from right-to-left. You can also customize the text direction manually by using the RightToLeft property of GridCellElement. In this case you should handle the CellFormatting event. Here is a sample:

void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e)
{
    e.CellElement.RightToLeft = IsTextArabic(e.CellElement.Text);
}

Please note that you should implement the IsTextArabic method in the example above.  In case you need further assistance, we will be glad to help.

Best wishes,
Jack
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ahmuser
Top achievements
Rank 1
answered on 13 Apr 2011, 08:55 PM
The above solution worked for me.  I used the following code for VB.NET

'You can change "Arabic Column" to whatever your column name is where you require rtl

If column.FieldName.Equals("ArabicColumn") Then
    e.CellElement.RightToLeft = True
End If

 



Telerik does it again.  I've yet to see a grid that handles RTL so easily. 




 

 

 

 

 

Tags
GridView
Asked by
Ahmuser
Top achievements
Rank 1
Answers by
Jack
Telerik team
Ahmuser
Top achievements
Rank 1
Share this question
or