Looking for a little bit of help with what I think is a fairly simple task. I have an updateable dashboard which when the Refresh tool is clicked I want to have a message box appear prompting the user to save if any of the rows have been updated.
I’ve figured out the message box that when Yes is clicked it saves and when No is clicked it just carries on with the refresh however I haven’t quite been able to figure out the custom code that will query the grid for updated rows.
Any help would be very much appreciated as I am fairly new to C# and still find it a little mind boggling at times.
If I get time I’ll play around with it but… can’t promise anything.
In the meantime, maybe someone else has some ideas, has already tackled this?
For now,… hmmm, rather than populating a UD field, I’m wondering if a variable might work?
Something like this…
Set a bool variable to true whenever one of your fields is changed
Then when the refresh tool is clicked, check if bool = true and then show messagebox with buttons
“Yes” continue with the refresh and reset bool to false
“Cancel”, stop the refresh, leave the bool as true.
Also, sounds like you’re still learning how to code in E10?
If so, here is a link to some toolbar basics that I liked.
i.e. maybe you could start with seeing what is being clicked, and then adding your handling?
// add this to the using
// and use the Wizard to generate this
private void baseToolbarsManager_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs args)
// and add your code, e.g. a simple messagebox to show what tool was clicked
Yeah, I have a routine that checks for a dirty row after refresh is clicked.
Still needs a messagebox w/yes,cancel handling though
So maybe if I get a slow patch this week, will flesh this out a little more.
I may start another thread, asking if EpiDataViews keep track of their state, i.e. know if they contain dirty row(s)?
If they do… would make this a lot simpler.
One of those things… seems like it should be obvious but I’ve never had reason to think too much about it before.
Hmmmm… just noticed “before” and “after” toolclick events don’t seem to be working for UBAQ customizations.
The toolclick event does fire though.
TBD if that is just the way it is, or maybe a version thing.
Admittedly I havent read the whole thread here, but if I am picking up the context, I have found that if you want perform actions against ALL rows in a UBAQ you need ACTIONS as Update will only work on modified rows. You can however use an action to modify all rows in a UBAQ programmatically.
Specific to the OP, instead of before tool click, cant you do a BeforeAdapter method?