Data grid boolean filed

Hi
I have a boolean field  (bit) in a table and I used datagrid.
 What i want is to make the col. of this field format as a boolean or a check box not 0 and 1

 (How to make the format of a col. in a data grid as boolean or checkbox at run time not in the design time?)

Thanx
ahmosaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

yjtCommented:
When the particular row or col in the grid gets the focus, move the appropriate control to the particular grid position. For example, if you want to limit the user to key in either 0 or 1,  you can preload it in a combo box and move the control to the particular x and y position.
0
Éric MoreauSenior .Net ConsultantCommented:
I currently have the same problem. The nearest I found is to have a Yes/No field using this code:

Private Sub FillGridImportFile()
Dim fmtBooleanData As StdDataFormat

    With grdImport
        Set .DataSource = mobjSungard.GetGridImportSource

            .Columns(0).Locked = True
            ' set up Boolean Formatting
            Set fmtBooleanData = New StdDataFormat
            fmtBooleanData.Type = fmtBoolean
            fmtBooleanData.TrueValue = "Yes"
            fmtBooleanData.FalseValue = "No"
            fmtBooleanData.NullValue = ""
            Set .Columns(0).DataFormat = fmtBooleanData
           
            .Columns(1).Locked = True
            .Columns(2).Locked = True
            .Columns(3).Locked = True
    End With
    Call GridGotoTop
End Sub

If you find something, please advise me!
0
Bob LearnedCommented:
You can also access the by looking at the Properties dialog (Format tab).  You can change the column to boolean format.

This control does not allow for actual check boxes in the grid, which goes against what the CheckBoxes format implies.
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

ahmosaAuthor Commented:
Hi

you are right THELEARNEDONE any way i used another way u may send your answer

any way any one know how to use logonserver or connect with crystal report to log on sql server

Thanx
0
Bob LearnedCommented:
What other way did you choose to use?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ahmosaAuthor Commented:
I used mflexgrid
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.