| | |
Checkbox in Datagridview
Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Nov 2008
Posts: 34
Reputation:
Solved Threads: 0
Hi friends
I am working in vb.net ,there is i have a form in which i have a datagridview,& a column of checkbox in tat datagridview,when this datagridview becomes load, that checkes theb employee is present or absent if present so the check box of that perticular row must be checked true else checked false,for this i did
dim chk as checkbox
if condition that
chk.checked=true
else
chk.checked=false
end if
but it giving me a error message "object refrence not set"
please help me to solve this problem
I am working in vb.net ,there is i have a form in which i have a datagridview,& a column of checkbox in tat datagridview,when this datagridview becomes load, that checkes theb employee is present or absent if present so the check box of that perticular row must be checked true else checked false,for this i did
dim chk as checkbox
if condition that
chk.checked=true
else
chk.checked=false
end if
but it giving me a error message "object refrence not set"
please help me to solve this problem
Are you adding checkboxes to datagrid at runtime?
If not, then
"object reference not set"-error comes from declaring an object
VB.NET Syntax (Toggle Plain Text)
Dim chk As New DataGridViewCheckBoxCell If condition Then chk.Value = True Else chk.Value = False End If ' Add checkbox control to datagrid DataGridView1.Item(0, 0) = chk
VB.NET Syntax (Toggle Plain Text)
If condition Then DataGridView1.Item(0, 0).Value = True Else DataGridView1.Item(0, 0).Value = False End If
dim chk as checkbox but not creating the instance, like dim chk as New checkbox Teme64 @ Windows Developer Blog
![]() |
Similar Threads
- how to trap the values of a particular row in datagridview (C#)
- Checkbox in DataGridView (VB.NET)
- Checkbox Value in DataGridView (VB.NET)
- checkbox in datagridview c# (C#)
Other Threads in the VB.NET Forum
- Previous Thread: status strip
- Next Thread: Date/Time Stamped and Numbered filenames when saving to jpeg?
| Thread Tools | Search this Thread |
.net .net2008 2008 access account advanced application array basic beginner browser button buttons center click code combo cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic excel exists fade filter forms generatetags gridview html images input insert intel internet listview map mobile module monitor msaccess net number objects open panel passingparameters pdf picturebox picturebox2 port position print printing problem regex right-to-left save search searchvb.net select serial settings shutdown socket sqldatbase sqlserver survey table temperature textbox timer timespan transparency txttoxmlconverter update user usercontol vb vb.net vb.netformclosing()eventpictureboxmessagebox vba vbnet visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web winforms wpf wrapingcode xml year





