Hi,
can you show me the best way to get a grid of number fileds in wich tu put quantity values?
Please look at the picture to see what I mean.
Attachment 4257
Thanks in advance
Marco
Printable View
Hi,
can you show me the best way to get a grid of number fileds in wich tu put quantity values?
Please look at the picture to see what I mean.
Attachment 4257
Thanks in advance
Marco
Please, note that controls should be rendered per column.
Attachment 4258
M
Hi,
I can suggest the following solution.
Example
You will have to manually put a NumberField into a respective column.Code:<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Ext.NET v2 Example</title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:Container
runat="server"
Height="75"
Width="250"
Layout="HBoxLayout">
<Items>
<ext:Container runat="server" Flex="1">
<Defaults>
<ext:Parameter Name="labelWidth" Value="30" Mode="Raw" />
<ext:Parameter Name="width" Value="70" Mode="Raw" />
</Defaults>
<Items>
<ext:NumberField runat="server" FieldLabel="label" />
<ext:NumberField runat="server" FieldLabel="label" />
<ext:NumberField runat="server" FieldLabel="label" />
</Items>
</ext:Container>
<ext:Container runat="server" Flex="1">
<Defaults>
<ext:Parameter Name="labelWidth" Value="30" Mode="Raw" />
<ext:Parameter Name="width" Value="70" Mode="Raw" />
</Defaults>
<Items>
<ext:NumberField runat="server" FieldLabel="label" />
<ext:NumberField runat="server" FieldLabel="label" />
<ext:NumberField runat="server" FieldLabel="label" />
</Items>
</ext:Container>
<ext:Container runat="server" Flex="1">
<Defaults>
<ext:Parameter Name="labelWidth" Value="30" Mode="Raw" />
<ext:Parameter Name="width" Value="70" Mode="Raw" />
</Defaults>
<Items>
<ext:NumberField runat="server" FieldLabel="label" />
<ext:NumberField runat="server" FieldLabel="label" />
</Items>
</ext:Container>
</Items>
</ext:Container>
</form>
</body>
</html>
I hoped for something more dynamic.
The number and labels of numberfields are the result of a query.
Is there a way to bind the control to a store?
M
Do you mean that I should dynamically create the numberFields and calculate for each one wich container to put them in?
If so, maybe aspnet Datalist is a easier way.
M
Well, I don't think it would be difficult. You just should know Height of the main container (with HBoxLayout) and Height of a single NumberField.
At the first glance, we think it won't be easier with DataList. Though we are not sure. If you would demonstrate how it can be achieved using DataList, we will try to get the same in Ext.NET (if it will be possible).