DynamicQuery Adapter - Grid Format

(Mark Damen) #1


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


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:

Many Thanks

(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)

(Shannon Kearney) #5

Anyone know how to format a grid column as right aligned?

(Brandon Anderson) #6


(Shannon Kearney) #7

e.Layout.Bands[0].Columns[“Col 1”].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right;

(Brandon Anderson) #8

So if you add the word “infragistics” to about any formatting question you have, a solution usually shows up using google. It’s a pretty widespread control platform, and what Epicor is built on.