473,549 Members | 5,196 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Added CheckBox to a DataGrid Doesn't work with DataGrid.Enable d=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(DataGri dItem mItem in CAssigned.Items ){
CheckBox mBox = (CheckBox)cItem .Cells[CAssigned.GetCh eckBoxColumnInd ex()].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 1270

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

Similar topics

0
249
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 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...
4
3566
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 when the text box Enable property set to TRUE retains the value. Please advice. -Gill
4
1900
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. Now I have a module called my_custom_set_txt_box_properties and in
3
3675
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 another color and want it to remain blue, not grey. How do I avoid this? regards reidarT
2
2186
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
1776
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
1678
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" runat="server" Width="70%" Rows="4" TextMode="MultiLine"></asp:TextBox> I used the ontextChnaged event private void onchange(object sender,...
0
1076
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 javascript. When I run the project, the button is disabled, but the onclientclick is gone as well. But if I set the Enabled = true in the designer and...
2
14133
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 not see any property that looked like ReadOnly. Any suggestions appreciated. Thanks, Rich
1
9037
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 grayed-out. what is the best way to make it look disabled like a disabled textbox?
0
7455
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7723
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7480
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7814
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6050
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5092
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3504
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3486
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1063
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.