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. DataGrid

DataGrid

Scheduled Pinned Locked Moved C#
cssquestion
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
    ramdil
    wrote on last edited by
    #1

    Hi all I am working with datagrid of 2005.I have 10 rows in it.It has three columns. Id,Name,ParentId Now my scenario is that if first records id is the parent id for all other 9 records, i need to select entire rows.for that i was using grid.select property but its not working,means its not getting selected i am giving the partial code..can anyone give me what is gng wrong in this code Advnaced thanks for (int tmpCnt = 0; tmpCnt < AuthorisedTable.Rows.Count; tmpCnt++) { //if (dataGridAuthorised.IsSelected(tmpCnt) )// if (AuthorisedTable.Rows[tmpCnt]["Type"].ToString()=="Meeting") { string tmpOtherID = (AuthorisedTable.Rows[tmpCnt]["EventId"].ToString()); for (int tmpRace = 0; tmpRace < AuthorisedTable.Rows.Count; tmpRace++) { if (AuthorisedTable.Rows[tmpRace]["OtherID"].ToString() == tmpOtherID) { this.dataGridAuthorised.Select(tmpRace); } } } }

    Regards DilipRam

    I 1 Reply Last reply
    0
    • R ramdil

      Hi all I am working with datagrid of 2005.I have 10 rows in it.It has three columns. Id,Name,ParentId Now my scenario is that if first records id is the parent id for all other 9 records, i need to select entire rows.for that i was using grid.select property but its not working,means its not getting selected i am giving the partial code..can anyone give me what is gng wrong in this code Advnaced thanks for (int tmpCnt = 0; tmpCnt < AuthorisedTable.Rows.Count; tmpCnt++) { //if (dataGridAuthorised.IsSelected(tmpCnt) )// if (AuthorisedTable.Rows[tmpCnt]["Type"].ToString()=="Meeting") { string tmpOtherID = (AuthorisedTable.Rows[tmpCnt]["EventId"].ToString()); for (int tmpRace = 0; tmpRace < AuthorisedTable.Rows.Count; tmpRace++) { if (AuthorisedTable.Rows[tmpRace]["OtherID"].ToString() == tmpOtherID) { this.dataGridAuthorised.Select(tmpRace); } } } }

      Regards DilipRam

      I Offline
      I Offline
      il_masacratore
      wrote on last edited by
      #2

      Try to replace the this.dataGridAuthorised.Select(tmpRace); to this.dataGridAuthorised.Rows[tmpRace].Selected=true; And check the selection mode property.

      Visit my blog at http://dotnetforeveryone.blogspot.com/

      R 1 Reply Last reply
      0
      • I il_masacratore

        Try to replace the this.dataGridAuthorised.Select(tmpRace); to this.dataGridAuthorised.Rows[tmpRace].Selected=true; And check the selection mode property.

        Visit my blog at http://dotnetforeveryone.blogspot.com/

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

        Hi thanks for the reply, but i am not getting dataGridAuthorised.Rows property Any idea

        Regards DilipRam

        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