F
Finn Stampe Mikkelsen
Hi
I have below GridView, which i in codebehind page databind with a dynamicly
created datatable.
This all works fine, but after the databind i still only have a column count
of 1 although the datatable adds another 4 columns to the gridview. This
represents a problem, since i would like to have the last column properties
change on the fly and i cannot access the properties of any column besides
the on definded below. None of the databound columns created by the DataBind
method can be accessed..
How can i access these columns??
/Finn
<asp:GridView ID="UdlaanGrd" runat="server" CellPadding="4"
ForeColor="#333333"
GridLines="None" onrowcommand="UdlaanGrd_RowCommand" >
<Columns>
<asp:ButtonField ButtonType="Button"
HeaderText="Fjern Vare" Text="Fjern"
CommandName="Fjern" >
<HeaderStyle HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Center" />
</asp:ButtonField>
</Columns>
<AlternatingRowStyle BackColor="White" />
<EditRowStyle BackColor="#2461BF" />
<FooterStyle BackColor="#507CD1" Font-Bold="True"
ForeColor="White" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True"
ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White"
HorizontalAlign="Center" />
<RowStyle BackColor="#EFF3FB" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True"
ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#F5F7FB" />
<SortedAscendingHeaderStyle BackColor="#6D95E1" />
<SortedDescendingCellStyle BackColor="#E9EBEF" />
<SortedDescendingHeaderStyle BackColor="#4870BE" />
</asp:GridView>
--
Der er 10 slags mennesker - Dem som forstår binær og dem som ikke gør.
There are 10 kinds of people. Those who understand binary and those who
don't.
Es gibt 10 Arten von Menschen. Die, die Binär verstehen, bzw. die, die es
nicht tuhen.
I have below GridView, which i in codebehind page databind with a dynamicly
created datatable.
This all works fine, but after the databind i still only have a column count
of 1 although the datatable adds another 4 columns to the gridview. This
represents a problem, since i would like to have the last column properties
change on the fly and i cannot access the properties of any column besides
the on definded below. None of the databound columns created by the DataBind
method can be accessed..
How can i access these columns??
/Finn
<asp:GridView ID="UdlaanGrd" runat="server" CellPadding="4"
ForeColor="#333333"
GridLines="None" onrowcommand="UdlaanGrd_RowCommand" >
<Columns>
<asp:ButtonField ButtonType="Button"
HeaderText="Fjern Vare" Text="Fjern"
CommandName="Fjern" >
<HeaderStyle HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Center" />
</asp:ButtonField>
</Columns>
<AlternatingRowStyle BackColor="White" />
<EditRowStyle BackColor="#2461BF" />
<FooterStyle BackColor="#507CD1" Font-Bold="True"
ForeColor="White" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True"
ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White"
HorizontalAlign="Center" />
<RowStyle BackColor="#EFF3FB" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True"
ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#F5F7FB" />
<SortedAscendingHeaderStyle BackColor="#6D95E1" />
<SortedDescendingCellStyle BackColor="#E9EBEF" />
<SortedDescendingHeaderStyle BackColor="#4870BE" />
</asp:GridView>
--
Der er 10 slags mennesker - Dem som forstår binær og dem som ikke gør.
There are 10 kinds of people. Those who understand binary and those who
don't.
Es gibt 10 Arten von Menschen. Die, die Binär verstehen, bzw. die, die es
nicht tuhen.