Print Page | Close Window

Topic Add-Delete on Child Grid example not working

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=472
Printed Date: 11-Jun-2026 at 4:35pm


Topic: Topic Add-Delete on Child Grid example not working
Posted By: IDelgado
Subject: Topic Add-Delete on Child Grid example not working
Date Posted: 04-Oct-2007 at 4:49pm
Hi,
I tried the example in the topic 216 Add-Delete on Child Grid, try to delete a row in the grid using the DEL key but nothing happens. The userdeletingrow event never fires. What can be wrong? I have the same situation in my app, so i'd like to know what is missing here.
Thanks.
 



Replies:
Posted By: davidklitzke
Date Posted: 04-Oct-2007 at 10:56pm
There are many code examples in 216 Add-Delete on Child Grid.  Which code example or tutorial are you referring to?
 
Are you using .NET, DevForce, or Infragistics grid?
 
If DevExpress or Infragistics, what version are you using?


Posted By: IDelgado
Date Posted: 05-Oct-2007 at 7:43am

The example i'm refering it's the one that shows the way to delete  an object by selecting its row and pressing the DEL key, i'm using VB NET 2005 and the .NET grid.

This is the code in the example mentioned:

  Private Sub OrdersDGV_UserDeletingRow( _

ByVal sender As Object, _

      ByVal e As System.Windows.Forms.DataGridViewRowCancelEventArgs)

    OrderDelete(CType(e.Row.DataBoundItem, Order))

    e.Cancel = True

  End Sub



Posted By: Dominique
Date Posted: 22-Oct-2007 at 1:44am
Hi,
I remember having problems with that example too. As far as I remember the UserDeletingRow event is not fired because the Child-list is readonly.
Another drawback is that it is possible to add many row to the collection without seiing them (playing with the up, down key for example)

The easiest way I found to have the default dotnet grid behaviour was to use a list for the details grid and to update the binding on the MasterBindingSource.CurrentChanged event.


Dominique

-------------
Dominique



Print Page | Close Window