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. Web Development
  3. ASP.NET
  4. help in coding /query for disbaling

help in coding /query for disbaling

Scheduled Pinned Locked Moved ASP.NET
cssdatabasehelpquestion
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.
  • S Offline
    S Offline
    svknair
    wrote on last edited by
    #1

    i have a table with fiELds pARTICULARS , MA, ME, MD, MV, MF, MP (CHAR 1) electronics a e v plastics e d rubber a e d v f p this table is displayed in a grid i need to disable that cell of the grid which is blank at present i have i execute the query with a datareader For I = 0 To grid1.Rows.Count - 1 qry="select particulars from table" if datareader("ma")="" then disable the cell end if if datareader("me")="" then disable the cell end if if datareader("md")="" then disable the cell end if next i am not getting the desired thing . how do i exceute it

    S 1 Reply Last reply
    0
    • S svknair

      i have a table with fiELds pARTICULARS , MA, ME, MD, MV, MF, MP (CHAR 1) electronics a e v plastics e d rubber a e d v f p this table is displayed in a grid i need to disable that cell of the grid which is blank at present i have i execute the query with a datareader For I = 0 To grid1.Rows.Count - 1 qry="select particulars from table" if datareader("ma")="" then disable the cell end if if datareader("me")="" then disable the cell end if if datareader("md")="" then disable the cell end if next i am not getting the desired thing . how do i exceute it

      S Offline
      S Offline
      sekannak
      wrote on last edited by
      #2

      Hi, How you are binding to gridview, means what am asking is are you using any itemtemplate inside gridview ???????????????

      kannak

      S 1 Reply Last reply
      0
      • S sekannak

        Hi, How you are binding to gridview, means what am asking is are you using any itemtemplate inside gridview ???????????????

        kannak

        S Offline
        S Offline
        sekannak
        wrote on last edited by
        #3

        Hi, The Following code in Inline code, The Following code from code behind in gridview_rowdatabound(), If e.Row.RowType = DataControlRowType.DataRow Then txt1 = CType(e.Row.FindControl("txttmp1"), TextBox) txt2 = CType(e.Row.FindControl("txttmp2"), TextBox) txt3 = CType(e.Row.FindControl("txttmp3"), TextBox) Dim s1 = txt1.Text Dim s2 = txt2.Text Dim s3 = txt3.Text If s1 = "" Then CType(e.Row.FindControl("txttmp1"), TextBox).Enabled = False ElseIf s2 = "" Then CType(e.Row.FindControl("txttmp2"), TextBox).Enabled = False ElseIf s3 = "" Then CType(e.Row.FindControl("txttmp3"), TextBox).Enabled = False End If End If i hope this will works fine....

        kannak

        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