Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 26th, 2011, 07:19 AM
Registered User
 
Join Date: Dec 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default adding Numerical sort to category property

Hi,

Can anyone advise me how I would go about changing the 'Importance' property in the Category class, so that in the UI, insted of editing this value through a textbox field, a drop down list is instead used that displays the current 'Importance' as the selceted value within the range of 'Importance' values within the existing categories. Then if a new value is selected from the list, all the other existing category 'Importance' property values are accordingly incremented or decremented.
For example suppose I have the following scenario -

I have four category rows (each row representing a category object) in my database, and I choose to edit the details of the object whoose Id is '1'.

The UI page will allow the user to update the category class details. The ddl selected value for this object is '1', with the other list values being 2,3,4. If the user then selected the value '3', how would I update the 'importance' values in the other three objects (all the other existing category 'Importance' property values are accordingly incremented or decremented.)?

I'm wondering if in order to do this I need to created a new table that has a one to one relationship with the category class, containing a CategoryId and Importance Int cloumns. Then have this reflected in a new class called CatImportance, that is referneced via a new property in the category class of type CatImportance?
I'm I going about this in the wrong way?
Any help is appreciated.

Last edited by teabag99; March 27th, 2011 at 03:04 PM.. Reason: add more information because no one has posted a reply





Similar Threads
Thread Thread Starter Forum Replies Last Post
Code Error - Chapter 1 - Adding a Property cbesh2 BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1 0 November 7th, 2008 11:29 PM
Adding Custom Property to Visio 2003-Shape object ashu_from_india Pro VB 6 3 November 5th, 2008 04:21 AM
Customer Support - Adding Second Level Category mfoof BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 3 July 4th, 2006 12:22 AM
Getting Numerical Values Fiddleman HTML Code Clinic 2 September 13th, 2004 02:51 PM
textbox with numerical values must C# 1 August 7th, 2003 12:44 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.