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. LINQ
  4. Binding checkbox in grid with true/false from backend

Binding checkbox in grid with true/false from backend

Scheduled Pinned Locked Moved LINQ
databasecsharpcsswpfwcf
1 Posts 1 Posters 2 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.
  • B Offline
    B Offline
    balaji t
    wrote on last edited by
    #1

    hi folks, Gud eveng.. Ive created a stored proc in SQL which contains a SELECT query.i return the resultset in a object using LINQ and bind it to the grid.There is a boolean column by name "chk" in the query and in the .aspx ive mentioned like Checked='<%# bool.Parse(DataBinder.Eval(Container.DataItem,"chk"))%>' when i run "chk" column is not getting binded in the checkbox controls in the grid.im getting specified cast is not valid..Can any1 clarify what shud be done to solve this issue? sample code: UI --- var GetTestForClient = TestClusterBAL.DAGetTestForClient(Clientid); GVcomm.DataSource = GetTestForClient ; Gvcomm.DataBind(); DAL --- public static object DAGetTestForClient(int Clientid) { try { DCDataLinqDataContext db = new DCDataLinqDataContext(); var GetTestForClient = db.SE_FetchTestForClient(Clientid); return GetTestForClient; } catch (Exception ex) { throw ex; } }

    T.Balaji

    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