Click here to Skip to main content
11,633,983 members (73,221 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET VB.NET
While clicking the button in datagrid header, i will open a model PopUp window and get the input data and then close the window.
then in Parent window the link button is posted back through javascript.
at that time Page will perform the Page_Load Event and then triggers the checkbox checkedChanged Event(The CheckBox is Placed outside the DataGrid) and
then executes the linkbutton command (i.e DataGrid_ItemCommand Event).


Here i don't want to execute the checkbox checkedChanged.
guide me to solve this problem.
Posted 26-Dec-12 2:43am
Comments
Zafar Sultan at 26-Dec-12 9:09am
   
Are you calling your checkbox checkedChanged event inside page load event?
sasi prabhu at 27-Dec-12 0:13am
   
No i'm not calling the checkedchange event in page load.
VishwaKL at 26-Dec-12 23:08pm
   
Dont give auto poat back property to check box
sasi prabhu at 27-Dec-12 0:12am
   
I need Checkbox checkedchanged event to be triggered on clicking the checkbox which can done by setting auto post back property to true.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

suppose your checkbox id is chkBox.

string controlname = this.Request.Params.Get("__EVENTTARGET");
 
if(controlname  == "chkBox")
{
//Call your checkbox changed event here.
}

This condition will check if the postback is initiated by your checkbox. If any other control is initiating the postback your checkboxchanged event will not fire.

Hope it helps.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 8,758
1 Sergey Alexandrovich Kryukov 8,264
2 Mika Wendelius 6,755
3 F-ES Sitecore 2,344
4 Suvendu Shekhar Giri 2,095


Advertise | Privacy | Mobile
Web03 | 2.8.150728.1 | Last Updated 27 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100