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

Beginner Radgrid basic sorting

1 Answer 41 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Madhan
Top achievements
Rank 1
Madhan asked on 28 Aug 2012, 02:40 AM

I am new to telerik components. I have a telerik radgrid that retrieve data from sql server data source and does basic sorting. That sorting  does not work after I preserve radCombo values in server-side and put the radgrid code in !Ispostback(). I am aware that when grid header column is clicked for sorting, that time data gets posted back now and that is why the sorting is not working.  How to solve this issue and I don't want to take off the radgrid.datasource in page_load !Isposback().

 

if (!IsPostBack){
RadGrid1.Datasource = DataTable("select * from customer");
RadGrid1.DataBind();
}

 

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 28 Aug 2012, 05:36 AM
Hi Madhan,

Sorting causes PostBack.Since you are binding the RadGrid in PageLoad and only at the first time ,the RadGrid wont bind for the second postback(ie when sorting).Sorting works fine when the RadGrid is bound with Advanced Data-binding (using NeedDataSource event).

Thanks,
Shinu.
Tags
General Discussions
Asked by
Madhan
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or