gridview_RowCreated fires even before Page_Load when posting back to server?

H

hazz

OnClick="btnDelete_Click" , once clicked, fires only after the RowCreated
event listed here. No Checkbox is found and the program aborts. How can I
intercept this event? I want the RowCreated event to fire on form load, but
not first thing after the delete button is clicked. I hope my question is
clear. Thank you. -Greg

GridView_RowCreated(object sender, GridViewRowEventArgs e) {
CheckBox check = (CheckBox)e.Row.FindControl("chkSelect");
if ((check != null) ) {
check.Checked =
Convert.ToBoolean(((SSI.ColumnsForReport)(e.Row.DataItem)).Include_in_Report);
}


void btnDelete_Click(object sender, EventArgs e)
{
After OnClick event is fired I WANT THIS CODE TO BE EXECUTED INSTEAD OF
GridView_RowCreated.
 
H

hazz

oh my...the page directive didn't have CodeFile="MultiSelect.aspx.cs"
Inherits="MultiSelect"

it's firing as it should now and I can use IsPostBack...

-greg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top