how to show only part of text in normal mode in detailsview?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Eric

    how to show only part of text in normal mode in detailsview?

    Hi,

    I have a detailsview which shows large text. What i want is to show only the
    beginning of the text in normal mode and the full text in edit mode.
    Here the code:

    Thanks
    Eric

    <asp:SqlDataSou rce ID="SqlDataSour ce1" runat="server"
    ConnectionStrin g="<%$ ConnectionStrin gs:myconn %>"
    SelectCommand=" SELECT .... FROM mytable"
    UpdateCommand=" UPDATE ...." >
    <UpdateParamete rs>
    <asp:Paramete r Name="id" Type="Int32" />
    ....
    </UpdateParameter s>
    </asp:SqlDataSour ce>

    <asp:DetailsVie w ID="DetailsView 1" runat="server" ... >
    <Fields>
    <asp:TemplateFi eld >
    <ItemTemplate >
    <asp:Label ID="Label1" runat="server" Text='<%# Bind("n1")
    %>'></asp:Label>
    </ItemTemplate>
    <EditItemTempla te>
    <asp:TextBox ID="TextBox1" TextMode="Multi Line" runat="server" Text='<%#
    Bind("n1") %>' ></asp:TextBox>
    </EditItemTemplat e>
    </asp:TemplateFie ld>
    ....


  • Eric

    #2
    Re: how to show only part of text in normal mode in detailsview?

    i found it:
    in itemtemplate working with substring ...

    "Eric" <erl@sdsclem.po schreef in bericht
    news:%23K1inDvM JHA.5232@TK2MSF TNGP05.phx.gbl. ..
    Hi,
    >
    I have a detailsview which shows large text. What i want is to show only
    the beginning of the text in normal mode and the full text in edit mode.
    Here the code:
    >
    Thanks
    Eric
    >
    <asp:SqlDataSou rce ID="SqlDataSour ce1" runat="server"
    ConnectionStrin g="<%$ ConnectionStrin gs:myconn %>"
    SelectCommand=" SELECT .... FROM mytable"
    UpdateCommand=" UPDATE ...." >
    <UpdateParamete rs>
    <asp:Paramete r Name="id" Type="Int32" />
    ....
    </UpdateParameter s>
    </asp:SqlDataSour ce>
    >
    <asp:DetailsVie w ID="DetailsView 1" runat="server" ... >
    <Fields>
    <asp:TemplateFi eld >
    <ItemTemplate >
    <asp:Label ID="Label1" runat="server" Text='<%# Bind("n1")
    %>'></asp:Label>
    </ItemTemplate>
    <EditItemTempla te>
    <asp:TextBox ID="TextBox1" TextMode="Multi Line" runat="server" Text='<%#
    Bind("n1") %>' ></asp:TextBox>
    </EditItemTemplat e>
    </asp:TemplateFie ld>
    ...
    >
    >

    Comment

    Working...