Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem building a product configurator
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Problem building a product configurator
Divers
Thread ID:
00821184
Message ID:
00821184
Vues:
52
I want a configurator like in http://www.abspc.com/index.asp

I lnow that i can use combobox (is more easy) but using radiobuttons&panels look best and i think that is more easy to a customer to see the whole product and do a best chose...

This is the part with the problem:
<P><asp:datalist id="Items" Height="80px" Width="100%" BorderWidth="1px" GridLines="Vertical" CellPadding="4"
		BackColor="White" ForeColor="Black" BorderStyle="None" BorderColor="#DEDFDE" runat="server">
		<SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#CE5D5A"></SelectedItemStyle>
		<AlternatingItemStyle BackColor="White"></AlternatingItemStyle>
		<ItemStyle BackColor="#F7F7DE"></ItemStyle>
		<ItemTemplate>
			<TABLE id="Table1" cellSpacing="0" cellPadding="0" width="100%" border="0">
				<TR>
					<TD vAlign="middle" align="left" width="35"><IMG id=Img height=35 alt="" src='/Vulcano/Tienda/ProductImages/<%# DataBinder.Eval(Container.DataItem, "Imagen")   ' width=35></TD>
					<TD vAlign="middle" align="left">
						<asp:RadioButton id=rdbOpt onclick="return Calcular(this)" runat="server" CssClass="NormalBold" value='<%# DataBinder.Eval(Container.DataItem, "Precio")   ' Checked='<%# DataBinder.Eval(Container.DataItem, "Checked")   ' Text='<%# DataBinder.Eval(Container.DataItem, "ID")   '>
						</asp:RadioButton>    Precio </A><SPAN class="ProductListItem"><B class="NormalBold">[
								<%# DataBinder.Eval(Container.DataItem, "Precio")   
								]</B> </SPAN><SPAN class="Normal"> </SPAN>
					</TD>
				</TR>
			</TABLE>
		</ItemTemplate>
		<FooterStyle BackColor="#CCCC99"></FooterStyle>
		<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#6B696B"></HeaderStyle>
	</asp:datalist></P>
Is a template for each item in a DataList. This render well, except for the GroupName part. This is the intention:

Category Name
Option 1 = Here is the above template
Option 2
Category Name
Option 1
Option 2

So i put this code for set the group name:
Private Sub Items_ItemCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataListItemEventArgs) Handles Items.ItemCreated
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then
' Retrieve the Label control in the current DataListItem.
Dim rdbOpt As RadioButton = CType(e.Item.FindControl("rdbOpt"), RadioButton)

rdbOpt.GroupName = Grupo
rdbOpt.Attributes.Add("name", Grupo) 'My other try
End If
End Sub

But ASP:NET render:
Option 1 name="Config:Ejemplo:Items:_ctl0:Uno"
Option 2 name="Config:Ejemplo:Items:_ctl1:Uno"

So the radiogroups are not working... This happend because i want do this with a usercontrol, this have a template for the items, and i want add free later in a page (this is because is for a web-store framework), so ASp.net render Page.Id+Control.Id+Template.ID+Position+GroupName, i want only the group name... how do that?
The Life is Beautiful!

Programmer in
Delphi, VS.NET
MCP
Répondre
Fil
Voir

Click here to load this message in the networking platform