Click here to Skip to main content
12,767,637 members (52,083 online)
Rate this:
Please Sign up or sign in to vote.
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 3:43am
Zafar Sultan 26-Dec-12 9:09am
Are you calling your checkbox checkedChanged event inside page load event?
VishwaKL 26-Dec-12 23:08pm
Dont give auto poat back property to check box
sasi prabhu 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.
sasi prabhu 27-Dec-12 0:13am
No i'm not calling the checkedchange event in page load.

1 solution

Rate this: bad
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.

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170217.1 | Last Updated 27 Dec 2012
Copyright © CodeProject, 1999-2017
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