Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2007

Tip: Looking for answers? Try searching our database.

dynamic datagrid

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ann - 29 Oct 2007 21:15 GMT
I am using a dynamic datagrid and want to add the "delete" command,but no
matter what I try I cannot get it to work.  This is what I have:

ButtonColumn del = new ButtonColumn();    
del.Text = "deleteTest";
del.ButtonType = ButtonColumnType.LinkButton;
del.CommandName = "Delete";
DG.Columns.Add(del);

DG.ItemDataBound += new
System.Web.UI.WebControls.DataGridItemEventHandler(this.dgAssDealers_ItemDataBound);
DG.DeleteCommand += new
System.Web.UI.WebControls.DataGridCommandEventHandler(this.dgAssDealers_DeleteCommand);

The ItemDataBound works fine, but not the Delete. The button shows up in the
grid, but it's not "linked" , in other words, there's nothing to click.   Has
anyone got any idea how to do this? I've been banging my head all weekend on
this and just cannot get it to work :(
Dave - 30 Oct 2007 05:26 GMT
> I am using a dynamic datagrid and want to add the "delete" command,but no
> matter what I try I cannot get it to work.  This is what I have:
[quoted text clipped - 14 lines]
> anyone got any idea how to do this? I've been banging my head all weekend on
> this and just cannot get it to work :(

it looks like you are using the generic command event handler with the
key word delete. try using the event handler for delete or changing
your commandName to deleteme or something like that.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.