Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
|
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 8th, 2004, 04:59 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
Default hiding grid edit mode

Hi

I am working on ASP.NET .In design mode i set EditCommandColumn and delete command .But in one codition I want to disable or hide these two.Means assume i have one variable called UpdFlag.If updflag is ture I want to disable or hide the edit command and delete command.

Is it posible ??pl advice me


<asp:datagrid id="grd" Runat="server" AlternatingItemStyle-BackColor="#ffcc99" CellPadding="2"
                                    EditItemStyle-BackColor="#ffff66" EditItemStyle-ForeColor="#000000" OnEditCommand="grd_Edit"
                                    OnUpdateCommand="grd_Update" OnCancelCommand="grd_Cancel" AutoGenerateColumns="False" BorderColor="#999999"
                                    PageSize="17" PagerStyle-Mode="NumericPages" PagerStyle-Font-Size="8" AllowPaging="true" PagerStyle-HorizontalAlign="Right"
                                    onPageIndexChanged="ChangeGridPage1" OnDeleteCommand="Delete_Row" ShowHeader="true" HeaderStyle-BackColor="maroon"
                                    HeaderStyle-Font-Bold="True" HeaderStyle-Font-Name="Verdana" HeaderStyle-ForeColor="White"
                                    HeaderStyle-Font-size="10" ItemStyle-Font-size="7">
                                    <Columns>
                                        <asp:EditCommandColumn ItemStyle-Width="30px" HeaderStyle-Font-Size="10px" HeaderText="Edit" EditText="edit"
                                            CancelText="cls" UpdateText="upd" />
                                        <asp:TemplateColumn ItemStyle-Width="25px" HeaderStyle-Font-Size="10px" ItemStyle-Font-Size="8" HeaderText="Del">
                                            <ItemTemplate>
                                                <asp:Button id="delid" runat="server" Font-Size="8" Font-Name="Times New Roman" height="20"
                                                    Width="20" Text="del" CommandName="delete" />
                                            </ItemTemplate>
                                        </asp:TemplateColumn>






Similar Threads
Thread Thread Starter Forum Replies Last Post
Detect Edit Mode everest ASP.NET 2.0 Basics 0 December 19th, 2006 05:32 PM
Adding a blank record to a grid (in edit-mode) ColSandrs ASP.NET 1.0 and 1.1 Basics 1 December 21st, 2005 08:42 AM
Datagrid - edit mode Programator ASP.NET 1.0 and 1.1 Professional 1 September 5th, 2003 08:38 AM
Datagrid - edit mode Programator ASP.NET 1.x and 2.0 Application Design 1 September 5th, 2003 08:37 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.