I have a BAQ DataView that I’m attaching to on a form. Is there any way to change the format on a bound textbox? Right now I’m getting a lot of zeros:
The only way I’ve found is to format the output of the BAQ as a formatted string rather than using a number, but I’d like to not have to go in and do that.
Reminds me of something similar I did a while back, here is a code snippet that you and others may find useful. It is for populating a custom EpiUltraGrid with BAQ data, but not using the “conventional / built-in” ways. I forget why I needed to go this route - and I regret the maintenance overhead created by sticking all the formatting logic in customization code - but it works very well.
I tried messing around with the BAQ formats, it even updates on the bound EpiNumericEditor, but the format doesn’t always seem to change. I believe it’s driven by some simple link that doesn’t have the options that you do if it’s unbound.
For example, I don’t think you can conditionally have decimal places. It’s either there or it isn’t. I tried with >>>,>>9.>>, which works in the BAQ, but in the field it still shows 0.00. If I do >>>,>>9 then in the field it shows 0. Then if I do >>>,>>9.99 then it does 0.00 again.