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. C#
  4. Windows DataGrid Event Notification

Windows DataGrid Event Notification

Scheduled Pinned Locked Moved C#
cssquestion
2 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.
  • S Offline
    S Offline
    Subrahmanyam K
    wrote on last edited by
    #1

    I would like to increase the height of the rows in the datagrid whenever data is binded to the grid. So, How do I get the notification whenever the datagrid is binded to a Datasource. The DataSourceChanged event occurs only when there is a change in the DataSources value. When I bind the same datasource to the datagrid, the DataSourceChanged event won't fire. How can this be handled. Thanks in advance. Subrahmanyam K

    M 1 Reply Last reply
    0
    • S Subrahmanyam K

      I would like to increase the height of the rows in the datagrid whenever data is binded to the grid. So, How do I get the notification whenever the datagrid is binded to a Datasource. The DataSourceChanged event occurs only when there is a change in the DataSources value. When I bind the same datasource to the datagrid, the DataSourceChanged event won't fire. How can this be handled. Thanks in advance. Subrahmanyam K

      M Offline
      M Offline
      microsoc
      wrote on last edited by
      #2

      hi Subrahmanyam K! :) try to shadow the DataSource property, like this:

      public new object DataSource
      {
      	get {return base.DataSource;}
      	set 
                  {
                      //do something here
                      base.DataSource = value;
                  }
      }
      

      hope that helps! :) microsoc :cool:

      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