473,404 Members | 2,114 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,404 software developers and data experts.

problem in the datalist

I have one datalist which contains one item template. In that, iam printing
a value taken from the sql table and one check box. Now, the user will
select some checkbox and press a button and that will be cached (or stored
in session). After storing i.e., after the page refresh, instead of printing
the checkbox i have to say "already selected" to stop the user to uncheck.

How to do this in asp.net? as far as session storing is concerned iam pretty
okay with that.For me the deal is how to make the checkboxes invisible (i'm
using <asp:CheckBox), while comparing with the current loaded (item) value
with the already stored one?

Which event i have to use of datalist? I tried with ItemCreated event it is
not working, because the values are not fetched from the database while this
event is called?

Plz help me.

Thanks in Advance
Vadivel Kumar
Nov 19 '05 #1
2 1942
hi Vadivel,

Create a extra column in underlying dataset. (for checkbox)
On click of button iterate through datalist.items collection and update dataset. depending on selection of checkbox
Then in Itemdatabound depending on status make current row checkbox visible or display message u want

Keep storing dataset into session between postback and not datalist .

HOpe this heLps
Jignesh Desai
www.dotnetjini.com

"Vadivel Kumar" <do********@spam-i-love-u.com> wrote in message news:uR****************@TK2MSFTNGP15.phx.gbl...
I have one datalist which contains one item template. In that, iam printing
a value taken from the sql table and one check box. Now, the user will
select some checkbox and press a button and that will be cached (or stored
in session). After storing i.e., after the page refresh, instead of printing
the checkbox i have to say "already selected" to stop the user to uncheck.

How to do this in asp.net? as far as session storing is concerned iam pretty
okay with that.For me the deal is how to make the checkboxes invisible (i'm
using <asp:CheckBox), while comparing with the current loaded (item) value
with the already stored one?

Which event i have to use of datalist? I tried with ItemCreated event it is
not working, because the values are not fetched from the database while this
event is called?

Plz help me.

Thanks in Advance
Vadivel Kumar

Nov 19 '05 #2
Thanks jignesh!

Can you give me some examples? or else some step-by-step approach

Vadivel Kumar

"Jignesh Desai" <ji***********@hotmail.com> wrote in message news:eN**************@TK2MSFTNGP09.phx.gbl...
hi Vadivel,

Create a extra column in underlying dataset. (for checkbox)
On click of button iterate through datalist.items collection and update dataset. depending on selection of checkbox
Then in Itemdatabound depending on status make current row checkbox visible or display message u want

Keep storing dataset into session between postback and not datalist .

HOpe this heLps
Jignesh Desai
www.dotnetjini.com

"Vadivel Kumar" <do********@spam-i-love-u.com> wrote in message news:uR****************@TK2MSFTNGP15.phx.gbl...
I have one datalist which contains one item template. In that, iam printing
a value taken from the sql table and one check box. Now, the user will
select some checkbox and press a button and that will be cached (or stored
in session). After storing i.e., after the page refresh, instead of printing
the checkbox i have to say "already selected" to stop the user to uncheck.

How to do this in asp.net? as far as session storing is concerned iam pretty
okay with that.For me the deal is how to make the checkboxes invisible (i'm
using <asp:CheckBox), while comparing with the current loaded (item) value
with the already stored one?

Which event i have to use of datalist? I tried with ItemCreated event it is
not working, because the values are not fetched from the database while this
event is called?

Plz help me.

Thanks in Advance
Vadivel Kumar

Nov 19 '05 #3

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

Similar topics

2
by: Ken R. | last post by:
Hello all, I am relatively new to python but I am having an issue with custom sort functions.. I am trying to sort a list of lists or tuples with arbitrary ascending or descending sorts. For...
2
by: Gary | last post by:
Hi, I am a Chinese student, I have a problem with the following code //The follwing code in StaticSearch.h: // template <class Type> class dataList; // template <class Type> class Node ...
1
by: Doug | last post by:
The html below shows DataList "DiscountList" nested within DataList "EventItemList". DiscountList contains a Label control. I'm trying to find the label, using FindControl, during...
1
by: Glenn Owens | last post by:
Here's the scenario: I have a DataList populated from a datatable sitting inside a fieldset. Each element (row) in the Datalist has the following child controls: asp:checkbox, asp:image,...
2
by: Olav Tollefsen | last post by:
I have a Web Form with a DataList. Inside the ItemTemplate, I have a DropDownList control. <asp:DataList ID="ProductDataList" Runat="server"> <ItemTemplate> <asp:DropDownList ID="DropDownList1"...
1
by: TheHach | last post by:
Hi. (For information, i'm working in VB.NET) In our company, we have material that is divided into 3 parts : - a system - a batch - an article In each system are different batches, and in...
0
by: Maran | last post by:
We have come across a situation that I thinks not many have. Grateful for all responses. Regards Maran ************* * Scenario A DataList binds to a DataRow, with "RegionName" och...
2
by: scottls | last post by:
Hi All, Thanks for reading my post. I have been working on getting nested datalists working properly wihtin my framework for many days and I think I'm almost there. See if you could help me...
1
by: Jim in Arizona | last post by:
I'm don't know how I would get around this. When working with a datalist control, there a specific built in commands (OnEditCommand, OnCancelCommand, etc). These commands, when the datalist...
0
by: Bieniu | last post by:
I have DataList control on my own contro land it is bind to SqlDataSource control. My problem is that DataList is getting needed data twice what is for me very strange. I have some code in...
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: 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
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,...
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
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...
0
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
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
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.