Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, July 5, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Web Forums - SalesLogix Web Platform & Application Architect
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: Datagrid column TextFormatString property
Frank Chaffin
Posts: 475
 
Datagrid column TextFormatString propertyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Mar 08 7:21 PM
Is the usage/syntax of the TextFormatString property of datagrid columns documented?
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Datagrid column TextFormatString propertyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Mar 08 1:35 PM
Quote:
Originally posted by Frank Chaffin

Is the usage/syntax of the TextFormatString property of datagrid columns documented?


Hi Frank,

This is not a SLX specific format string, but a .NET one. A great place to start is here: http://msdn2.microsoft.com/en-us/library/fbxft59x.aspx

Also, Chris Sells has a small utility that let's you test out format strings, so you can play with it and tweak it to be just what you need. It is called FormatDesigner and you can get it from here: http://www.sellsbrothers.com/tools/#FormatDesigner

-Ryan
[Reply][Quote]
Scott Garner
Posts: 3
 
Re: Datagrid column TextFormatString propertyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Jun 09 2:10 PM
Okay, but what exactly do I type in for the TextFormatString? I'm trying to format a decimal to currency, so my text format string (according to Microsoft) is "C2". In my Slx grid formatting dialog box I type "C2", C2, {C2}, "{C2}" and none of them are correct. The first two just show up as I type them; the last two throw asp.net exceptions at runtime.
[Reply][Quote]
Scott Garner
Posts: 3
 
Re: Datagrid column TextFormatString propertyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Jun 09 2:15 PM
Okay, solved my own problem. It's {0:C2}
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Datagrid column TextFormatString propertyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Jun 09 2:44 PM
I ran into the same issue last couple of days trying to apply specific formatting and your finding is quite correct.

I had originally built a C# app to apply the formatting to an Integer, and was using the int.ToString() function to test, but then those strings wouldn't work on SalesLogix.
So, instead I converted my code to use a string formatting call: string.Format("", args)
Then I was able to test formatting strings for SLX, such as string.Format("{0:#,##0}", intVar)

The zero before the colon is the index of the parameter being replaced, and would typically be zero for SLX Grids and Binding formatting.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Datagrid column TextFormatString propertyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Jun 09 2:47 PM
Quote:
Originally posted by Scott Garner

Okay, solved my own problem. It's {0:C2}


Hehe, I always forget how it wants those to look too and end up needing to look at how the deployed file looks to see. Time for a blog post on it so I can remember
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 7/5/2025 6:10:46 PM