Hi
I hav one problem for my Radgrid paging..
while calling the below code the paging or page index changed does not working. As a result i cannot move to next page from my first page displayed as well.
My code snipper is below:
protected void RadGrid1_PreRender(object sender, EventArgs e)
{
RefreshCombos();
}
//To refresh the resultset
private void RefreshCombos()
{
objDA= new ClassDA();
DataTable dt= objDA.GetDetails();
RadGrid1.DataSource =dt;
RadGrid1.MasterTableView.Rebind();
}
I am used the code what ever it is given by the Telerik help page for filtering controls. But it is not working fine while page moving
Thanks
Appu
I hav one problem for my Radgrid paging..
while calling the below code the paging or page index changed does not working. As a result i cannot move to next page from my first page displayed as well.
My code snipper is below:
protected void RadGrid1_PreRender(object sender, EventArgs e)
{
RefreshCombos();
}
//To refresh the resultset
private void RefreshCombos()
{
objDA= new ClassDA();
DataTable dt= objDA.GetDetails();
RadGrid1.DataSource =dt;
RadGrid1.MasterTableView.Rebind();
}
I am used the code what ever it is given by the Telerik help page for filtering controls. But it is not working fine while page moving
Thanks
Appu
5 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 29 Jun 2009, 07:42 AM
Hi Appu,
If you are using inbuilt Paging you do not need to Rebind the Grid in the PreRender event. When you rebind the Grid on each and every PostBack the CurrentPageIndex of the Grid will be set to the first page.
Shinu
If you are using inbuilt Paging you do not need to Rebind the Grid in the PreRender event. When you rebind the Grid on each and every PostBack the CurrentPageIndex of the Grid will be set to the first page.
Shinu
0
Appu
Top achievements
Rank 1
answered on 29 Jun 2009, 07:54 AM
Hi shinu..
Thanx But the filtering will not work suppose we havnt given pre-render event. Thats is the problem i am facing.
Regards,
Appu
Thanx But the filtering will not work suppose we havnt given pre-render event. Thats is the problem i am facing.
Regards,
Appu
0
Shinu
Top achievements
Rank 2
answered on 29 Jun 2009, 08:03 AM
Hi Appu,
Are you trying to implement basic Filtering? If so you just need to bind the Grid using AdvanceDataBinding techniques.
Advanced Data Binding
Shinu
Are you trying to implement basic Filtering? If so you just need to bind the Grid using AdvanceDataBinding techniques.
Advanced Data Binding
Shinu
0
Appu
Top achievements
Rank 1
answered on 29 Jun 2009, 09:24 AM
Hi
I am not using basic filtering instead of i am using the below code
string filterExpression = "";
if (e.Value != "All")
{
filterExpression = "([Firm_name] = '" + e.Value + "')";
}
else
{
filterExpression = "([Firm_name] <> '')";
}
RadGrid1.MasterTableView.FilterExpression = filterExpression;
once ofter the above code is over i cal RefreshCombo function
//To refresh the resultset
private void Refresh()
{
objDataAccess = new DataAccess();
contactsTable = objDataAccess.GetContacts();
RadGrid1.DataSource = contactsTable;
RadGrid1.MasterTableView.Rebind();
}
This all done for my filtering. But i am facing the problem in my tradional grouping and paging. Soon after the filtering is over..
Hope u could understand
Regards,
Appu
I am not using basic filtering instead of i am using the below code
string filterExpression = "";
if (e.Value != "All")
{
filterExpression = "([Firm_name] = '" + e.Value + "')";
}
else
{
filterExpression = "([Firm_name] <> '')";
}
RadGrid1.MasterTableView.FilterExpression = filterExpression;
once ofter the above code is over i cal RefreshCombo function
//To refresh the resultset
private void Refresh()
{
objDataAccess = new DataAccess();
contactsTable = objDataAccess.GetContacts();
RadGrid1.DataSource = contactsTable;
RadGrid1.MasterTableView.Rebind();
}
This all done for my filtering. But i am facing the problem in my tradional grouping and paging. Soon after the filtering is over..
Hope u could understand
Regards,
Appu
0
Hello Appu,
You don't need to set the filtering expression on every postback because this resets the page index. This way you can't reach the second page at all (as already mentioned by Shinu).
Regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
You don't need to set the filtering expression on every postback because this resets the page index. This way you can't reach the second page at all (as already mentioned by Shinu).
Regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.