How do I change the Selected row style? I want it to have a border around the row but not use any background fill. I tried following the tutorial in the help file by creating a control level resource definition but that doesn't seem to work. I want it to look like the in place edit of the row but without the fill. Thanks.
7 Answers, 1 is accepted
0
Hello Don,
Attached I am sending you a sample which achieves the result you are describing.
The sample changes the both the template of the row and the cell to achieve the desired result.
I hope this fits your case.
All the best,
Kalin Milanov
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.
Attached I am sending you a sample which achieves the result you are describing.
The sample changes the both the template of the row and the cell to achieve the desired result.
I hope this fits your case.
All the best,
Kalin Milanov
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
Don
Top achievements
Rank 1
answered on 03 Dec 2009, 03:47 PM
That's pretty close thanks. I actually got it to do that but my issue is that I want the background color of the cell to show through and not be overwritten by the selected style. I tried setting the alph of the brushes but it just shows the background of the grid and not the row that is highlighted. I attached a screen capture so you can see what I mean.
Don
Don
0
Accepted
Hi Don,
All the best,
Kalin Milanov
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.
I apologize for the late reply. In the solution I have sent you the current cell is not being highlighted and the row selection is organized in a way to allow the different row colors to show through.
Are you coloring the cells or the rows? There are different approaches for both cases and I have sent you the one for coloring the rows.
All the best,
Kalin Milanov
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
Don
Top achievements
Rank 1
answered on 09 Dec 2009, 02:06 PM
Well actually I am setting the cell background and foreground (text color) but there is only one column so from the users perspective it is essentially the same thing. If there is a way to do it on the row I'm open to that. Here is the code I am using.
/// <summary> |
/// Handles the RowLoaded event of the grdSwimLanes control. |
/// </summary> |
/// <param name="sender">The source of the event.</param> |
/// <param name="e">The <see cref="Telerik.Windows.Controls.GridView.RowLoadedEventArgs"/> instance containing the event data.</param> |
private void grdSwimLanes_RowLoaded(object sender, RowLoadedEventArgs e) |
{ |
if (e.Row is GridViewHeaderRow || e.Row is GridViewNewRow || e.Row is GridViewFooterRow) return; |
SwimLaneDefinition ld = (SwimLaneDefinition) e.DataElement; |
Color c = DiagramHelper.ConvertToMediaColor(ld.BackgroundColor); |
Color cText = DiagramHelper.ConvertToMediaColor(ld.TextColor); |
e.Row.Cells[0].Background = new SolidColorBrush(c); |
e.Row.Cells[0].Foreground = new SolidColorBrush(cText); |
} |
0
Don
Top achievements
Rank 1
answered on 09 Dec 2009, 03:24 PM
I am now setting the background of the row and that works the way I want it using your example. Thanks for you help.
Don
Don
0
J
Top achievements
Rank 1
answered on 09 Sep 2010, 05:38 AM
Hi,
I am using telerik radcontrols for silverlight 4 Aug 12 2010 version and I tried to build the sample you provided in the attached zip file(
263625-rowselection.zip Please find the attachment in this thread). However I am gettting an error "AlignmentContentPresenter" not available in GridView namespace. It looks like AlignmentContentPresenter is obsolete in SL4 version for telerik RadGridView. Could you please suggest me how to fix this error as I need to get this working in our application as soon as possible. Any help would be appreciated.
Thanks in advance,
Jo
I am using telerik radcontrols for silverlight 4 Aug 12 2010 version and I tried to build the sample you provided in the attached zip file(
263625-rowselection.zip Please find the attachment in this thread). However I am gettting an error "AlignmentContentPresenter" not available in GridView namespace. It looks like AlignmentContentPresenter is obsolete in SL4 version for telerik RadGridView. Could you please suggest me how to fix this error as I need to get this working in our application as soon as possible. Any help would be appreciated.
Thanks in advance,
Jo
0
Hi Don,
The solution you got from the forum was created almost an year ago. Since then the template was changed and it no longer uses the AlignmentContentPresenter among other changes.
If you would like to perform some styling I would suggest you read about it in our online help.
l the best,
Kalin Milanov
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.
The solution you got from the forum was created almost an year ago. Since then the template was changed and it no longer uses the AlignmentContentPresenter among other changes.
If you would like to perform some styling I would suggest you read about it in our online help.
l the best,
Kalin Milanov
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.