473,808 Members | 2,758 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Check Box List Selected Items

I've a multiview with 3 views. on view 2 the user is presented with a check
box list (items from database) at view 3 the user can review their selections
and, either post to the database or go back and amend their selections (all
selected data is held in an extensive profile including several list items).

The problem is going back from view 3 to view 2 the check Box List loses the
user checked items when using: MultiView.Activ eViewIndex = 1.

Can anyone give a pointer on how maintain the user selections when going
from view 3 to view 2?

Or how to set the checked box items selected property to true from the data
held in the profile list?
asp.net 2.0 (vb) VS2005

Any help would be great!
Oct 29 '07 #1
3 3211
Does it happens only with check Box List ? or with other controls too.
Check the ViewState of the check Box List.
Is items in check Box List hardcoded or dnyamic. ? if dynamic when you are
populating ?

Regards
JIGNESH

"James Page" wrote:
I've a multiview with 3 views. on view 2 the user is presented with a check
box list (items from database) at view 3 the user can review their selections
and, either post to the database or go back and amend their selections (all
selected data is held in an extensive profile including several list items).

The problem is going back from view 3 to view 2 the check Box List loses the
user checked items when using: MultiView.Activ eViewIndex = 1.

Can anyone give a pointer on how maintain the user selections when going
from view 3 to view 2?

Or how to set the checked box items selected property to true from the data
held in the profile list?
asp.net 2.0 (vb) VS2005

Any help would be great!
Oct 30 '07 #2
Hi Jignesh

Other controls are fine - in view 1 ! have dropdowns etc. They retain their
selected state from view 2 to view 1.
EnableViewState of the checkBoxList and its container = True
Items in checkBoxList come from objectDataSourc e (sqlserver database) which
I assume loads with the page - this is the same for the dropdowns in view1.

"JIGNESH" wrote:
Does it happens only with check Box List ? or with other controls too.
Check the ViewState of the check Box List.
Is items in check Box List hardcoded or dnyamic. ? if dynamic when you are
populating ?

Regards
JIGNESH

"James Page" wrote:
I've a multiview with 3 views. on view 2 the user is presented with a check
box list (items from database) at view 3 the user can review their selections
and, either post to the database or go back and amend their selections (all
selected data is held in an extensive profile including several list items).

The problem is going back from view 3 to view 2 the check Box List loses the
user checked items when using: MultiView.Activ eViewIndex = 1.

Can anyone give a pointer on how maintain the user selections when going
from view 3 to view 2?

Or how to set the checked box items selected property to true from the data
held in the profile list?
asp.net 2.0 (vb) VS2005

Any help would be great!
Oct 30 '07 #3
Seems I've sorted it!

Incorrect coding of a GridView in view 3 - the databind() method was
incorrect.

Panic over!!

"James Page" wrote:
Hi Jignesh

Other controls are fine - in view 1 ! have dropdowns etc. They retain their
selected state from view 2 to view 1.
EnableViewState of the checkBoxList and its container = True
Items in checkBoxList come from objectDataSourc e (sqlserver database) which
I assume loads with the page - this is the same for the dropdowns in view1.

"JIGNESH" wrote:
Does it happens only with check Box List ? or with other controls too.
Check the ViewState of the check Box List.
Is items in check Box List hardcoded or dnyamic. ? if dynamic when you are
populating ?

Regards
JIGNESH

"James Page" wrote:
I've a multiview with 3 views. on view 2 the user is presented with a check
box list (items from database) at view 3 the user can review their selections
and, either post to the database or go back and amend their selections (all
selected data is held in an extensive profile including several list items).
>
The problem is going back from view 3 to view 2 the check Box List loses the
user checked items when using: MultiView.Activ eViewIndex = 1.
>
Can anyone give a pointer on how maintain the user selections when going
from view 3 to view 2?
>
Or how to set the checked box items selected property to true from the data
held in the profile list?
asp.net 2.0 (vb) VS2005
>
Any help would be great!
Oct 30 '07 #4

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

Similar topics

2
2721
by: Neil Ginsberg | last post by:
I'm having a problem with a multi-select list box set to Simple multi-selection. If multiple items are selected and then I change the items in the list, the list positions previously selected are still selected. For example, if the list contains a, b, c, d, and e, and b and c are selected, and then the list is changed to contain v, w, x, y, z, the w and x items are selected. This doesn't happen every time; only intermittently. Even...
0
1837
by: Empire City | last post by:
I have an ASP.NET form with a DataGrid and Button. I want to put a RadioButtonList in a DataGrid cell. I bind it to an ArrayList which has a ListItem in the cell. The display part works fine. I then check some boxes and hit the submit button. I can't seem to get the value that is selected on the RadioButton List. I don't want to use the EditTemplate thing I just want to click on the radiobutton and submit the form. I also don't want to do...
2
2278
by: Peter | last post by:
Hello! Please, could anyone tell, is it possible to set multiple items to be selected in list control in the code? For example when the web form is loaded three items of 5 are selected in list control already? Now I manage to set only one item to be selected during page load, but there is need to multiple items could be selected for the user. I appreciate very much your help! Thanks.
3
26337
by: Stephen Adam | last post by:
Hi there, I'm sure i'm missing something really simple here, all i want to do is get the value of the selected item in a list box. Even after much fiddling about last night I still could not get my code to work. Below is some code which highlights my problem. All I want to do is set the lable control's text property to the value of the selected drop down list value - in this example i've shown the three ways i've tried. Please help!
0
7546
by: Brian Henry | last post by:
Since no one else knew how to do this I sat here all morning experimenting with this and this is what I came up with... Its an example of how to get a list of items back from a virtual mode list view in .NET 2.0 with multiple selection turned on... since the .NET documentation is EXTREAML vague on how to do this and offers no clue on what the virtual mode events do or how to use them... just thought this might help someone else out...
0
3244
by: Brian Henry | last post by:
Here is another virtual mode example for the .NET 2.0 framework while working with the list view. Since you can not access the items collection of the list view you need to do sorting another way... here is my code on how I did it to help anyone starting out get an idea of how to use virtual mode in ..NET 2.0 Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.Shared
5
27495
by: =?Utf-8?B?QnJlbmRlbiBCaXhsZXI=?= | last post by:
Hello. I am reading a value from a table and trying to determine if that value exists in a list of values associated with a dropdownlist. If so, I select the value, otherwise, I don't. I haven't been able to figure this operation out so far. Code: if (reader != System.DBNull.Value)
5
6749
by: Andrew Meador | last post by:
I have a form (Change Card List by Status) with a check box (cboNOT) and a list box (lstStatus). There is an Open Report button that opens a report (Report - Change Card List) which uses a query (SQL -Change Card List). What I want to do is have the form open the report where a filter is set to use the values from the check box AND the value selected from the list box to generate the report. What I can't figure out is how to use the...
1
1573
by: raam | last post by:
hi I have a list box with some country names from database. when i click search button the "country" list selecteditem should be selected. but it is not. here is my code where iam using a stored procedure which is outputting 3 tables simultaneously. the list box of country is 3rd table that is table if (objDataSet.Tables.Rows.Count > 0) {
0
10631
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10374
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9196
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7651
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6880
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5686
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4331
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 we have to send another system
2
3859
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3011
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.