Hi Ken
many thanks, works a treat now - {0:c} when displaying, {0:F2} when editing
cheers
Andy
"Ken Cox [Microsoft MVP]" <> wrote in message
news:%...
> You could convert to template fields and then remove the ":C" from the
> edititem template.
>
> "AAJ" <a.a.com> wrote in message
> news:...
>> Hi Ken
>>
>> Its in the datagrid itsself
>>
>> I just used {0:c}in the data format string. This automatically carries
>> through to the edit field template
>>
>> in the databinding of the edit field it has Bind("material_rate",
>> "{0:C}")
>>
>> cheers
>>
>> Andy
>>
>> "Ken Cox [Microsoft MVP]" <> wrote in
>> message news:...
>>> What's adding the currency symbol to the value?
>>>
>>> "AAJ" <a.a.com> wrote in message
>>> news:...
>>>> Hi all
>>>>
>>>> I posted this last week in a different group but had no response. I
>>>> wonder if any of you guys can help me.
>>>>
>>>> I have a gridview that displays a field as a currency i.e. £100.00,
>>>> which is exactly what I want.
>>>>
>>>> When I edit the row, the edit box for the column shows £100.00. This is
>>>> where the problem lies, if I save the record without deleting the
>>>> currency sign first, it fails with a conversion error. Obviously this
>>>> is causing a headache. I need the box to allow either £100.00 or just
>>>> 100.00 and have it accept either, after all its just a decimal behind
>>>> the scenes.
>>>>
>>>> does anyone know a way around it
>>>>
>>>> many thanks in advance
>>>>
>>>> Andy
>>>>
>>>
>>>
>>
>>
>
>
|