D
Doldrums
I have a GridView on my Asp.net page where I've added a TemplateField
that contains a CheckBox.
The idea is that a user can checkmark which records they want and then
click a "Submit" button. I want to take action in the PostBack for the
records that they selected.
My problem is that on the PostBack the GridView.Rows.Count = 0. Any
ideas how I am suppossed to read what checkboxes are checked?
-------
A little more information:
* AutoGenerateColumns="false".
* EnableSortingAndPagingCallbacks="false"... since I have a
TemplateField.
* I create the TemplateField in the aspx page.
* I create all other fields prior to DataBinding in the OnInit().
* GridView is bound to a SqlDataSource in the OnInit().
* I do NOT load or DataBind if the Page is a PostBack.
* Grid loads all the records fine when !Page.IsPostBack (44 Rows).
* I set a breakpoint in OnInit, PageLoad, and my Button_Click event.
The Rows are always = 0.
I've tried removing the TemplateField and setting
EnableSortingAndPagingCallbacks="true"... but still no luck.
I'm hoping my brain is just fried and I am missing something simple!
PLEASE help.
Thanks,
Hugh O'Donnell
that contains a CheckBox.
The idea is that a user can checkmark which records they want and then
click a "Submit" button. I want to take action in the PostBack for the
records that they selected.
My problem is that on the PostBack the GridView.Rows.Count = 0. Any
ideas how I am suppossed to read what checkboxes are checked?
-------
A little more information:
* AutoGenerateColumns="false".
* EnableSortingAndPagingCallbacks="false"... since I have a
TemplateField.
* I create the TemplateField in the aspx page.
* I create all other fields prior to DataBinding in the OnInit().
* GridView is bound to a SqlDataSource in the OnInit().
* I do NOT load or DataBind if the Page is a PostBack.
* Grid loads all the records fine when !Page.IsPostBack (44 Rows).
* I set a breakpoint in OnInit, PageLoad, and my Button_Click event.
The Rows are always = 0.
I've tried removing the TemplateField and setting
EnableSortingAndPagingCallbacks="true"... but still no luck.
I'm hoping my brain is just fried and I am missing something simple!
PLEASE help.
Thanks,
Hugh O'Donnell