Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Other Programming > Other Programming Languages
| Search | Today's Posts | Mark Forums Read
Other Programming Languages If you have a coding issue to discuss about another language that really isn't provided for in any other forum here (not ASP.NET C#, C++, VB, PHP, JavaScript, Python, Java, Perl, Applescript, XML or any of the other forum topics we have), post it here. Enough discussion on a language we don't have covered could prompt a new forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Other Programming Languages section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old May 16th, 2016, 06:40 AM
Registered User
Points: 17, Level: 1
Points: 17, Level: 1 Points: 17, Level: 1 Points: 17, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2016
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default differentiate between data formatting and templating

we use dapfor wpf gridcontrol in our department to do assignments and lessons. Our lecturer told us today to differentiate between data formatting and templating.
Reply With Quote
  #2 (permalink)  
Old May 16th, 2016, 12:15 PM
Registered User
Points: 18, Level: 1
Points: 18, Level: 1 Points: 18, Level: 1 Points: 18, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2016
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default re. differentiate between data formatting and templating

Quote:
Originally Posted by lifeguru02 View Post
we use dapfor wpf gridcontrol in our department to do assignments and lessons. Our lecturer told us today to differentiate between data formatting and templating.
C#
internal class IntToStringConverter : IValueConverter
{
#region IValueConverter Members
// Converts int-type value to string
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is int)
{
return string.Format(culture, "{0}", value);
}
return null;
}
// Parses string to int-type value
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
string s = value as string;
if(!string.IsNullOrEmpty(s))
{
return int.Parse(s, culture);
}
return Binding.DoNothing;
}
#endregion
}
Reply With Quote




Similar Threads
Thread Thread Starter Forum Replies Last Post
how to differentiate templates based on cases sunnykeerthi XSLT 2 May 7th, 2014 10:30 AM
formatting data skrj02 Access 2 December 22nd, 2006 12:27 PM
How to differentiate to number lists gilgalbiblewheel Java GUI 0 September 15th, 2004 07:22 PM
How do we differentiate b/w User and Sys tables softwarearchitect SQL Server 2000 5 May 30th, 2004 08:39 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.