.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

Remove column from Listview

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

I'm binding a listview control to LinqDataSource and can't find a way to remove unnecessary columns.

View Complete Post

More Related Resource Links

listView Sort for a celltmplate column

hi , i have a list view with a column that is binded to a field in my database the field contains integers that represents the City_ID , and i a have another table that contains the cities and their ID's, so , when i apply the sort based on this column (City Column) the list View is sorted based on the integers not on the city names here is my XAML definition of that column : GridViewColumn Header="City_Name_ID" Width="75">                         <GridViewColumn.CellTemplate>                             <DataTemplate>                                 <ComboBox IsSynchronizedWithCurrentItem="False" ItemsSource="{Binding Source={StaticResource CitysViewSource}}" SelectedValue="{Binding Path=City_Name_ID}" SelectedValuePath="City_ID" DisplayMemberPath="City_Name"/>                      &nb

Search - How to remove a meta tag ... / custom column is not showing up in Crawled Properties after

Hi I got the following warning after I crawled a site. Info out of Crawl Log: "The content for this address was excluded by the crawler because this item was marked with a no-index meta-tag. To index this item, remove the meta-tag and recrawl." Sound easy but I don't no where I could do it. The other problem is that I try to get a custom column from a custom list showing up in the crawle properties. I am using also a custom scope with the behavior "INCLUDE" ... In MOSS 2007 it was a lot simpler ;-) Thanks Regards MIA    

3 Column Listview output - is it possible

hi all, i am looking to create a 3 column listview output that looks like this.  Basically its an alphabetic list of one field but it needs to output like newspaper columns.  Is it possible to do this with simply css?  Or will i have to programmaticaly break up the dataset into 3 and actually make 3 listviews?     aaaaaaabaaacaaadaaaeaaaf   aaagaaahaaaiaaajaaalaaam aaanaaaoaaapaaaqaaar

ListView fixed size column headers

Hi, I am using a ListView in its 'Detail' view. I have added several columns there and I want to restrict resizing the column width. I couldn't find a ways to do that; is there any easy way to do that? ThanksCJ

Remove a dynamically added ListViewItem from a ListView

Good day, In my xaml I have created a window in my app which contains a  ListView control. I have programmatically added ListViewItems. The ListViewItems each contain a grid. Grid column 0 contains a textblock, Grid column 1 contains a textbox and Grid column 2 contains a button. What I would like to do is click the button in the ListViewItems grid, and remove the ListViewItem in the button is contained from the ListView. Could anyone suggest a way to do this? I would really appreciate any advice, as this is crucial to the feature I am creating.

Remove Empty Listview Header

Can any one help me to remove the empty header generated at the end of a listview . i am using it to display a gridview of rows.

Listview column issue??

Hello.      i have a listview with around 9 column and in that i have column as Address.Now everything works fine....Now suppose lots of character in Address then my css breaks...Is it possible to display few characters of the address followed by .....  ??? i have seen in few site but no clue how to implement...like instead of          Abhishek,House No.30,Middle Lane,Arizon.i want just        Abhishek,House No.30,Middle ......and i would like to implemet mouse hover extender later to display full address but i am not able to implement first part only...Can any one guide me on this??? and i have used this link for my css. http://mattberseth.com/blog/2008/05/modifying_data_with_the_listvi.htmlThanks.

remove pattern from string as seperate column

Hey  Everyone This seems like it shouldn't be too difficult but I'm strapped for time- I have a column where the data looks like CN=kmcde,OU=People,DC=ad,DC=FLA,DC=edu I want to pull out the 'kmcde' as a new column. I'm thinking some combination of substring and perhaps patindex but can't get it to work correctly Thanks kam

How do I remove column headers in list view webpart?

I'd like to remove the column headers from a list view web part, as well as from a document library web part. How can I accomplish this in SharePoint 2010?

best way to remove (or hide) a gridview column in a custom page


can someone tell what the best way to remove (or hide) a gridview column is within a custom page?

I dont want to show the link column that is automatically generated as a result of the relationship between the table in question and a parent table.



How to remove auto generated right blank column from the wpf datagrid?


i have already use this.


remove headings on each column in dispform


We use MOSS 2007. When click an item in a list, the item is displayed in dispform.aspx.

Then we can see two parts, left column is something like Icon, Tilte, short description ..., right column is ther ereall contents.

How can we hide the left part, meaning to hide the headings of the columns, because it doesn't make sense to show them to users.


remove Column header from List View Webpart


hi, i am having sharepoint 2010 Enterprise RTM trial on Windows server 2008 SP2. I wanted to know how a column header of a list in List View Webpart can be hide ?

i have tried the following article:


but i don't see any source editor in content Editor Weppart and also the Hidden button is disabled....

Is it necessary to do this task from code ?

Remove Column from List Content Type


I have a list that inherits from 2 site content type.  When I added the "site content types" to my list it created a "copy" of it in my "List Content Type". 

Then I created a new column directly into my list, and at the bottom of the column creation screen there is a checkbox saying "Add to all content types" that was checked by mistake (I dont want the List Content types to have the column).

Now, is there a way I can remove those columns from the "List Content Type"? 

I saw that I can delete the "List content type" and re-link to the "Site content type", but I would need to delete all of my items before doing that, and I want to avoid that.



Ellipsis and Black color on ListView column




I have a very awesome ListView. Now I want to make it look as awesome as it is. But I don't know how to do it. I have tried to do it with Styles and Templates but I just can't get the hang of it.


Here's what I have:

I have a ListView with a number of columns. Each column corresponds to a Property of MyClass. I have a number of instances of MyClass tossed inside a CollectionView which is set as the source of this awesome ListView. The columns are created during runtime in C# code. So the bindings are done there. There are no column in the XAML part (it's just an empty listview there).


What I want to do:

I want to first of all add CharacterEllipsis on all columns. So that if a columns is too narrow the text inside it will go "Somet..." instead of just cutting it off to Somet (with half a t).


The next thing is that when a column is sorted I want to change color on that specific column, to black. I have managed to use a DataTemplate to style a specific column but the problem here is that I don't know how to do the binding. :(


A small note: each column is created during runtime in C# code (note: not in xaml). I have a loop which creates each column, binds it to the correct corresponding property, and adds it to the ListView.


Data validation on a datetime column - or remove date part and only keep time part of the datetime2


Windows Server 2003, SharePoint Designer 2007, Windows SharePoint Services 3.0

I have a calendar list with start date(datetime1) and end date (datetime2).  Each is the default column created by the calendar list in SharePoint.  They both display a date and a time to choose from.

QUESTION:  Is there a way to remove the date section of the end date in a custom list form so that the user can only pick an end TIME?  Or, is there a way to force the end date (datetime2) to HAVE TO BE the same DATE as datetime1, only allowing for a different time?

Thank you!

How to remove the group ID of a lookup column when exporting SharePoint list to Excel?


I am exporting my SharePoint list with a people/group column and another lookup column to Excel spreadsheet. The problem is, in addition to the content of these two column, the group ID (from the lookup lists) of these two columns show after like "Jack Smith #45". I really need remove these numbers. I tried to use Excel formulas, but i found it very difficult since both of these two columns allow multiple choice. Any ways?


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