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

DataList

P: n/a
I am loading Product data into a DataList, the idea is to be able to select
(check)
some of those products and enter a price for the selected ones. So I have
added a checkbox and a TextBox for each item that is loaded into the
DataList.

The question is: How can i get only the checkd products and get
their corresponding price (Textbox.Text) so I can save only those in a
table?

Thanks in advance.

Nov 19 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
You will have to loop through each list item and check for the checked
value.

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"CCORDON" <tc******@hotmail.com> wrote in message
news:ec****************@TK2MSFTNGP10.phx.gbl...
I am loading Product data into a DataList, the idea is to be able to select
(check)
some of those products and enter a price for the selected ones. So I have
added a checkbox and a TextBox for each item that is loaded into the
DataList.

The question is: How can i get only the checkd products and get
their corresponding price (Textbox.Text) so I can save only those in a
table?

Thanks in advance.

Nov 19 '05 #2

P: n/a
That's what I'm having problems. How do I loop though all items in the
DataList and how do I get the checkbox value for each Item.

Thanks

"CCORDON" <tc******@hotmail.com> wrote in message
news:ec****************@TK2MSFTNGP10.phx.gbl...
I am loading Product data into a DataList, the idea is to be able to select
(check)
some of those products and enter a price for the selected ones. So I have
added a checkbox and a TextBox for each item that is loaded into the
DataList.

The question is: How can i get only the checkd products and get
their corresponding price (Textbox.Text) so I can save only those in a
table?

Thanks in advance.

Nov 19 '05 #3

P: n/a
untested, but something like
foreach(DataListItem dli in this.dgResults.Items)

{

}


--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"CCORDON" <tc******@hotmail.com> wrote in message
news:uI****************@TK2MSFTNGP14.phx.gbl...
That's what I'm having problems. How do I loop though all items in the
DataList and how do I get the checkbox value for each Item.

Thanks

"CCORDON" <tc******@hotmail.com> wrote in message
news:ec****************@TK2MSFTNGP10.phx.gbl...
I am loading Product data into a DataList, the idea is to be able to
select (check)
some of those products and enter a price for the selected ones. So I have
added a checkbox and a TextBox for each item that is loaded into the
DataList.

The question is: How can i get only the checkd products and get
their corresponding price (Textbox.Text) so I can save only those in a
table?

Thanks in advance.


Nov 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.