G
Guest
Hello
i saw some performance recommendations and one of them i
"Set datagrid's enableviewstate to false
But i have a CRUD page and it not fires datagrid events like ItemCommand, SelectedIndexChanged, EditCommand
Here is the definition of my datagrid. How can i do to work without viewstate
<asp:datagrid id="dgEdicion" runat="server" AutoGenerateColumns="False" EnableViewState="False" ><SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#CC3333"></SelectedItemStyle><HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#333333"></HeaderStyle><Columns><asp:ButtonColumn Text="Seleccionar" CommandName="Select"></asp:ButtonColumn><asp:EditCommandColumn ButtonType="LinkButton" UpdateText="Grabar" CancelText="Cancelar" EditText="Editar"></asp:EditCommandColumn><asp:BoundColumn DataField="CustomerID" SortExpression="CustomerID" HeaderText="CustomerID"></asp:BoundColumn><asp:BoundColumn DataField="CompanyName" SortExpression="CompanyName" HeaderText="Company Name"></asp:BoundColumn><asp:BoundColumn DataField="ContactName" SortExpression="ContactName" HeaderText="Contact Name"></asp:BoundColumn></Columns><PagerStyle HorizontalAlign="Right" ForeColor="Black" BackColor="White"></PagerStyle></aspataGrid
Thank you
i saw some performance recommendations and one of them i
"Set datagrid's enableviewstate to false
But i have a CRUD page and it not fires datagrid events like ItemCommand, SelectedIndexChanged, EditCommand
Here is the definition of my datagrid. How can i do to work without viewstate
<asp:datagrid id="dgEdicion" runat="server" AutoGenerateColumns="False" EnableViewState="False" ><SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#CC3333"></SelectedItemStyle><HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#333333"></HeaderStyle><Columns><asp:ButtonColumn Text="Seleccionar" CommandName="Select"></asp:ButtonColumn><asp:EditCommandColumn ButtonType="LinkButton" UpdateText="Grabar" CancelText="Cancelar" EditText="Editar"></asp:EditCommandColumn><asp:BoundColumn DataField="CustomerID" SortExpression="CustomerID" HeaderText="CustomerID"></asp:BoundColumn><asp:BoundColumn DataField="CompanyName" SortExpression="CompanyName" HeaderText="Company Name"></asp:BoundColumn><asp:BoundColumn DataField="ContactName" SortExpression="ContactName" HeaderText="Contact Name"></asp:BoundColumn></Columns><PagerStyle HorizontalAlign="Right" ForeColor="Black" BackColor="White"></PagerStyle></aspataGrid
Thank you