Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. making the column readonly

making the column readonly

Scheduled Pinned Locked Moved Visual Basic
databasequestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RAJWANTMISHRA
    wrote on last edited by
    #1

    I used dataset and sqldataAdapter to retreive data from the sql database , I want to make few column of the database which are shown in the datagrid to be read only . how can i do this ? And which event should i use in order to validate the datagrid's entered data for each cell, and how it can be done?

    Rajwant Mishra

    J 1 Reply Last reply
    0
    • R RAJWANTMISHRA

      I used dataset and sqldataAdapter to retreive data from the sql database , I want to make few column of the database which are shown in the datagrid to be read only . how can i do this ? And which event should i use in order to validate the datagrid's entered data for each cell, and how it can be done?

      Rajwant Mishra

      J Offline
      J Offline
      Janani Divya
      wrote on last edited by
      #2

      I want to make few column of the database which are shown in the datagrid to be read only . how can i do this ? --->Use this : grid.Columns(2).ReadOnly = True --->U want to specify the column number here. And which event should i use in order to validate the datagrid's entered data for each cell, and how it can be done? --->Use CellValidating event in the datagrid property.

      Janani

      R 1 Reply Last reply
      0
      • J Janani Divya

        I want to make few column of the database which are shown in the datagrid to be read only . how can i do this ? --->Use this : grid.Columns(2).ReadOnly = True --->U want to specify the column number here. And which event should i use in order to validate the datagrid's entered data for each cell, and how it can be done? --->Use CellValidating event in the datagrid property.

        Janani

        R Offline
        R Offline
        RAJWANTMISHRA
        wrote on last edited by
        #3

        i am using vb.net 2003 it is not there with this vb.net I can use this event with datatable.column(index).readonly=true but i am not able bind the datatable directly as i am fetching data from two table and giving the datagrid direcly using the dataset, by using datatable first i have to set it`s datasource to the result obtained by the query , and then i have to set the source of datagrid to datatable but i am not able do this with my app. it does not give any error but result in grid is empty....help lsss here... again that cell changing event is also not here ,i want to validate each entry before filling it into the database so which is the right way to do this ? is there is any way in which i can achive my goal?

        Rajwant Mishra

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups