problem in the datalist

V

Vadivel Kumar

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
 
J

Jignesh Desai

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
 
V

Vadivel Kumar

Thanks jignesh!

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

Vadivel Kumar



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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top