Welcome, Register for free! or Login below:
EduGeek.net RSS Feeds Register FAQ Members Social Groups User Map Calendar Search Today's Posts Mark Forums Read

Go Back   EduGeek.net Forums > Coding and Web Development > Coding
Reply
 
LinkBack Thread Tools Search Thread
Sponsored Links
Old 07-01-2009, 11:08 AM   #1
 
Shrimpersfan's Avatar
 
Join Date: Feb 2008
Location: Peterborough
Posts: 46
uk uk lincoln
Thanks: 8
Thanked 0 Times in 0 Posts
Rep Power: 0 Shrimpersfan is an unknown quantity at this point
Default Passing combo box values to datagrid view

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.
????: EduGeek.net Forums http://www.edugeek.net/forums/coding/28603-passing-combo-box-values-datagrid-view.html

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.
  Reply With Quote
Old 07-01-2009, 11:17 AM   #2
 
cadjs's Avatar
 
Join Date: Nov 2006
Location: Hampshire
Posts: 240
uk
Thanks: 2
Thanked 21 Times in 17 Posts
Rep Power: 9 cadjs will become famous soon enoughcadjs will become famous soon enough
Default

How are you filling the datagrid?

If it uses a query then that should use the BETWEEN command using the lower and upper values from the combo box. Your case statement would be able to create the sql statement.

Does that make sense...?
  Reply With Quote
Reply
Similar Threads
Thread Thread Starter Forum Replies Last Post
filtering datagrid with combo box Shrimpersfan Coding 1 05-01-2009 04:08 PM
Exchange 2007 > *SPAM* SCL values Ben_Stanton Windows 2 13-11-2008 01:58 PM
C# Help - Datagrid cell formatting Gatt Coding 6 22-07-2008 08:33 PM
moodle ldap default values if not set by AD russdev Virtual Learning Platforms 7 13-03-2008 03:32 PM
Passing data from dreamweaver to an Access file StewartKnight How do you do....it? 2 26-01-2007 11:35 AM



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search Thread
Search Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:46 PM.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 ©2009, Crawlability, Inc.
Copyright EduGeek.net




website uptime

© 2005 - 2009 EduGeek.net
no new posts