Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
eagle #1
Grids, dropdown, sql queries and extra spaces
I have a sql query that combines 2 fields to end up as one, and binds to a
dropdown list in a grid. I want to add spaces into the qry so the fields
look like the are separate. But the drop down list seems to trim any extra
spaces, and it displays any html codes I put in there. Does anyone know how
to do this?
This is what I want displayed in the drop down list, with a significant
amount of space between the date and the currency:
01/01/05 12.00
01/02/05 13.00
This is what I've tried:
select Convert(varchar, datBillDate, 1) + ' ' +
Convert(varchar, curAmountOwed) as ddldisplay from tbl
select Convert(varchar, datBillDate, 1) + ' ' +
Convert(varchar, curAmountOwed) as ddldisplay from tbl
Result: 01/01/05 12.00
select Convert(varchar, datBillDate, 1) + Char(9) + Char(9) + Char(9) +
Char(9) + Convert(varchar, curAmountOwed) as ddldisplay from tbl
Result (displays as just one space): 01/01/05 12.00
I've tried using Char(32) also.
Any other ideas?
eagle Guest
-
Special Character And Extra Spaces
Hi All, This may be a simple problem to fix (i hope) but my searching has found nothing. When i publish documents from word to contribute i... -
Edit Mode - How do I populate dropdown in edittemplate from dropdown in another column?
I have a datagrid with 2 columns that I want to interact when I'm in Edit Mode. I've reproduced just the columns I want to interact below. I can... -
#26192 [Fbk->NoF]: The mail function out putting extra spaces between each line
ID: 26192 Updated by: sniper@php.net Reported By: bpaulson at chieftain dot com -Status: Feedback +Status: ... -
#26192 [Opn->Fbk]: The mail function out putting extra spaces between each line
ID: 26192 Updated by: iliaa@php.net Reported By: bpaulson at chieftain dot com -Status: Open +Status: ... -
#26192 [NEW]: The mail function out putting extra spaces between each line
From: bpaulson at chieftain dot com Operating system: Linux Redhat 7.3 PHP version: 4.3.4 PHP Bug Type: Mail related Bug... -
Sagar #2
Re: Grids, dropdown, sql queries and extra spaces
Please try SPACE and see if that works..
"eagle" <eagle@yahoo.com> wrote in message
news:eZPY6e1pFHA.2416@TK2MSFTNGP14.phx.gbl...>I have a sql query that combines 2 fields to end up as one, and binds to a
> dropdown list in a grid. I want to add spaces into the qry so the fields
> look like the are separate. But the drop down list seems to trim any
> extra spaces, and it displays any html codes I put in there. Does anyone
> know how to do this?
> This is what I want displayed in the drop down list, with a significant
> amount of space between the date and the currency:
>
> 01/01/05 12.00
> 01/02/05 13.00
>
> This is what I've tried:
>
> select Convert(varchar, datBillDate, 1) + ' '
> + Convert(varchar, curAmountOwed) as ddldisplay from tbl
>
> select Convert(varchar, datBillDate, 1) + ' '
> + Convert(varchar, curAmountOwed) as ddldisplay from tbl
>
> Result: 01/01/05 12.00
>
> select Convert(varchar, datBillDate, 1) + Char(9) + Char(9) + Char(9) +
> Char(9) + Convert(varchar, curAmountOwed) as ddldisplay from tbl
>
> Result (displays as just one space): 01/01/05 12.00
>
> I've tried using Char(32) also.
>
> Any other ideas?
>
>
>
>
>
Sagar Guest
-
eagle #3
Re: Grids, dropdown, sql queries and extra spaces
That was a good idea, but it didn't work either.
"Sagar" <mmsagar@hotmail.com> wrote in message
news:uolfzk3pFHA.3884@TK2MSFTNGP10.phx.gbl...> Please try SPACE and see if that works..
>
> "eagle" <eagle@yahoo.com> wrote in message
> news:eZPY6e1pFHA.2416@TK2MSFTNGP14.phx.gbl...>>>I have a sql query that combines 2 fields to end up as one, and binds to a
>> dropdown list in a grid. I want to add spaces into the qry so the fields
>> look like the are separate. But the drop down list seems to trim any
>> extra spaces, and it displays any html codes I put in there. Does anyone
>> know how to do this?
>> This is what I want displayed in the drop down list, with a significant
>> amount of space between the date and the currency:
>>
>> 01/01/05 12.00
>> 01/02/05 13.00
>>
>> This is what I've tried:
>>
>> select Convert(varchar, datBillDate, 1) +
>> ' ' + Convert(varchar, curAmountOwed) as
>> ddldisplay from tbl
>>
>> select Convert(varchar, datBillDate, 1) +
>> ' ' + Convert(varchar, curAmountOwed) as
>> ddldisplay from tbl
>>
>> Result: 01/01/05 12.00
>>
>> select Convert(varchar, datBillDate, 1) + Char(9) + Char(9) + Char(9) +
>> Char(9) + Convert(varchar, curAmountOwed) as ddldisplay from tbl
>>
>> Result (displays as just one space): 01/01/05 12.00
>>
>> I've tried using Char(32) also.
>>
>> Any other ideas?
>>
>>
>>
>>
>>
>
eagle Guest



Reply With Quote

