Jump to content
Software FX Community

Parent Child Grid issue - How to reference events on the sidebar


Recommended Posts

I am trying to filter my data based upon the company that is being processed.  To do so I created a Parent child grid.  I setup the child data in the sidebar and am quite happy with the layout.  Here's the issue.  When I add a new record in the child, I need to validate some information.  The main grid is called Grid1 and the child grid is gfxItems. 

Whenever I launch the code editor from a selected field in the sidebar I'm granted access to this method.


Sub grid1_ItemInserting(ByVal sender As Object, ByVal e As GridFX.WebForms.GridItemInsertingEventArgs) Handles Grid1.ItemInserting

However, when I put the application into Debug and add a break point to the first line of this routine, when adding a new record, the event doesn't fire. 

How do I trap events taking place in my child data?

Link to comment
Share on other sites

  • 2 weeks later...

Yes, it is supported, but you need to inspect Grid2 Inserting event handler instead of Grid1 Inserting event handler (I am assuming Grid1 is the parent grid and Grid2 is the child grid).

To insert the event handler for Grid2 inserting event, add the event handler into the grid markup tag:

<GridFX:Grid ID="Grid2" runat="server" DataParameterField="property_id" DataSourceID="AccessDataSource2"   OnItemInserting="Grid2_ItemInserting" Width="100%">

Or, you can Edit Sidebar Template at design time: Select the child grid, go to the property window and add a new event handler for the ItemInserting.

Let me know if this helps.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...