473,387 Members | 1,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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!.
Nov 18 '05 #1
0 1253

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Amar | last post by:
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...
4
by: Gill Smith | last post by:
After setting the web control text box enable property to FALSE makes the control to loose the data between round trip. I am making sure that the property - EnableViewState = TRUE. Same code...
4
by: David Eadie | last post by:
G'Day all, Ok I have form1 and lets say it has a textbox on it called textbox1.text. Now in that form1_load sub I have a command that says: my_custom_set_txt_box_properties.disabletextbox....
3
by: ReidarT | last post by:
I use a label to write some help-text in a web-form. I don't want the user to be able to click in this field so I have disabled it, enable = false. The text color turns grey. I use a cssclass with...
2
by: Rob | last post by:
When you set the enabled property of a text box to False... it is shaded so much that it is hard to read... any suggestions.
1
by: Bruno | last post by:
Hello, When I use a listview and I set enabled = False,, BackColor is grey, and I can't change It. I found on the net lots of same problem, but without answers. Please help me...
7
by: Patrick.O.Ige | last post by:
I have a textbox and a submit button on a page, I want the user to type in some characters before i enable or make the submit button visible <asp:TextBox id="txt" autopostback="true"...
0
by: =?Utf-8?B?SlA=?= | last post by:
Is this a bug is VS 2005: I have a Button with the Enabled = false in the designer. This same button also has an onClientClick function that executes later when I set the enabled = true via...
2
by: =?Utf-8?B?UmljaA==?= | last post by:
How can I make a checkbox control ReadOnly - can't check or uncheck without having to set the Enabled Property to False? VB2005 I looked at the property sheet for the Checkbox control but did...
1
nev
by: nev | last post by:
when i do... dgv.enabled = false dgv gets disabled as in you are unable to use the control. but it looks enabled because its appearance is still the same. Unlike a textbox which becomes...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.