PC Review


Reply
Thread Tools Rate Thread

Added CheckBox to a DataGrid Doesn't work with DataGrid.Enabled=False

 
 
Amar
Guest
Posts: n/a
 
      6th Apr 2004
I have created a Template Column and Added to a Datagrid, which
contains a checkBox. The column is not Binded to any column of the
Dataset, but is an extra one so i can retrieve on Save Button which
rows are selected and make the necessary work. The problem is that my
page has 3 states. The 1 one is when form is first loaded. When i
click the Save button the Page goes to state 2 and the DataGrid must
become Enabled = false, in order to ask from the user a confirmation
about the data, and finally when Save button is clicked again the
transaction must take place. At that point when i try to determine
which check boxes are selected through (which is correct):

foreach(DataGridItem mItem in CAssigned.Items){
CheckBox mBox = (CheckBox)cItem.Cells[CAssigned.GetCheckBoxColumnIndex()].Controls[0];
if (mBox.Checked){
countCheckBox ++;
}
}
all the checkboxes are unselected.

WHEN i don't make DataGrid Enabled = false and leave it always enabled
i get always the correct values at the 3rd state of my form. Maybe
something is going wrong with Enabled property of the DataGrid?

Please Help!.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
datagrid.RowHeaderVisible=false doesn't work BVM Microsoft Dot NET Framework Forms 0 20th Jul 2006 01:19 AM
OnSelectedIndexChanged event does not work with the selection on the checkbox ( on the cell of Datagrid control ) ? bienwell Microsoft ASP .NET 2 9th Mar 2005 02:33 PM
TabControl1.TabPages(2).Enabled = false doesn't work either? Will Freeman Microsoft VB .NET 2 21st Jul 2004 05:12 AM
CheckBox template always evaluate to False even if checked in a DataGrid hosted inside a TabStrip mehul Microsoft ASP .NET 0 3rd May 2004 01:07 PM
Why visible=false only work sometimes on datagrid? Adam Smith Microsoft ASP .NET 3 21st Apr 2004 12:20 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:49 AM.