Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 621011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:49:38+00:00 2026-05-13T18:49:38+00:00

itemtemplate width not working. i make width=50 bit it is never 50but is always

  • 0

itemtemplate width not working. i make width=”50″ bit it is never 50but is always more then 50. is it possible to make with on td that gridview create?

<asp:GridView ID="gwTemporaryCities" runat="server" AutoGenerateColumns="False">
    <Columns>
        <asp:TemplateField HeaderText="Ime">
            <ItemTemplate>
                <asp:Label ID="lblName" runat="server" 
                    Text='<%# StripHTML(Eval("Name")) != "" ? StripHTML(Eval("Name")) : "/" %>'></asp:Label>                    
            </ItemTemplate>
        </asp:TemplateField>  
        <asp:TemplateField>
            <ItemTemplate>
                <asp:LinkButton ID="lnkBtnDelete" runat="server" Text="Odstrani" CommandName="DeleteTemporaryCity" Width="50"
                    CommandArgument='<%# Eval("idTemporaryCities") %>' 
                    OnCommand="lnkBtnDelete_Command" CausesValidation="False"></asp:LinkButton>
                <asp:ConfirmButtonExtender ID="cbeDelete" ConfirmText="Ali ste prepričani, da želite odstraniti mesto?"
                    runat="server" TargetControlID="lnkBtnDelete">
                    </asp:ConfirmButtonExtender>
            </ItemTemplate>
        </asp:TemplateField>                         
    </Columns>
    </asp:GridView
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T18:49:38+00:00Added an answer on May 13, 2026 at 6:49 pm

    You’re not setting the width of the ItemTemplate, but of one of the controls contained within the item template

    On top of that, the control you’re setting the width on is a LinkButton, which is effectively the same as saying:

    <a href="[...]" width="50">Odstrani</a>
    

    But depending on your font, the text “Odstrani” is probably wider than 50 pixels, so this width setting is likely to be ignored as there’s no way to break that one word under 50 pixels.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following checkboxes in my gridview: <asp:TemplateField HeaderText=Active> <ItemTemplate> <%# DataBinder.Eval(Container.DataItem, Active)%>
My issues here is that this does not compile. I get A control with
I have a ModalPopup in the ItemTemplate of a GridView like <ItemTemplate> <asp:LinkButton ID=lnkbtnSeek
I have a gridview in an update panel and it is working fine. However
I am working on creating a Windows Phone app that will play a series
I have a GridView with dynamically created image buttons that should fire command events
I have Tab Container, and i have a GridView inside that. I need to
I have Image in ItemTemplate that will be changing according to Username (ie lblPostedBy.Text).
<asp:GridView ID=GridView1 runat=server AutoGenerateColumns=false Height=146px Width=308px> <Columns> <asp:TemplateField HeaderText=Original Price ControlStyle-Width=100px> <ItemTemplate> <asp:TextBox ID=txtOriginalPrice
I've just recently started working on an app that displays a bunch of xml

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.