Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Passing combo box values to datagrid view

Passing combo box values to datagrid view

Scheduled Pinned Locked Moved Visual Basic
databasequestiontutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Shrimpersfan
    wrote on last edited by
    #1

    I have an application which allows the user to select multiple combo boxes and then display data in a datagrid view depending on what is selected in the combo boxes. However, one of my fields is called 'Fee'. Obviously, this is a decimal value, I am trying to use a combo box to select a range of fees (0 - 150, 151 - 200 etc). For the other 3 combo boxes on the form, the values are coming from a stored procedure, however, i cannot do this for the 'fee' field because i receive errors when it tries to convert to decimal. The text in my combo box will be like the example above (0 - 150) but the values in the database are formatted differently (150.00, 170.20). My question is, how would i be able to filter out results in my datagrid view by using a range on the 'fee' field, i thought about a case statement but at the moment it just brings back a datagrid with 'rowerrors' as a column title.

    J 1 Reply Last reply
    0
    • S Shrimpersfan

      I have an application which allows the user to select multiple combo boxes and then display data in a datagrid view depending on what is selected in the combo boxes. However, one of my fields is called 'Fee'. Obviously, this is a decimal value, I am trying to use a combo box to select a range of fees (0 - 150, 151 - 200 etc). For the other 3 combo boxes on the form, the values are coming from a stored procedure, however, i cannot do this for the 'fee' field because i receive errors when it tries to convert to decimal. The text in my combo box will be like the example above (0 - 150) but the values in the database are formatted differently (150.00, 170.20). My question is, how would i be able to filter out results in my datagrid view by using a range on the 'fee' field, i thought about a case statement but at the moment it just brings back a datagrid with 'rowerrors' as a column title.

      J Offline
      J Offline
      Jon_Boy
      wrote on last edited by
      #2

      You asked this question 2 days ago - did you try what was listed?

      Any suggestions, ideas, or 'constructive criticism' are always welcome. "There's no such thing as a stupid question, only stupid people." - Mr. Garrison

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups