desmondtan Posted March 20, 2003 Posted March 20, 2003 In my datagrid , there is a column display the boolean data from database filed ( True/False) . Instaed of True/False, I would like to format the boolean data to Yes/No or checkbox . How to implent this function ? Quote
*Experts* Nerseus Posted March 20, 2003 *Experts* Posted March 20, 2003 You can use the CheckBox column type or control. I'm not exactly sure how to set this up from here (don't have .NET installed on this machine), but I can help in the morning if you can't get it. As far as displaying True/False, Yes/No, or anything custom, I've always done the conversion in my query (or stored proc for SQL Server). It seems easier, and using a UDF in SQL Server means changing the text is fairly easy. -Ner Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
desmondtan Posted March 20, 2003 Author Posted March 20, 2003 What is UDF ? Could you show a simple example to explain this ? Quote
Fdonnel Posted February 22, 2008 Posted February 22, 2008 I have accomplished this within the select clause that populates the datagrid. Add something like this to your select clause: SELECT cmsTotalScore, CASE cmsEmSent WHEN 1 THEN 'Yes' WHEN 0 THEN 'No' END AS Sent FROM cmscores Add Sent to the column required in the datagrid Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.