Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

Can't see enable Editing, Deleting in the GridView smart tag

$
0
0

Please help me with this, I can't see the option to enable Editing and deleting in my GridView, Why is this happening?

and even when I manually put the Update and Delete Column and Command it did'nt work, what could cause this?

<form runat="server" id="frm1"><asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager><asp:UpdatePanel runat="server" ID="update"><Triggers></Triggers><ContentTemplate><div><asp:UpdateProgress runat="server" ID="upProgress" DisplayAfter="500"><ProgressTemplate><img src="../../Images/loader.gif" alt="Please Wait" /></ProgressTemplate></asp:UpdateProgress></div><div style=" margin-left:50; "><asp:GridView ID="GridView1" runat="server" AllowPaging="True"
                    AllowSorting="True" AutoGenerateColumns="False" CellPadding="4"
                    DataKeyNames="mandrelId" DataSourceID="SqlDataSource1" ForeColor="#333333"
                    GridLines="None" Width="60%"><AlternatingRowStyle BackColor="White" ForeColor="#284775" /><Columns><asp:BoundField DataField="mandrelId" HeaderText="mandrelId"
                            InsertVisible="False" ReadOnly="True" SortExpression="mandrelId" /><asp:BoundField DataField="diameter" HeaderText="diameter"
                            SortExpression="diameter" /><asp:CheckBoxField DataField="Active" HeaderText="Active"
                            SortExpression="Active" /><asp:CommandField ShowSelectButton="True" ShowDeleteButton="True"
                            ShowEditButton="True" /></Columns><EditRowStyle BackColor="#999999" /><FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /><HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /><PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" /><RowStyle BackColor="#F7F6F3" ForeColor="#333333" /><SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" /><SortedAscendingCellStyle BackColor="#E9E7E2" /><SortedAscendingHeaderStyle BackColor="#506C8C" /><SortedDescendingCellStyle BackColor="#FFFDF8" /><SortedDescendingHeaderStyle BackColor="#6F8DAE" /><SortedAscendingCellStyle BackColor="#E9E7E2" /><SortedAscendingHeaderStyle BackColor="#506C8C" /><SortedDescendingCellStyle BackColor="#FFFDF8" /><SortedDescendingHeaderStyle BackColor="#6F8DAE" /></asp:GridView></div><asp:SqlDataSource ID="SqlDataSource1" runat="server"
                ConnectionString="<%$ ConnectionStrings:TTDataSQLConnectionString %>"
                SelectCommand="SELECT [mandrelId], [diameter], [Active] FROM [Mandrels]"
                UpdateCommand="UPDATE [Mandrels] SET [mandrelId]= @mandrelId, [diameter]=@diameter, [Active]=@Active WHERE [mandrelId]=@mandrelId"
                DeleteCommand="DELETE [Mandrels] WHERE mandrelId=@mandrelId"><UpdateParameters><asp:Parameter Type="Int32" Name="mandrelId" /><asp:Parameter Type="Decimal" Name="diameter" /><asp:Parameter Type="Boolean" Name="Active" /></UpdateParameters><DeleteParameters><asp:Parameter Type="Int32" Name="mandrelId" /></DeleteParameters></asp:SqlDataSource></ContentTemplate></asp:UpdatePanel><asp:Label ID="StatusLabel" runat="server" Text="Label"></asp:Label></form>

Thanks in advance,

Rasha.




Viewing all articles
Browse latest Browse all 3509

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>