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

[Solved] How to set the style of the entire selected row at client side?

4 Answers 93 Views
Grid
This is a migrated thread and some comments may be shown as answers.
adi
Top achievements
Rank 1
adi asked on 24 Jun 2009, 10:36 PM
Hi,

I'd like to set the font style of a selected row at client side. How can I do that?

Thnx

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 25 Jun 2009, 04:12 AM
Hi Adi,

Try setting the Font style for the Selected row in the aspx and see if it meets your requirement.

ASPX:
 
<SelectedItemStyle   Font-Names="Garamond"  Font-Size="Medium"   /> 


Thanks
Shinu
0
adi
Top achievements
Rank 1
answered on 25 Jun 2009, 06:59 AM
This will change the style for the selected item in general. I'd like to change the font-style according to the selection of the user. Maybe it will be bold, normal or italic. I tried to use the selected row item, which I get with grid.get_masterTableView().get_selectedItems(). But did not solve it.
0
Accepted
Princy
Top achievements
Rank 2
answered on 25 Jun 2009, 07:43 AM
Hello Adi,

You can try out the following code to set the style of the selected items in the grid:
js:
var selectedRows = $find("<%=RadGrid1.ClientID%>").get_masterTableView().get_selectedItems();  
for (var i = 0; i < selectedRows.length; i++)  
  {  
    var row = selectedRows[i];  
    row._element.style.fontStyle = "italic";       
  }  
 

Hope this helps..
Princy.
0
adi
Top achievements
Rank 1
answered on 25 Jun 2009, 10:38 AM
Hi Princy,

that is it. Works fine. Thank you.

Adi
Tags
Grid
Asked by
adi
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
adi
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or