Is there a way to be able to sum a column when there is a dollar sign in front of it?
Hello bdisk,
Could you please review the sample attached to this post and see if it meets your requirements.
Please feel free to let me know if I misunderstood you or if you have any other questions.
Hi Borris,
I'm having difficulty opening the attached project (it tells me something about newer version.)
Would you be able to post the code here?
Thanks.
I was able to open it.
e.Layout.Bands[0].Columns[0].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Currency;
e.Layout.Override.SummaryDisplayArea = Infragistics.Win.UltraWinGrid.SummaryDisplayAreas.TopFixed;
e.Layout.Override.AllowRowSummaries = Infragistics.Win.UltraWinGrid.AllowRowSummaries.True;
e.Layout.Bands[0].Columns[0].Format = "$##,###";
However, since my grid data and columns are dynamic, I can't know which column to set these properties on. I would have to add the $ sign in SQL.
Any ideas?
Hello again,
Did this approach work for you? If not, please do not hesitate to ask anything related to this topic.
I still didn't resolve this. I will try to see if I can determine if the column type is money by using the DataType property on each column and format accordingly.
Hello,
I am just checking about the progress of this issue. Please let me know If you need my further assistance on this.
I do not see how the grid will sum the varchar field. You would have to make a custom summary by casting the values to double or something like that.
Please do not hesitate to contact us if you need any additional assistance.
Yes, that correct - except its not a money field since theres a dollar sign in front of it, so it's a varchar field now.
Is there a way to sum varchar fields?
(As I've mentioned, the grid columns are dynamic, and therefore I can't just format and add the dollar sign in code or in a designer property.)