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

Client Site Function on the Page Size Change click

2 Answers 31 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chamira
Top achievements
Rank 1
Chamira asked on 22 Sep 2008, 05:58 PM
http://img158.imageshack.us/img158/9194/dddjo8.jpg

I want to have a confirmation window which prompts the user to say
"All selected rows will be deselected once clicked"

is there a way i can do this??

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 1
answered on 23 Sep 2008, 05:21 AM
Hello Chamira,

Check out the following code to show a confirmation message on clicking the pager item.
cs:
 protected void RadGrid1_PreRender(object sender, EventArgs e) 
    { 
        foreach (GridPagerItem pagerItem in RadGrid1.MasterTableView.GetItems(GridItemType.Pager)) 
        { 
            LinkButton changeButton = (LinkButton)pagerItem.FindControl("LinkButton1"); 
            linkButton.Attributes.Add("OnClick", "ClientClick();"); 
        } 
    } 

js:
<script type="text/javascript"
   function ClientClick() 
   { 
     confirm("All selected rows will be deselected once clicked. Do you wish to continue?"); 
   }  
</script>   

Thanks
Princy.
0
Chamira
Top achievements
Rank 1
answered on 24 Sep 2008, 02:47 AM
Thanks a lot princy ... da only modification i had to do was change the control name..


 protected void SearchRadGrid_PreRender(object sender, EventArgs e) 
    { 
        foreach (GridPagerItem pagerItem in SearchRadGrid.MasterTableView.GetItems(GridItemType.Pager)) 
        { 
            
                LinkButton changeButton = (LinkButton)pagerItem.FindControl("ChangePageSizeLinkButton"); 
                changeButton.Attributes.Add("OnClick""ClientClick();"); 
            
        }  
    } 


thanks again princy...

Tags
Grid
Asked by
Chamira
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Chamira
Top achievements
Rank 1
Share this question
or