Click here to Skip to main content
15,892,643 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi, I want to use a gridView but my data is irregular, so, I can't bind the data in the ASP, e.i.

ASP.NET
<asp:TemplateField HeaderText="Municipio">
                    <EditItemTemplate>
                        <asp:Label ID="Label4" runat="server" Text='<%# Eval("Municipio") %>'></asp:Label>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label3" runat="server" Text='<%# Eval("Municipio") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>


I have try to do something like use a static variable (string[]) to get the references of the data, and use it with the Gridview, e.i.

ASP.NET
 <%
    vectorP[0] = "Municipio";
 %>
-----
<asp:TemplateField HeaderText="Municipio">
                    <EditItemTemplate>
                        <asp:Label ID="Label4" runat="server" Text='<%# Eval(vectorP[0]) %>'></asp:Label>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label3" runat="server" Text='<%# Eval(vectorP[0]) %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>


Please help, and god will bless you XD.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900