Jump to content
Software FX Community

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


jvwiv

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.

Protected

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...