using the updown control from within a repeater

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

using the updown control from within a repeater

Post by jmestep » Mon Mar 16, 2009 2:28 pm

I am trying to use the cb updown control from within a repeater and if I set a default value of 1 for the text value, when I change the value, it changes it on the screen, but that new value is not reflected when the items are added to cart. If I use a plain text box, the quantity gets put in fine. Is there something (easy) I can do to pickup the changed value? I'm finding the control on the add to basket button
short quantity = AlwaysConvert.ToInt16(((UpDownControl)item.FindControl("Quantity")).Text);

Thanks
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: using the updown control from within a repeater

Post by AbleMods » Mon Mar 16, 2009 9:11 pm

If you're using it in a repeater, how are you determining which up-down control to pull the value? I'm presuming since it's in a repeater that more than one up-down control is being rendered on the page....
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: using the updown control from within a repeater

Post by mazhar » Tue Mar 17, 2009 4:17 am

The id will not matter if you look for the control within a single row. In this case you can use the id you specified for control. Check ConLib/Basket control and App_Code/BasketHelper.cs class's SaveBasket method.

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: using the updown control from within a repeater

Post by jmestep » Tue Mar 17, 2009 6:38 am

Thanks, I'll look at it.
Joe- I've got other pieces of data in the repeater that I can access using the ItemDataBound event on the repeater using the FindControl, putting some of them into a hidden field after they are changed. Then I pick them up again on the Add to Basket button.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: using the updown control from within a repeater

Post by AbleMods » Tue Mar 17, 2009 11:54 am

ItemDataBound() is where you can capture it. Or you could switch to a templated gridview control and use the gridview RowCommand method.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: using the updown control from within a repeater

Post by jmestep » Tue Mar 17, 2009 12:38 pm

Thanks, Joe. That's where I'm capturing the stuff, but I think something in viewstate is interfering.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

Post Reply