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