473,508 Members | 2,202 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4599

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

Similar topics

1
1338
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
4201
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
1531
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
1595
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
1822
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
13374
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
486
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
1395
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
1175
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
7127
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7331
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
7391
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7054
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5633
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,...
1
5056
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...
0
3204
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1564
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
424
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.