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

SortMemberPath Binding codebehind

1 Answer 12 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Shilpi
Top achievements
Rank 1
Shilpi asked on 28 Apr 2017, 01:52 AM

Hi, 

 

I need to set the property SortMemberPath on a gridView data column, but I don't have SetBinding available.

 

I was hoping to do something like this:

 

 Binding sortBinding = new Binding("PropertyName");
                            sortBinding.Converter = new ConverterName();
                            sortBinding.ConverterParameter = converterParameter;

 

column.SetBinding("SortMemberPath", sortbinding);

 

Please help.

Thanks, Shilpi

 

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 02 May 2017, 10:25 AM
Hi Shilpi,

Setting the SortMemberPath of GridViewColumn in such manner would not be possible as it is not a dependency property. You should be able to set it as follows.
GridViewDataColumn col = new GridViewDataColumn();
            col.SortMemberPath = "PropertyName";

I hope this helps.

Regards,
Stefan X1
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
GridView
Asked by
Shilpi
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or