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

[Solved] paging on radgrid causing validation?

3 Answers 182 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Caroline
Top achievements
Rank 1
Caroline asked on 19 Jun 2009, 10:14 AM
Hello

Could someone tell me if there is a way of setting causesvalidation=false to the paging on a radgrid, the page numbers seems ok, but when i change the page size it is validating other text boxes on the page.  Is there a way round this?

Many thanks

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 19 Jun 2009, 10:58 AM
Hi Caroline,

For more information about how to set CausesValidation property to false on the RadGrid Pager, please refer to the following help article:
http://www.telerik.com/help/aspnet-ajax/grdcustomizingthepager.html

Greetings,
Pavlina
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.
0
Caroline
Top achievements
Rank 1
answered on 19 Jun 2009, 11:01 AM
thanks very much Pavlina, i'll take a look.
0
Princy
Top achievements
Rank 2
answered on 19 Jun 2009, 11:22 AM
Hello Caroline,

You can actually access the combobox in the pager row and then set its CausesValidation property to false as suggested above. Check out the code below:
c#:
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridPagerItem) 
        { 
            GridPagerItem pager = (GridPagerItem)e.Item; 
            RadComboBox combo = (RadComboBox)pager.FindControl("PageSizeComboBox"); 
            combo.CausesValidation = false
        } 
    } 

-Princy.
Tags
Grid
Asked by
Caroline
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Caroline
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or