Jump to content
Software FX Community

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

Recommended Posts

jvwiv    0

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?

Share this post

Link to post
Share on other sites
AngelR    0

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.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now