joorno smith
Top achievements
Rank 1
joorno smith
asked on 01 Feb 2010, 09:05 PM
Q3 2009 SP2
SortedBackColor does not work with client-side databinding, is it supposed to? I'm using GetBindingData() on the server. Sorting the column data works fine, but how can I change the background color of the sorted column??
Thanks.
SortedBackColor does not work with client-side databinding, is it supposed to? I'm using GetBindingData() on the server. Sorting the column data works fine, but how can I change the background color of the sorted column??
Thanks.
3 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 02 Feb 2010, 06:56 AM
Hello Joorno,
Have you tried setting the SortedBackColor property of the grid? Try setting it and see if it helps:
aspx:
Hope this helps..
Princy.
Have you tried setting the SortedBackColor property of the grid? Try setting it and see if it helps:
aspx:
| <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True"> |
| <SortingSettings SortedBackColor="Gray" /> |
| ...... |
Hope this helps..
Princy.
0
jormo josh
Top achievements
Rank 1
answered on 03 Feb 2010, 05:19 AM
Thanks, but the question states that "SortedBackColor" is **not** working with client-side data binding.
.aspx
VB.Net
.aspx
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> |
| <Scripts> |
| <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /> |
| <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /> |
| </Scripts> |
| </telerik:RadScriptManager> |
| <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" |
| GridLines="None"> |
| <MasterTableView AutoGenerateColumns="False"> |
| <Columns> |
| <telerik:GridBoundColumn DataField="Item" DefaultInsertValue="" HeaderText="Item" ReadOnly="True" UniqueName="CropType"> |
| <HeaderStyle Width="20%" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="ItemDesc" DefaultInsertValue="" HeaderText="Description" UniqueName="column"> |
| <HeaderStyle Width="80%" /> |
| </telerik:GridBoundColumn> |
| </Columns> |
| </MasterTableView> |
| <SortingSettings SortedBackColor="Silver" /> |
| <PagerStyle AlwaysVisible="true" /> |
| <ClientSettings> |
| <DataBinding Location="default.aspx" SelectMethod="GetData" SortParameterType="Linq" FilterParameterType="Linq" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
VB.Net
| <WebMethod()> _ |
| Public Shared Function GetData(ByVal startRowIndex As Integer, ByVal maximumRows As Integer, ByVal sortExpression As String, _ |
| ByVal filterExpression As String) |
| Return RadGrid.GetBindingData("t_RadGrid.TestDataContext", "PlantCrops", startRowIndex, maximumRows, sortExpression, filterExpression) |
| End Function |
0
Hi jormo,
With client side databinding, the grid control cannot apply the sorted BackColor, since it does not post back to the server. One possible solution in this case would be to intercept the sort command on the client, and apply the color there.
I hope this is a feasible approach for you.
Regards,
Yavor
the Telerik team
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
With client side databinding, the grid control cannot apply the sorted BackColor, since it does not post back to the server. One possible solution in this case would be to intercept the sort command on the client, and apply the color there.
I hope this is a feasible approach for you.
Regards,
Yavor
the Telerik team
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.