DynamicQuery Adapter - Grid Format


(Mark Damen) #1

Hi

So I got some great advice about using the DynamicQuery adapter - really does make returning data so much easier!

image

This is a simple grid that I’ve populated using BAQ. Question is how to control the decimal format - can’t specify it in the customisation because the grid is blank and has no columns at runtime. (the headers aren’t shown at least until it’s run).

This is the BAQ:

And finally, when you Analyse the BAQ it does honour the format correctly:
image

Many Thanks
Mark


(Jose C Gomez) #2

Images didn’t upload


(Mark Damen) #3

I’ve edited the post - can’t work out how to get it to display the images though, even though they are local to the forum site now that they are uploaded.


(Chris Conn) #4

Sounds like the grid is taking over the formatting of that decimal value. You can force it by putting this in the grid InitializeLayout event:

 urgrid.DisplayLayout.Bands[0].Columns["UrColName"].Format = "###,##0.00";

Another option is to cast the BAQs result to a string, then you dont have to worry about it. If you ever need to edit this field then this is not a good option (if it ever was)