Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET 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 February 6th, 2004, 06:32 AM
Registered User
 
Join Date: Feb 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Prob with datagrid control

 Hi
    I have 1 datagrid and i am using delete and edit options for this grid. I do't want delete button in my first row as i do't want to delete my first row which is my admin record but i can edit that. Any Solution.....

 
Old February 6th, 2004, 01:26 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Is the first row ALWAYS going to be the admin row? Or do you have some data that can identify it as such?

Using the ItemDataBound event handler of the datagrid you can look at the contents of the columns and test row data (if it's the admin row), and then make the "delete" button not visible in just that row.

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old February 9th, 2004, 01:08 AM
Registered User
 
Join Date: Feb 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Peter
 ThanX a lot. I tried this thing in my code but failed. Do me one favor can u send me code for hint.

Suneet

 
Old February 9th, 2004, 11:20 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Try these:

http://p2p.wrox.com/topic.asp?TOPIC_...=ItemDataBound
http://p2p.wrox.com/topic.asp?TOPIC_...=ItemDataBound
http://p2p.wrox.com/topic.asp?TOPIC_...=ItemDataBound





Similar Threads
Thread Thread Starter Forum Replies Last Post
User COntrol Datagrid inside datagrid rodmcleay ASP.NET 1.0 and 1.1 Professional 3 April 14th, 2007 10:11 AM
datagrid control sandeep ADO.NET 2 February 9th, 2004 10:54 AM
Datagrid Control bmains VB.NET 2002/2003 Basics 3 November 20th, 2003 12:49 PM
DataGrid Control mike123abc Beginning VB 6 0 November 18th, 2003 04:24 AM
DataGrid Control cej2583 VB How-To 0 August 7th, 2003 02:03 PM





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