Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Explicit definitions of columns required?
Message
De
13/08/2014 15:13:47
 
 
À
13/08/2014 15:10:34
Information générale
Forum:
ASP.NET
Catégorie:
WebForms
Versions des environnements
Environment:
C# 5.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01605604
Message ID:
01605605
Vues:
40
>Trying to get an editable GridView to work in a Web form -
>
>here's the GridView definition
>
>    asp:GridView ID="GV1" runat="server" AutoGenerateEditButton="True" 
>        OnRowEditing = "GV1_RowEditing"
>        OnRowUpdating = "GV1_RowUpdating"
>        CellPadding="10" CellSpacing="10" BorderStyle="Solid" 
>        HorizontalAlign="Center" Caption="DashBoard Configuration Settings" 
>        CaptionAlign="Top">
>        <EditRowStyle BackColor="#9999FF" />
>    /asp:GridView>
>
>
>Everything I've read says that in the GV1_RowEditing event all I need is
>
>       protected void GV1_RowEditing(object sender, GridViewEditEventArgs e)
>        {
>            GV1.EditIndex = e.NewEditIndex;
>            GV1.DataSource = GVSet;
>            GV1.DataBind();
>        }
>
>
>And the Gird should show up with the input equivalents for the fields....However nothing shows after I click on the 'Edit' - no Grid, nada, nichts, nils
>
>With the exception of one forum post, I did notice that most everyone explicitly defines the columns for the Grid. Is that required in order to do what I want to do?
>
>Thanks

Did you try setting the autogenerate property to True?
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform