473,799 Members | 3,001 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Data Grid Check box problem

I have a checkbox in a data grid that does not change it's state until I
actually leave the field. I've done this routine several times in other data
grids without an issue.

I'm using VB.2003.

Steve
Oct 26 '06 #1
1 1973
Strange thing; I moved the column to another column and it works as
expected. I really need the column where I had it before.

I move the column from the last column to the first to make it work.

Here is the code:
'

' Create GridColumnStyle objects for the grid columns

'

Dim aCol1 As New DataGridTextBox Column

Dim aCol1a As New DataGridTextBox Column

Dim aCol2 As New DataGridTextBox Column

Dim aCol3 As New DataGridTextBox Column

Dim aCol5 As New DataGridTextBox Column

Dim aCol6 As New DataGridTextBox Column

Dim aCol7 As New DataGridTextBox Column

Dim aCol8 As New DataGridTextBox Column

Dim aCol9 As New DataGridTextBox Column

Dim aCol10 As New DataGridTextBox Column

Dim aCol11 As New DataGridTextBox Column

Dim aCol11a As New DataGridTextBox Column

Dim aCol12 As New DataGridTextBox Column

Dim aCol13 As New DataGridTextBox Column

Dim aCol14 As New DataGridTextBox Column

Dim aCol15 As New DataGridBoolCol umn

'

' Set column's caption, width and disable editing.

'

With aCol1

..HeaderText = "Product SKU"

..MappingName = "ProductSKU "

..Width = 65

..Alignment = HorizontalAlign ment.Left

..TextBox.Enabl ed = False

End With

With aCol1a

..HeaderText = "Descriptio n"

..MappingName = "InvoiceDescrip ton"

..Width = 203

..Alignment = HorizontalAlign ment.Left

..TextBox.Enabl ed = False

End With

With aCol2

..MappingName = "CurrentRNB "

..HeaderText = "Cur RNB"

..Width = 54

..Alignment = HorizontalAlign ment.Right

..Format = "c"

..TextBox.Enabl ed = False

End With

With aCol3

..MappingName = "FutureRNB"

..HeaderText = "Fut RNB"

..Width = 54

..Alignment = HorizontalAlign ment.Right

..Format = "c"

..TextBox.Enabl ed = False

End With

With aCol5

..MappingName = "RNBPctchg"

..HeaderText = "RNB % Chg"

..Width = 66

..Alignment = HorizontalAlign ment.Right

..Format = "p"

..TextBox.Enabl ed = False

End With

With aCol6

..MappingName = "CurrentPal let"

..HeaderText = "Cur Pallet"

..Width = 56

..Alignment = HorizontalAlign ment.Right

..Format = "c"

..TextBox.Enabl ed = False

End With

With aCol7

..MappingName = "FuturePall et"

..HeaderText = "Fut Pallet"

..Width = 56

..Alignment = HorizontalAlign ment.Right

..Format = "c"

..TextBox.Enabl ed = False

End With

With aCol8

..MappingName = "DollarChangePa llet"

..HeaderText = "Pallet $ Chg"

..Width = 75

..Alignment = HorizontalAlign ment.Right

..Format = "c"

..TextBox.Enabl ed = False

End With

With aCol9

..MappingName = "PalletPctc hg"

..HeaderText = "Pal % Chg"

..Width = 60

..Alignment = HorizontalAlign ment.Right

..Format = "p"

..TextBox.Enabl ed = False

End With

With aCol10

..MappingName = "SuggestedD IY"

..HeaderText = "MSRP"

..Width = 55

..Alignment = HorizontalAlign ment.Right

..Format = "c"

..TextBox.Enabl ed = False

End With

'With aColxx

'.MappingName = "SuggestedContr actor"

'.HeaderText = "S/R Contr"

'.Width = 68

'.Alignment = HorizontalAlign ment.Right

'.Format = "c"

'.TextBox.Enabl ed = False

'End With

With aCol11a

..MappingName = "ReplacementCos t"

..HeaderText = "Store Cost*"

..Width = 70

..Alignment = HorizontalAlign ment.Right

..Format = "c"

..TextBox.Enabl ed = True

End With

With aCol12

..MappingName = "StoreCost"

..HeaderText = "Cost w/Tint*"

..Width = 73

..Alignment = HorizontalAlign ment.Right

..Format = "c"

..TextBox.Enabl ed = True

End With

With aCol13

..MappingName = "StoreRetai l"

..HeaderText = "Store Retail*"

..Width = 73

..Alignment = HorizontalAlign ment.Right

..Format = "c"

..TextBox.Enabl ed = True

End With

With aCol14

..MappingName = "DesiredMar gin"

..HeaderText = "Margin*"

..Width = 55

..Alignment = HorizontalAlign ment.Right

..Format = "p"

..TextBox.Enabl ed = True

End With

With aCol15

..MappingName = "OmitFlag"

..HeaderText = "Omit*"

..Width = 35

..AllowNull = False

..NullValue = False

..Alignment = HorizontalAlign ment.Center

End With

'

' Add the GridColumnStyle s to the DataGrid's Column Styles collection.

'

With aGridTableStyle .GridColumnStyl es

..Add(aCol15)

..Add(aCol1)

..Add(aCol1a)

..Add(aCol2)

..Add(aCol3)

..Add(aCol5)

..Add(aCol6)

..Add(aCol7)

..Add(aCol8)

..Add(aCol9)

..Add(aCol10)

'.Add(aCol11)

..Add(aCol11a)

..Add(aCol12)

..Add(aCol13)

..Add(aCol14)

End With

'

' Add the GridColumnStyle s to the aGridTableStyle .

'

DataGrid1.Table Styles.Add(aGri dTableStyle)

DataGrid1.Curre ntCell = New DataGridCell(0, 10)

'DataGrid1.Data Source.DefaultV iew.AllowNew = False

HoldValue = DataGrid1.Item( 0, 10)
Steve
"Stephen Plotnick" <sp*******@grou pcbf.comwrote in message
news:_8******** *************** *******@giganew s.com...
>I have a checkbox in a data grid that does not change it's state until I
actually leave the field. I've done this routine several times in other
data grids without an issue.

I'm using VB.2003.

Steve

Oct 26 '06 #2

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

Similar topics

2
4882
by: Jordan O'Hare | last post by:
Hello Everyone, I am after some help with the following: I have a windows application that contains a list box and two data grids. All three controls are binded to a dataset that contains five tables, and three relations that I want to take advantage of. Everything works fine however I want to use the data grid table style editor to make it look more presentable. Currently I have successfully done this
12
2393
by: pmud | last post by:
Hi, I am using teh following code for sorting the data grid but it doesnt work. I have set the auto generate columns to false. & set the sort expression for each field as the anme of that field... This grid displayes results based on users search.. public static int numberDiv; private void Page_Load(object sender, System.EventArgs e) {
3
4096
by: Snake | last post by:
I have a vb .net program which fills a data grid upon form load from an acccess database. This works great. Now, I have to add a combo box and use it to alter the underlying sql statement and re-fill the data grid. I have never done this before, but I created a new sql statement in strSql from the combobox, update the data adapter, and try to fill the data grid. The program halts on the Fill with no particular explanation or complaint...
2
1805
by: Gary | last post by:
Hello All, I have an editable data grid in my web form, this grid allows the user to add new records, edit existing records and also delete them. When a user adds a record the grid goes in to edit mode and four text boxes appear, one is for the start date, another for an end date and the other two are for other data, the user fills in the fields and saves the data, all is great at this point, an entry is added ok. However the problem I...
2
2312
by: pmud | last post by:
Hi, I am exporting data from an EDITABLE DATA GRID EXCEL. But the 1st column in data grid is Edit Column. I want to display all columns in Excel except for the Edit column. The following code which I am using allows exporting only from text data from data grid & not from Edit columns which are link buttons. How to leave this column while displaying data from data grid in Excel?
4
1682
by: GFM GToeroe | last post by:
Hi! Actually I have to solve the following problems: Given is a dynamic set S of (moving, vanishing and arising) points (2D). It could be the case that |S|>100 or even >1000 but not >20000. In general almost all of the current members of S are moving all the time. For a single point p of S I want to find
1
2101
by: David Veeneman | last post by:
How do I get the data bindings for a control that is bound at design time? I'm binding a DataGridView control to a data source at design time, using a BindingSource control. I set the grid's DataSource property to the BindingSource control, which the Data Source Configuration Wizard created for me. The data binding works fine when I run the app, but I can't get a reference to the DataGridView's data bindings.
9
4029
by: Anil Gupte | last post by:
After reading a tutorial and fiddling, I finally got this to work. I can now put two tables created with a DataTable class into a DataRelation. Phew! And it works! Dim tblSliceInfo As New DataTable("SliceInfo") Dim tblSliceRatings As New DataTable("SliceRatings") '.... All the adding datacolumns, datarows, etc. goes here.. DatasetInit.Tables.Add(tblSliceInfo)
4
2568
by: =?Utf-8?B?UmludSBHb3BhbGFrcmlzaG5hIFBpbGxhaQ==?= | last post by:
Hi All, I have an application that fetch data thru a store proc and display in a datagrid, but after successful execution of proc the data grid is not visible.Please go thru the following code and plz let me know what is missing.The data grid propertiy "Visible is true". try { OracleDataAccess oracleDA = new OracleDataAccess("Data
1
2064
by: sai dev | last post by:
Hi, I am facing problem in following scenario for WinForm Data Grid. Scenario --------- -- DepartNumber DepartmentName + 10 HR + 20 Sales
0
9688
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10491
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10268
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10031
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9079
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7571
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6809
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4146
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.