I am not using style setting but use my own parameters. Here is the code I am using.
<!-- Order details --> <r:DataRange Location="0%,50" Size="100%,7" Name="Rpt">
<r:DataRange.HeaderTemplate> <DataTemplate> <r:ItemContainer Size="100%,8" > <r:Label Location="{Binding headloc0}" Size="{Binding datasize0}" Text="{Binding h0}" Visibility="{Binding labshow0}" /> <r:Label Location="{Binding headloc1}" Size="{Binding datasize1}" Text="{Binding h1}" Visibility="{Binding labshow1}" /> <r:Label Location="{Binding headloc2}" Size="{Binding datasize2}" Text="{Binding h2}" Visibility="{Binding labshow2}" /> <r:Label Location="{Binding headloc3}" Size="{Binding datasize3}" Text="{Binding h3}" Visibility="{Binding labshow3}" /> <!--<r:Label Location="68%,1" Size="{Binding datasize4}" Text="{Binding h4}" Visibility="{Binding labshow4}" /> <r:Label Location="80%,1" Size="{Binding datasize5}" Text="{Binding h5}" Visibility="{Binding labshow5}" />--> </r:ItemContainer> </DataTemplate> </r:DataRange.HeaderTemplate>
<r:DataRange.ItemTemplate> <DataTemplate> <r:ItemContainer> <r:Label Location="{Binding dataloc0}" Size="{Binding datasize0}" Text="[col0]" Visibility="{Binding labshow0}" /> <r:Label Location="{Binding dataloc1}" Size="{Binding datasize1}" Text="[col1]" Visibility="{Binding labshow1}" /> <r:Label Location="{Binding dataloc2}" Size="{Binding datasize2}" Text="[col2]" Visibility="{Binding labshow2}" /> <r:Label Location="{Binding dataloc3}" Size="{Binding datasize3}" Text="[col3]" Visibility="{Binding labshow3}" TextFormat="${0:0.00}"/> <!--<r:Label Location="68%,0" Size="{Binding datasize4}" Text="[col4]" Visibility="{Binding labshow4}" TextFormat=" {0}%"/> <r:Label Location="80%,0" Size="{Binding datasize5}" Visibility="{Binding labshow5}" Background="#EFEFFF" /> <r:Label Location="80%,0" Size="{Binding datasize5}" Text="[col5]" Visibility="{Binding labshow5}" TextFormat="${0:0.00}" Style="{StaticResource ContentLabelStyle2}" />--> </r:ItemContainer> </DataTemplate> </r:DataRange.ItemTemplate>
Here is the binding data.
LineRecCount : 3 Next Record headlab0 = 商品編號 headloc0 = 0%,1 dataloc0 = 0%,0 datasize0 = headhorz0 = Left datahorz0 = Right labshow0 = Visible Next Record headlab1 = 商品價 headloc1 = 12%,1 dataloc1 = 12%,0 datasize1 = headhorz1 = Left datahorz1 = Right labshow1 = Visible Next Record headlab2 = 數量 headloc2 = 40%,1 dataloc2 = 40%,0 datasize2 = headhorz2 = Left datahorz2 = Right labshow2 = Visible Next Record headlab3 = PV headloc3 = 54%,1 dataloc3 = 54%,0 datasize3 = headhorz3 = Left datahorz3 = Right labshow3 = Visible Next Record headlab4 = headloc4 = dataloc4 = datasize4 = headhorz4 = datahorz4 = labshow4 = Hidden Next Record headlab0 = 商品編號 headloc0 = 0%,1 dataloc0 = 0%,0 datasize0 = headhorz0 = Left datahorz0 = Right labshow0 = Visible Next Record headlab1 = 商品價 headloc1 = 12%,1 dataloc1 = 12%,0 datasize1 = headhorz1 = Left datahorz1 = Right labshow1 = Visible Next Record headlab2 = 數量 headloc2 = 40%,1 dataloc2 = 40%,0 datasize2 = headhorz2 = Left datahorz2 = Right labshow2 = Visible Next Record headlab3 = PV headloc3 = 54%,1 dataloc3 = 54%,0 datasize3 = headhorz3 = Left datahorz3 = Right labshow3 = Visible Next Record headlab4 = headloc4 = dataloc4 = datasize4 = headhorz4 = datahorz4 = labshow4 = Hidden Next Record headlab0 = 商品編號 headloc0 = 0%,1 dataloc0 = 0%,0 datasize0 = headhorz0 = Left datahorz0 = Right labshow0 = Visible Next Record headlab1 = 商品價 headloc1 = 12%,1 dataloc1 = 12%,0 datasize1 = headhorz1 = Left datahorz1 = Right labshow1 = Visible Next Record headlab2 = 數量 headloc2 = 40%,1 dataloc2 = 40%,0 datasize2 = headhorz2 = Left datahorz2 = Right labshow2 = Visible Next Record headlab3 = PV headloc3 = 54%,1 dataloc3 = 54%,0 datasize3 = headhorz3 = Left datahorz3 = Right labshow3 = Visible
the picture is the result. I use the ways to head session and it works fine. Anything I need to do?
Thanks
David Chiang
|