473,406 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Remove an item from a checkboxlist.

I am loading the 5 checkboxlist from a database. I have 5 lists. The first
four are interior, exterior, safety and drive train. The fifth is optional
options. It is possible the optional option was already selected, if it was
selected it would be in one of the first four (interior, exterior, safety and
drive train). What I am doing is loading the fifth checkboxlist and then
checking to see if it was selected if so, I am trying to remove it from the
fifth checkboxlist. This is my code.
This first four are
CREATE PROCEDURE Get_A_Vin_A_CarOptions_by_type
@Vin Nvarchar(50),
@IdTypeOption int

as

SELECT Options.IdTypeOption, Options.PrintDescription, Options.IDOption
FROM VinNumber INNER JOIN
Options ON VinNumber.VINOption =
Options.OptionDescription AND VinNumber.VINValue = Options.OptionValue
WHERE VinNumber.VIN = @Vin AND (VinNumber.VINOption NOT LIKE 'decoded'
+ '%') AND (VinNumber.VINOption NOT LIKE 'DataOne' + '%')
AND (VinNumber.VINOption NOT LIKE 'vinSquish' + '%')
AND (NOT (Options.PrintDescription IS NULL)) and Options.IdTypeOption
=@IdTypeOption
ORDER BY Options.PrintDescription
GO

The fifth one is
CREATE PROCEDURE Get_A_Vin_A_CarOptions
@Vin Nvarchar(50)

as

SELECT Options.IdTypeOption, Options.PrintDescription, Options.IDOption
FROM VinNumber INNER JOIN
Options ON VinNumber.VINOption =
Options.OptionDescription AND VinNumber.VINValue = Options.OptionValue
WHERE VinNumber.VIN = @Vin AND (VinNumber.VINOption NOT LIKE 'decoded'
+ '%') AND (VinNumber.VINOption NOT LIKE 'DataOne' + '%')
AND (VinNumber.VINOption NOT LIKE 'vinSquish' + '%')
AND (NOT (Options.PrintDescription IS NULL))
ORDER BY Options.IdTypeOption, Options.PrintDescription
GO

Editoptionalsselected.DataSource =
optionsfile.GetACarOptionoptionals(DataTableCars.R ows(0)("VinNumber"))
Editoptionalsselected.CellPadding = 5
Editoptionalsselected.DataTextField = "PrintDescription"
Editoptionalsselected.DataValueField = "IDOption"
Editoptionalsselected.RepeatColumns = 5
Editoptionalsselected.RepeatDirection = RepeatDirection.Horizontal
Editoptionalsselected.CssClass = "CartListItem"
Editoptionalsselected.BackColor = Yellow

If DataTableCars.Rows(0)("IdCar") > 0 Then
OptionsSelected =
optionsfile.GetACarOptions(DataTableCars.Rows(0)(" IdCar"))
While OptionsSelected.Read()
selected = OptionsSelected.Item("IdOption")
Editoptionalsselected.Items.Remove(selected)
End While
End If
Editoptionalsselected.DataBind()


Jul 21 '05 #1
0 4593

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Scott | last post by:
Is there any way to disable a single item in a checkboxlist? I know you can disable the entire list, but there doesn't seem to be a way to disable a specific checkbox. I don't want to have to...
7
by: localhost | last post by:
A DataGrid with shows a label in one of the columns when in view mode. When in edit mode, I want to show a dropdown, and have the default selection set to what the textbox used to be. Right now...
0
by: D. Shane Fowlkes | last post by:
OK - I'm looking for the best approach on how to do this. I have a form page where the user can edit their "Profile" (data) which is in SQL Server. It's your basic company information - address,...
0
by: D. Shane Fowlkes | last post by:
OK - I'm looking for the best approach on how to do this. I have a form page where the user can edit their "Profile" (data) which is in SQL Server. It's your basic company information - address,...
1
by: Ryan Scully | last post by:
Hello I have problem with determining exactly what CheckBoxList element is selected using JavaScript code. When I databind to the checkboxlist it renders it on the page and instead of giving each...
5
by: Patrick.O.Ige | last post by:
I'm binding a CheckBoxlist below in the ItemDataBound(the CheckBoxList is in a Datalist) By doing "li.Selected = True" i can see all the checkBoxes are selected. But what i want is to be able...
0
by: Stanley J Mroczek | last post by:
I am loading the 5 checkboxlist from a database. I have 5 lists. The first four are interior, exterior, safety and drive train. The fifth is optional options. It is possible the optional option...
5
by: stephen | last post by:
Hi, I have a place holder and I have a checkboxlist in it? why do i get a "System.NullReferenceException: Object reference not set to an instance of an object." error why I try to get the...
0
by: riteshraha | last post by:
I cant retrieve selected item from checkboxlist in asp.net project. when i submit multiple item from checkboxlist it works fine. but when i am trying to edit this items then checkboxlist does not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.