By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,966 Members | 1,488 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,966 IT Pros & Developers. It's quick & easy.

problem in the datalist

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.