.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

DropdownList not displaying spaces in column

Posted By:      Posted Date: October 08, 2010    Points: 0   Category :ASP.Net


I have a dropdownlist which is bound to a SQL Server 2008 Table.

My issue is i am having some spaces in one of the columns.

But while binding the datasource to this table the column spaces are truncated .

This is illustrated below

The table name is DataTable

DataValue is the column which I needs to get displayed in the dropdownlist

ID                                                                   DataValue

1                                                                    P2P 1111111111111111                             &nb

View Complete Post

More Related Resource Links

Multiple Column Dropdownlist for the ASP.NET DataGrid

Based on my previous control "Multiple Column DropDownList for ASP.NET", I received many emails asking for the same control to be used in the DataGrid for web applications. Here we go.. This control can be used as the regular MS DropDownList in the DataGrid and also as a regular dropdownlist. It has all the properties, like DataTextField, DataValueField, DataSource, SelectedIndex etc. The download file contains the samples both in VB.NET and C#. In this sample, I have used the Northwind database of SQL Server.

Help with displaying formview based on dropdownlist


I have a formview1 with a dropdownlist1 in the insert template. Based on the value of that dropdownlist I would like to display a second formview on the same page in insert mode so that I can write data to two different tables.

How can I accomplish this?

Is this the best way to do it?



DVWP not displaying a column as per the original list


I have a data view web part which displays a list column that allows multiple items to be selected from another list.  So in this column (in the actual list), the content in a particular cell is as follows:

6698; 1211; 3342; 1231; 1231

However, when I insert this field into the DVWP, the content above ends up losing all the spaces and so looks like this:


I am not sure why this is happening, and plus some of the entries in this column are made up of a very long string of numbers.  Even if I control the width of the column, this long list only ever gets displayed on one line (i.e. width restriction is ignored), therefore my page is being displayed very wide.  I think this is happening because of the lack of spaces in the string, but am not sure.

Does anyone know what is going on here?

Thanks for taking time to read.

Managed metadata column not displaying data



We are in process of rolling out our new intranet on SharePoint. Two days away from the launch we have run into a strange problem. We have various custom content types and within that we have custom columns which are managed metadata. The columns are then exposed in various document libraries and users choose appropriate metadata when adding the documents to the library. Everything was working fine, until yesterday all of a sudden we were not able to see any data in the columns which were managed metadata columns. But if we edit the properties of the document we can see the field is populated.

Another strange thing is that if the user has full permission in central admin they can see the metadata in the columns, but anyone else (including site owners) cannot.

Can anyone please shed some light on this and if someone knows how to resolve this?



Displaying column data from another source?


 I have a gridview databound to a database table, and i want to make a gridview column display data that is accessed using the primary key data from the databound source to address a table which is not the one databound - how would I do this please?

displaying row data in a vertical column format


The results of my query display the output in rows.  Each row of data belongs to an entity and contains about 12 fields.  I would like to generate a report that lists the entity and its corresponding data below it, in a column format. 

Instead of:

companyname1  contact1 phone1  email1 address1

companyname2  contact2 phone2  email2 address2

companyname(n) contact(n) phone(n) email(n) address(n)

I would like to have the info reported as follows:













How do I do this?  If I can get the query data displayed this way, I can export it to another program to do the last of the formatting.  I also have tried using Microsoft SQL Server Report Builder with the table/matrix format and with the list option.  The list option sort of works, but doesn't look very good.  Any ideas?




Sharepoint List - Column Descriptions are Not Displaying on the Edit Form

I have created a Sharepoint List that contains multiple columns of different types (text, choice, currency, etc).  I added descriptions for most of the columns, but only a few of the descriptions are displaying on the Edit Form.  It doesn't seem to matter what the column type is....as I have a description displayed for one text column but not another.  Is anyone aware of any limitations to the display of the column descriptions on the Edit Form?  The current platform is Sharepoint 2007. 

How to remove spaces from varchar column


Hello guyz;

I got a varchar column that I want to remove extra spaces from its contents.

what I want to do is keeping only 1 space between each 2 words ...I don`t want to keep more than one space between each 2 words

Newly promoted column in infopath not displaying value in sharepoint 2007 form library


Hi All,

I have a form library, which is allready having nearly 200 forms. Now i need to promote some more infopath 2007 form fields to sharepoint 2007 list column. But after promoting and re-publishing the infopath template, newly promoted columns does not show any value. Please suggest me how to fix this problem?

Work around :- If i just open a form and save it back, newly promoted field(Sharepoint library column) is displaying correct value. But this would be a tedious task if it has to be done for nearly 200 forms.


Thanks - Rajkumar Rurhi

Displaying SharePoint lists in Web Parts

When you create a built-in or custom list in Microsoft Windows SharePoint Services, Windows SharePoint Services creates a Web Part, a basic building block of a SharePoint site, to display that list. These Web Parts are called List View Web Parts. Windows SharePoint Services stores List View Web Parts in the site collection Web Part gallery. (The site collection Web Part gallery is the most central gallery of Web Parts for a work group. By default, the gallery name is the name of the site, such as "Our Team Site Web Part Gallery." )

Displaying Row Details Tooltip on GridView using JQuery

Continuing exploring JQuery! I decided to implement a feature to display some kind of details related to a row displayed on GridView. For example when displaying employees details on GridView some information might not fit in the GridView because it will make it huge and wide. These infomration can be diplayed as Tooltip. Or when you want to display a picture and some kind of formated text to be diplayed as tooltip when mouse hover on the image.

Using ASP.NET 3.5's ListView and DataPager Controls: Displaying Data with the ListView

Prior to ASP.NET 3.5, developers who needed to display a set of records could choose between the GridView, DataList, and Repeater controls. The GridView provides rich data features, but has a very boxy layout; the DataList and Repeater allow for a more flexible layout, but lack the "point and click" data features found in the GridView, DetailsView, and FormView controls. The ListView bridges the gap between layout flexibility and built-in data features.

This article, the first in a series of articles on the ListView and DataPager controls, looks at the ListView's many available templates and illustrates how to display data. Read on to learn more!

jQuery: Styling DropDownList Alternating Items (Rows)

In the following example, I will show how you can style any asp:dropdownlist very easily.

The example demonstrates how you can change alternating row items background color, using the fadeTo() to add a nice touch in the dropdownlist. You can change alt rows with a couple lines.

Displaying Data using ASP.NET 2.0 Repeater and C#

This tutorial will show you how to display data using the .NET Repeater Control, ASP.NET 2.0 and C#.NET

The Repeater control is a powerful tool and is easy to use.

First, you will need to import the System.Data.SqlClient namespace.

Tooltip for GridView Column Headers (ASP.Net)

I just wanted to add auto tooltips for my GridView headers. There are couple of ways but I don't want to use javascript and wanted to use simple 'title' attribute. It took couple of hours to get the working code supporting sortable columns. I thought it will be very useful for others. Here's the code and logic behind it.

Working with DropDownList and ListBox Controls in ASP.NET

"In my application i am using dropdownlist to display all categories from a table. When the user clicks this control I display all records in that category. Category table also contains column called color.

I wanted display some categories in dropdown list different color and others in different color using ASP.NET."-Anonymous

ASP.NET DropDownList Web Control, Part 1

Anybody with much experience in ASP has written an include file function for populating the contents of a SELECT dropdown list with entries from a database. Some of the more advanced users have even gone so far as to add caching to their function to reduce database hits for these rarely changing menu options. Naturally, these same techniques are going to be used with ASP.NET, but with a new programming object model. ASP.NET provides a web control, the DropDownList, which can be used for the same purposes as our custom built SELECT tag from Classic ASP.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend