jvwiv Posted March 4, 2008 Report Share Posted March 4, 2008 I have a grid that displays items to be billed. I have added a button to the grid next to each item I want to bill. The button should retrieve the index of the item clicked and process a stored proc. Unfortunately I can not determine how to find the key value, or any datavalues, associated with the item. Any ideas? Quote Link to comment Share on other sites More sharing options...
jvwiv Posted March 4, 2008 Author Report Share Posted March 4, 2008 It appears as though I can reference the grid without the e. x=grid1.selecteditems.item('Fieldname") Quote Link to comment Share on other sites More sharing options...
StephenP Posted March 4, 2008 Report Share Posted March 4, 2008 First, ensure you are using the GridFX:CommandButton control and its Command property is CustomCommand. These are the defaults set by the wizard, so if you added it through that then you should be fine. All you need to do now is handle Grid's ExecutingCustomCommand event. That can be accessed via the Events tab in the Property Grid. In the event handler, the "e" (event args) parameter should have everything you need. However, the event args in the build you have doesn't include a grid item. To get the grid item for the button clicked, you can just use a static method on the GridItem class: GridItem item = GridItem.FindContainingItem(e.Source) We are in the midst of deploying a service pack update for Grid FX. It should be available in the next day. The good news is that the new version has a GridItem property in the event args. I highly recommend the update. Especially if you're using VS 2008. Quote Link to comment Share on other sites More sharing options...
jvwiv Posted March 6, 2008 Author Report Share Posted March 6, 2008 This is good news. I look forward to the service pack. Quote Link to comment Share on other sites More sharing options...
StephenP Posted March 12, 2008 Report Share Posted March 12, 2008 It's out, so feel free to update. Just go to Check for Updates in the smart tag wizard in Visual Studio or visit http://support.softwarefx.com/ProductBase.aspx?Product=GridFX10 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.