Click here to Skip to main content
15,918,243 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I am using radgrid in my application and display emp details such as Emp_Code, Emp_Name,Date and status. here status is a check box. now i am selecting in sql IT001, Jhon, 01/02/2011, 1(1 is status). now i want if status is 1 then checkbox should be checked in Radgrid.Can anyone help me? I am using asp.net3.5 and sql server2008.
Posted
Comments
[no name] 1-Feb-11 1:50am    
Hi Bharti I Have Small Doubt, RadGrid Is FreeWare?
c27bharti 1-Feb-11 1:52am    
Its Telerik.
Sandeep Mewara 1-Feb-11 2:12am    
No

One way is, get the status value in your ItemDataBound event.
Check for the status if status is one then check the checkbox else uncheck it.
 
Share this answer
 
There can be ways to do it.

1st:
In the query itself, based on the condition pass on a flag with needed value.

2nd:
Modify the dataset once received from DB and accommodate an extra field for this checkbox. Loop through the table and set needed value for the flag and then bind the datatable with grid.

3rd:
As already suggested, in grids Itemdatabound event where every row binding is raised, check for the value and set the checkbox value explicitly.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900