Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I want to display data in datagrid.

And user can update the data through datagrid.

 

I find that if the orginal data type is "bit", the column auto change to checkbox.

 

I have a column "check_flag", data type is varchar(1) - {Y for true, N for false)

How can I show this column in checkbox and how to update this column through datagrid.

 

Thank!

Posted

I think the best (and faster) way its really to retrieve the data thru a Stored procedure (SP)... this way you can tell that when the value on that column is 'N' retrieve False, and 'Y' is True...

 

In fact you never retrieve the fisical column, create a new temporary Boolean column and retrieve the data there...

 

This way, to update the data you'll have to make an update SP too to do the conversion the way around...

 

Alex :p

Software bugs are impossible to detect by anybody except the end user.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...