.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

ListViewSubItem: Display End of Text Instead of Beginning?

Posted By:      Posted Date: October 02, 2010    Points: 0   Category :Windows Application


in the case the ColumnHeader's width is too small, is it possible to not show the beginning of the SubItem's text (ending with "..."), but the end of the text, starting with "..."?


View Complete Post

More Related Resource Links

ActiveX and Visual Basic: Enhance the Display of Long Text Strings in a Combobox or Listbox


The combobox and listbox controls in Visual Basic have no built-in support for displaying text strings that are too long to fit in the visible area of either control. This article describes several techniques to improve the readability of long strings in each control. The first technique uses tooltips to display a combobox or listbox item. The other techniques, which use various Windows APIs, include adding a horizontal scrollbar for a listbox and determining the necessary width of the longest string given the font attributes of the text. The required steps are described for both comboboxes and listboxes.

John Calvert

MSDN Magazine December 2000

Get the Display Name of a dropdown into a text box


I have created a dropdown control and a text box control in my infopath form. I am binding some values to the dropdown control from a sql database with "value" field as "@ID" and "Display name" as "@Name"

Now, when the user select the dropdown the display name should be auto-populated in the textbox I created, not the "@ID" value.

How to achieve this.

How to use display Text in Hyperlink For SharePoint 2010 Designer Workflow


In SharePoint 2007 Designer, I have used the Hyperlink column to store the link "http://www.sharepoint.com/Default.aspx, Details". The details text will be shown in the Hyperlink column. Everything works fine in sharepoint 2007 Designer workflow.

In SharePoint Designer 2010 Workflow, I used the same method but the hyperlink column is displaying the full text "http://www.sharepoint.com/Default.aspx, Details" instead of only Details


DropDownList to display values from Two Tables - bold sub heading and normal Text

Hello I hope I am not asking simple one.  SUPPORT SERVICES<     Computing Service    Library or Data Engineering    Civil Engineering    Electrical Engineering  I have the data to display in a DropDownList control shown as above. There is a distinct category Type(example Support Services) and Category Name i.e., Computing Services. I do not want to hard code the values into DropDownList control. I like to get the data from database to display as shown in above Table. Note that Category Type should be displayed in Bold and Category Name in normal Text. Question: In order to achieve the above, 1. How many database Tables and relationships between them  2. Query the data to display in the above format in drop down 3. how should be the code behind i.e, DataTextValue and DataValueField for DropDownList. Please provide with useful code snippets or references. Thanks,

How to display multiline text in ECT formview?

Hello, with SPD i created External Content Type from MSSQL database. How to customize SharePoint:FormField in dispform.aspx to display multiline text from database? I tried use NoteField insted, but it trows excepion. BR  

Display each new line of a sharepoint mutliline text field as choice in drop down box.

The question pretty much says it all. I have a lot of data I need to represent, and this would be the best way to do it. I have a multiline text field in sharepoint, where each line has a choice that should be a seperate choice in a text box. How do I do this? I have the data connection set up, and I would be fine with adding some sort of tag after each line, if that would make it so infopath can somehow parse out those tags, and interpret each "chunk" as a choice. Thanks in advance for your help.

how to refresh display label.text under for loop condition


Dear All,

I have a for loop condition as below coding for looping to change word on label.text, but as a result, it just only display the last value.

pls help me how can I do to display each value for a looping.

i want the result is the label1.text to show 1 then 2, then 3, then 4.......finally is 10.

for i as integer = 0 to 10

   label1.text = i


thx all



C# data bound combobox: display selected item text in separate label.content


I am new to C# but I'm resisting the urge to run screaming back to VB.NET. I'm working with a WPF application using C# code-behind and a lot of binding to a SQL 2005 database backend.

GOAL: I have a comboBox bound to a tbl_Systems entity which provides a list of systems for user selection. When the User selects a system from the comboBox I want to display the selection's text in a separate Label. The big picture is that several comboBox selections will be used to build a query string that will populate a listbox. So, I want to display these selected values in the Label so the user can see the query string they have dictated.

PROBLEM: When I set the Label content property to the comboBox SelectedItem property the entity tbl_System is displayed in the Label not the comboBox selection text.

SUSPICION: From reading similar examples in VB I suspect that the comboBox SelectedItem is actually a "datarowview" or the C# equivalent. But I don't know how to translate this explanation to C#.

The UI XAML comboBox properties are set as such:


Display Binary PDf in HTML/Text



I am saving user uploaded PDF files in SQL server using varbinary datatype. There is totally no problem in saving in binary and retrieving in PDF. But due to one specific requirement (which i cant change) i to need to fetch binary PDF and display in HTML or atleast get in string form.

Is it possible? If yes how.

Rite now i m opening PDF files like code written below. But it opens a PDF reader in browser. I want to display the data of PDF in plain text instead in PDF reader.

bytedata = (byte[])dsPrograms.Tables[0].Rows[0]["PDFFile"];
                PdfReader pdfReader = new PdfReader(bytedata);
                Response.ContentType = "application/pdf";
                PdfStamper pdfStamper = new PdfStamper(pdfReader, Response.OutputStream, '\0', true);
                AcroFields pdfFormFields = pdfStamper.AcroFields;
                AcroFields docFields = pdfStamper.AcroFields;
                pdfStamper.FormFlattening = false;

ContentResult type="text/xml" - IE cannot display this feed


When I return a ContentResult that is ContentType="text/xml" I get an error in the browser - Internet Explorer cannot display this feed.

What would be in the XML that is triggering IE to think it is a feed, and how do I tell IE to not think such things?

When I set Content to contain only the first, 2nd and last line of the XML stream, it renders correctly as XML.


Here is my code:

    public ContentResult InventoryFeed()
        ContentResult cr = new ContentResult();
        cr.Content = System.IO.File.ReadAllText("c:\\downloads\\amazon\\response.txt");
        cr.ContentType = "text/xml";
        return cr;


And here is the XML: 

<?xml version="1.0"?>

<GetFeedSubmissionListResponse xmlns="http://mws.amazonaws.com/doc/2009-01-01/">

What are the best way to display text from database using MVC



I have created a MVC application its working fine. I have created a view which have few viewdata variables. I am filling these with my database values, and they are updated in loop. This method take 40-50 seconds to display actual page contents. So is there any other way to display the contents which we get till now and do refresh it till all contents are loaded.

Please let me know how can I refresh the page ?

Thanks in advance, Laxmilal Menaria

Display ALL saved text data of lists from isolated storage


How do I display ALL of my saved items of different list from the isolated storage?

Eg. I created a list named "Breakfast" with 2 Bandung and 3 Water inside.

Created another list named "Lunch" with 5 Bandung and 2 Hot-tea inside.

When I click to view "Lunch" list, it will display out the list with "5 Bandung and 2 Hot-tea".

However, I can only manage to display "Hot-tea" without the quantity, and unable to display 5 Bandung as well.

How do I go about displaying all of the items inside the selected list?

Thank you!



private void addListBtn_Click(object sender, RoutedEventArgs e)
    using (IsolatedStorageFile storage = IsolatedStorageFile.GetUserStoreForApplication())
      StreamWriter writeFile = new StreamWriter(new IsolatedStorageFileStream("ListFolder\\savedList.txt", FileMode.OpenOrCreate, storage));
      for (int i = 0; i < (Application.Current as App).userDrinksList.Count; i++)
        String drink = (Application.Current as App).userDrinksList[i].ToString();

        XDocument _doc = new XDocument();


GridView inline Master/Detail record display

This code drop is part of a smash and grab series. If you're in a rush, you can just grab this code and insert it into your application, no understanding is required. When you have some time (ya, right) you may want to review the source code.

Display data in gridview dynamicallay

I have AD domain which has 100000 users, I want to display all the users in gridview controls.Actually it is displaying users in gridview after parsing entire domain which takes around 30 min. I want to display the users while loading itself.It is continously getting user information from AD domain and getting each user details, I want to display the users information which already queried instead of waiting till getting all users information

asp.net display data in gridview

i want to display data in gridview binded to a sql datasource
but the problem part is i want to bind a field of that datasource to a dropdownlist and when a item is selected in that dropdownlist then correcposnding to that data will be displayed in gridview...

display data into GridView from excel sheet

I have to display data from excel sheet into my gridview and also I need to figure out a way to store data into excel files from my web page. I am using C# 3.5, VS 2008.

Display Related Data in an ASP.NET GridView

Typically when you display a datagrid you will want to show data from a related table. There are 3 different ways to accomplish this with NetTiers. You can use a custom stored procedure, deepload functionality from the code behind, or a strongly typed datasource control. We'll provide an example of each
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