7 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 17 Dec 2013, 11:41 AM
Hi Reshma,
You can set AllowMultiColumnSorting property to True, more than one column sort expression can be added to the table view.
ASPX:
Thanks,
Princy
You can set AllowMultiColumnSorting property to True, more than one column sort expression can be added to the table view.
ASPX:
<
MasterTableView
AllowMultiColumnSorting
=
"true"
>
<
SortExpressions
>
<
telerik:GridSortExpression
FieldName
=
"record"
SortOrder
=
"Descending"
/>
<
telerik:GridSortExpression
FieldName
=
"title"
SortOrder
=
"Descending"
/>
</
SortExpressions
>
Thanks,
Princy
0
Reshma
Top achievements
Rank 1
answered on 17 Dec 2013, 11:51 AM
hi ,
adding
will sort my data with record and title which i dont want.i want it to get sorted by record_sort but on screen it should displa as it is sorted on record and title ascending.
is there any property which will show column header as sorted ..?
they just should LOOK as sorted but actually grid is sorted with some different column.
adding
<
telerik:GridSortExpression
FieldName
=
"record"
SortOrder
=
"Descending"
/>
<
telerik:GridSortExpression
FieldName
=
"title"
SortOrder
=
"Descending"
/
will sort my data with record and title which i dont want.i want it to get sorted by record_sort but on screen it should displa as it is sorted on record and title ascending.
is there any property which will show column header as sorted ..?
they just should LOOK as sorted but actually grid is sorted with some different column.
0
Princy
Top achievements
Rank 2
answered on 18 Dec 2013, 04:14 AM
Hi Reshma,
When you set the sort for record column as ascending all the remaining columns will be arranged according to that sorted column. You can use sort on record and the title will be displayed according to the sorted order of records.
ASPX:
Thanks,
Princy
When you set the sort for record column as ascending all the remaining columns will be arranged according to that sorted column. You can use sort on record and the title will be displayed according to the sorted order of records.
ASPX:
<
SortExpressions
>
<
telerik:GridSortExpression
FieldName
=
"record"
SortOrder
=
"Ascending"
/>
</
SortExpressions
>
Thanks,
Princy
0
Reshma
Top achievements
Rank 1
answered on 18 Dec 2013, 07:32 AM
hi,
you are not getting my problem.
I am saying i have grid sorted with column RECORD_SORT which is invisible but to user on screen i want to show as grid is sorted by column Record and Title.
Can I do that???
you are not getting my problem.
I am saying i have grid sorted with column RECORD_SORT which is invisible but to user on screen i want to show as grid is sorted by column Record and Title.
Can I do that???
0
Hi Reshma,
If I understand correctly you would like the grid to have no sorting, however the styles for some columns to be like they are sorted.
In order to achieve this you could use the default styles of the grid or define a custom style.
If you would like to use the default styles for RadGrid you need to set the HeaderStyle-CssClass and ItemStyle-CssClass properties to 'rgSorted'. This could be done in the markup or in the code-behind.
Markup:
Code-behind:
If you would like to have custom styles you could set the CssClass for the columns like above to a CSS class that you have defined on the page.
Hope this helps. If you have different requirements or further instructions, please elaborate on your specific scenario and send us sample screenshots or video demonstrating the desired behavior.
Regards,
Viktor Tachev
Telerik
If I understand correctly you would like the grid to have no sorting, however the styles for some columns to be like they are sorted.
In order to achieve this you could use the default styles of the grid or define a custom style.
If you would like to use the default styles for RadGrid you need to set the HeaderStyle-CssClass and ItemStyle-CssClass properties to 'rgSorted'. This could be done in the markup or in the code-behind.
Markup:
<
telerik:GridBoundColumn
DataField
=
"Record"
HeaderText
=
"Record"
UniqueName
=
"Record"
HeaderStyle-CssClass
=
"rgSorted"
ItemStyle-CssClass
=
"rgSorted"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Title"
HeaderText
=
"Title"
UniqueName
=
"Title"
HeaderStyle-CssClass
=
"rgSorted"
ItemStyle-CssClass
=
"rgSorted"
>
</
telerik:GridBoundColumn
>
Code-behind:
(RadGrid1.MasterTableView.GetColumnSafe(
"Record
"
)
as
GridBoundColumn).HeaderStyle.CssClass =
"rgSorted"
;
(RadGrid1.MasterTableView.GetColumnSafe(
"Record
"
)
as
GridBoundColumn).ItemStyle.CssClass =
"rgSorted"
;
If you would like to have custom styles you could set the CssClass for the columns like above to a CSS class that you have defined on the page.
Hope this helps. If you have different requirements or further instructions, please elaborate on your specific scenario and send us sample screenshots or video demonstrating the desired behavior.
Regards,
Viktor Tachev
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Reshma
Top achievements
Rank 1
answered on 23 Dec 2013, 07:47 AM
Hi,
thanks for your reply.
You have got my problem correctly.
I applied your suggestions .now my two column are looking sorted (light yello background_ however arrow image is not there.
How can i get descending arrow image.
attached scrrenshot.
thanks for your reply.
You have got my problem correctly.
I applied your suggestions .now my two column are looking sorted (light yello background_ however arrow image is not there.
How can i get descending arrow image.
attached scrrenshot.
0
Hi Reshma,
I have created a sample RadGrid web site to demonstrate how you can achieve the requested functionality. You will notices that upon sorting the ShipName column, it is actually getting sorted by ShipCountry. Please run the attached application and let me know if it helps you.
Regards,
Eyup
Telerik
I have created a sample RadGrid web site to demonstrate how you can achieve the requested functionality. You will notices that upon sorting the ShipName column, it is actually getting sorted by ShipCountry. Please run the attached application and let me know if it helps you.
Regards,
Eyup
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.