How to check for the checked status of a checkbox in windows datagrid vb.net 2003?

vb , dotnet , 2003 Bangalore, India
  • 12 years ago
    i need create a checkbox column for an existing datagrid at runtime.Then for the records which user selects from datagrid items by selecting the checkbox, that records will be updated with some user defined values in database.My problem is how to check for checked state of checkbox in vb.net 2003 windows application. thanks chandru
  • 12 years ago
    for just event handling of checking use ColumnCheckedValueChanged, and for late check of value try to use directly value of subordinate datatable
  • 12 years ago
    actually i need to select a multiple records through checking corresponding checkboxex.but don't know the code for it.can u guide me. thank you
  • 12 years ago
    and for what purpose, somehow in middle detail
  • 12 years ago
    first i'm fetching some records from database using sql query into a datagrid. then among the listed records for some particular records i need to change the data of a field in database corresponding to these rows. pls refer the code...as i exactly don't know how to do it Dim c As CheckBox c = ds1.Tables("MasterTaskDetails").Columns("checkb").ExtendedProperties.Item(i) If c.Checked = True Then MessageBox.Show("checked") '''''''database update code goes here End If but eventhough i'm selecting a record in datagrid, c.checked always displays false...
  • 12 years ago
    I suppose you need "immediate edit" ... or would you welcome updating a database just before exit for, or with some big blue save all button :)
  • 12 years ago
    ***"exit form"
  • 12 years ago
    after selecting multiple records through some button click event i will update the database. pls tell me how to check for the check state of the selected rows. i have checkbox column name as "checkb".
  • 12 years ago
    If [this](http://quilt.ic.cz/tmp/devfus/datagrid_checkbox_override.rar) was not what would moved you over, we can continue to find some more intrinsic solution
  • 12 years ago
    :) or you can move over and if you just found some natural way to do this trick you could tell me, I would be interested...
  • 12 years ago
    i'm nowhere finding how to do this task.k anyway thanks for ur help.
  • 12 years ago
    I am bit confused with DatagridTextBoxCell and its beginedit and endedit events... because it is really something different to how CheckBox works... endedit basically confirmed all value of datagrid to dataset, and this set then passed to adapter updated db... I am also bit lost, while it is long time I have worked with grids...

    good luck
  • 12 years ago
    hi can u giv me solution to my question posted- its urgent the post abt dropdownlist with image icons as listitems - by kishore
  • 12 years ago
    hi can u giv me solution to my question posted- its urgent the post abt dropdownlist with image icons as listitems - by kishore
  • 12 years ago
    check out pages of Mick Doherty, dotnetrix.com regards, matej

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“A computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are, in short, a perfect match” - Bill Bryson