Click here to Skip to main content
15,907,910 members
Home / Discussions / C#
   

C#

 
GeneralRe: decimal value being truncated when exporting data to excel from asp.net c# Pin
vijju0415-Jul-09 8:28
vijju0415-Jul-09 8:28 
AnswerRe: decimal value being truncated when exporting data to excel from asp.net c# Pin
PIEBALDconsult13-Jul-09 8:41
mvePIEBALDconsult13-Jul-09 8:41 
GeneralRe: decimal value being truncated when exporting data to excel from asp.net c# Pin
vijju0415-Jul-09 8:31
vijju0415-Jul-09 8:31 
QuestionSearching in XML Pin
zeeShan anSari13-Jul-09 7:56
zeeShan anSari13-Jul-09 7:56 
AnswerRe: Searching in XML Pin
PIEBALDconsult13-Jul-09 8:18
mvePIEBALDconsult13-Jul-09 8:18 
AnswerRe: Searching in XML Pin
Not Active13-Jul-09 8:19
mentorNot Active13-Jul-09 8:19 
AnswerRe: Searching in XML Pin
0x3c013-Jul-09 8:43
0x3c013-Jul-09 8:43 
GeneralRe: Searching in XML Pin
Not Active13-Jul-09 10:19
mentorNot Active13-Jul-09 10:19 
GeneralRe: Searching in XML Pin
0x3c013-Jul-09 19:54
0x3c013-Jul-09 19:54 
QuestionUnmanaged DLL: C# variable for C++ char** Pin
belier113-Jul-09 7:06
belier113-Jul-09 7:06 
AnswerRe: Unmanaged DLL: C# variable for C++ char** Pin
Luc Pattyn13-Jul-09 7:28
sitebuilderLuc Pattyn13-Jul-09 7:28 
GeneralRe: Unmanaged DLL: C# variable for C++ char** Pin
belier113-Jul-09 9:47
belier113-Jul-09 9:47 
GeneralRe: Unmanaged DLL: C# variable for C++ char** Pin
Luc Pattyn13-Jul-09 10:04
sitebuilderLuc Pattyn13-Jul-09 10:04 
GeneralRe: Unmanaged DLL: C# variable for C++ char** Pin
belier113-Jul-09 11:07
belier113-Jul-09 11:07 
GeneralRe: Unmanaged DLL: C# variable for C++ char** Pin
Luc Pattyn13-Jul-09 11:12
sitebuilderLuc Pattyn13-Jul-09 11:12 
GeneralRe: Unmanaged DLL: C# variable for C++ char** Pin
belier114-Jul-09 1:10
belier114-Jul-09 1:10 
QuestionGet local groups and users from server remotely with console app Pin
briancollins3213-Jul-09 6:50
briancollins3213-Jul-09 6:50 
QuestionHow do you count the number of decimals in a decimal datatype Pin
Nathan Revka13-Jul-09 6:26
Nathan Revka13-Jul-09 6:26 
AnswerRe: How do you count the number of decimals in a decimal datatype Pin
Luc Pattyn13-Jul-09 6:34
sitebuilderLuc Pattyn13-Jul-09 6:34 
AnswerRe: How do you count the number of decimals in a decimal datatype Pin
musefan13-Jul-09 6:51
musefan13-Jul-09 6:51 
well if you are using a textbox then you will need a number of different validations...

1. Check the currency symbol exists only once and is the first character, if not present you should auto add it
2. Check there is only 1 decimal point
3. Check for any , symbols you may want to include and insure they are in the right places
4. Check only two digits after the decimal place...

if(text.LastIndexOf('.') != text.Length - 3)
//not two digits after the decimal point

...there are other validations you may want to try and other methods to calculate the number of digits after a decimal.

you could also use a NumericUpDown control which has a property to set how many decimal places you wish to use, in addition to choosing if you want to you commas for thousand seperators

Life goes very fast. Tomorrow, today is already yesterday.

AnswerRe: How do you count the number of decimals in a decimal datatype Pin
TheGreatAndPowerfulOz13-Jul-09 6:51
TheGreatAndPowerfulOz13-Jul-09 6:51 
QuestionDccg Pin
peishen8813-Jul-09 5:47
peishen8813-Jul-09 5:47 
AnswerRe: Dccg Pin
Luc Pattyn13-Jul-09 5:54
sitebuilderLuc Pattyn13-Jul-09 5:54 
GeneralRe: Dccg Pin
DoctorMick13-Jul-09 5:58
DoctorMick13-Jul-09 5:58 
GeneralRe: Dccg Pin
peishen8813-Jul-09 6:10
peishen8813-Jul-09 6:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.