Results 1 to 11 of 11

Thread: Beginer

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2003
    Posts
    19

    Question Beginer

    Hello,

    I have to add a checkbox to the grid control.

    There is a status field in database. If status is '1', I want to display the check box checked in the grid control. If it is 0, I want the check box to be un-checked.

    Can some one tell me how to do that?

    Thank you!

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    If you bind your data to the grid, doesn't it add the checkbox for you?
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jul 2003
    Posts
    19

    Question

    Thanks for the reply. This is what I was doing.

    I am binding the grid control to the recordset manually using
    set dbgrid.datasource=oRs.datasource
    only '1' and '0' are dipalying in my grid. Instead I want to dispaly checked and unchecked check boxes in the grid at ruin time.


    Thank you!

  4. #4
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632
    Can a datagrid do that?
    I didn't think it could...
    Mind you I hardly use it as it's crap...

    U could use a listView and then assign an image to a ListSubItem...that would be able to add ticks for you...

    Or, even better, S-Grid from www.vbAccelerator.com...now that will do everything you could possible want...

    Woka

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Jul 2003
    Posts
    19

    It was asked in an exam

    Thanks for the reply.

    I don't know if it is possible to show a check box in the grid or not. I had attend an exam for an interview. They have given this creteria, showing the check box in the grid control.

    I was not sure how to do that.


    Thank you!

  6. #6

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Jul 2003
    Posts
    19

    Yes.

    They perticularly specified Grid control.

  8. #8
    Junior Member
    Join Date
    Jul 2003
    Location
    Taiwan
    Posts
    29
    Hi !
    I use TrueDB Grid to do that and is easy as 1, 2, 3, Please check the web site http://www.componentone.com

    Good luck !

    Daniel

  9. #9

  10. #10

    Thread Starter
    Junior Member
    Join Date
    Jul 2003
    Posts
    19

    Thank you!

    Can it be possible without using the third party control?

    Thanks!

  11. #11
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632
    Completely depends on what grid you use...
    And even then, you could still subclass it and manually add a tick.
    If I took a basic VB exam I would fail!
    I know minimal amounts about databound controls, MS flexgrid and stuff like that
    Ask me a question on a large n-teir business critical MES system using a server app which utilises TCP/IP, and I could probably answer 99% of the questions...but the basics....no chance



    With a listview you would set the icon property of a ListSubItem, where the icon would be a tick.
    With a VS Flex Grid Pro, you would set the value of the cell to True, that would produce a tick.
    Each grid control is VERY different...

    Woka

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width