473,586 Members | 2,776 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_Car Options_by_type
@Vin Nvarchar(50),
@IdTypeOption int

as

SELECT Options.IdTypeO ption, Options.PrintDe scription, Options.IDOptio n
FROM VinNumber INNER JOIN
Options ON VinNumber.VINOp tion =
Options.OptionD escription AND VinNumber.VINVa lue = Options.OptionV alue
WHERE VinNumber.VIN = @Vin AND (VinNumber.VINO ption NOT LIKE 'decoded'
+ '%') AND (VinNumber.VINO ption NOT LIKE 'DataOne' + '%')
AND (VinNumber.VINO ption NOT LIKE 'vinSquish' + '%')
AND (NOT (Options.PrintD escription IS NULL)) and Options.IdTypeO ption
=@IdTypeOption
ORDER BY Options.PrintDe scription
GO

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

as

SELECT Options.IdTypeO ption, Options.PrintDe scription, Options.IDOptio n
FROM VinNumber INNER JOIN
Options ON VinNumber.VINOp tion =
Options.OptionD escription AND VinNumber.VINVa lue = Options.OptionV alue
WHERE VinNumber.VIN = @Vin AND (VinNumber.VINO ption NOT LIKE 'decoded'
+ '%') AND (VinNumber.VINO ption NOT LIKE 'DataOne' + '%')
AND (VinNumber.VINO ption NOT LIKE 'vinSquish' + '%')
AND (NOT (Options.PrintD escription IS NULL))
ORDER BY Options.IdTypeO ption, Options.PrintDe scription
GO

Editoptionalsse lected.DataSour ce =
optionsfile.Get ACarOptionoptio nals(DataTableC ars.Rows(0)("Vi nNumber"))
Editoptionalsse lected.CellPadd ing = 5
Editoptionalsse lected.DataText Field = "PrintDescripti on"
Editoptionalsse lected.DataValu eField = "IDOption"
Editoptionalsse lected.RepeatCo lumns = 5
Editoptionalsse lected.RepeatDi rection = RepeatDirection .Horizontal
Editoptionalsse lected.CssClass = "CartListIt em"
Editoptionalsse lected.BackColo r = Yellow

If DataTableCars.R ows(0)("IdCar") > 0 Then
OptionsSelected =
optionsfile.Get ACarOptions(Dat aTableCars.Rows (0)("IdCar"))
While OptionsSelected .Read()
selected = OptionsSelected .Item("IdOption ")
Editoptionalsse lected.Items.Re move(selected)
End While
End If
Editoptionalsse lected.DataBind ()


Jul 21 '05 #1
0 4605

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

Similar topics

1
1348
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 use a group of CheckBoxes (which I know you can disable)if there's anyway to do what I need with a CheckBoxList. Thanks.
7
4209
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 the first item in the dropdown is always displayed. Template Code: <asp:TemplateColumn HeaderText="DropDown"> <ItemTemplate> <asp:Label...
0
1534
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, phone numbers, etc. I also have on the form a CheckListBox which is bound to another table in SQL Server - let's assume it the USA States so...
0
1597
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, phone numbers, etc. I also have on the form a CheckListBox which is bound to another table in SQL Server - let's assume it the USA States so...
1
1826
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 checkbox a value, it gives it a name and does a <label> tag for the Text of the item, and has nothing about the value anywhere in the rendered code for...
5
13378
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 to get a Boolean value TRUE or FALSE when a checkBox is selected. When the checkBoxList was out of the DataList i used "OnSelectedIndexChanged"...
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 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...
5
1400
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 selected value from it? Thanks, Stephen
0
1183
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 select the previous values that i have selected.It only selects one item. my code which i am using for edit is following: Dim _drArticle As...
0
7911
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7839
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8200
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8215
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6610
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5710
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3836
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
1179
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.