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 7196763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:50:24+00:00 2026-05-28T20:50:24+00:00

<asp:GridView ID=CommentGrid GridLines=None runat=server AutoGenerateColumns=False> <Columns> <asp:BoundField HeaderText=No. DataField=Num > <HeaderStyle HorizontalAlign=Left /> </asp:BoundField>

  • 0
            <asp:GridView ID="CommentGrid" GridLines="None" runat="server" AutoGenerateColumns="False">
            <Columns>
                <asp:BoundField HeaderText="No." DataField="Num" >
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField HeaderText="Subject Name" DataField="SubjectName">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="Comment">
                    <ItemTemplate>
                        <asp:TextBox ID="CommentBox" runat="server" TextMode="MultiLine" CssClass="commentTbx" MaxLength="2"></asp:TextBox>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:TemplateField>
            </Columns>
        </asp:GridView>

The above Maxlength=”2″ doesnt work!! I even tried other method like databound, and foreach loop to code it but it still fails.

  • 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-28T20:50:25+00:00Added an answer on May 28, 2026 at 8:50 pm

    Yes, it is because of TextMode="MultiLine" . You need some javascript to check total chars and impose limit.

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

Sidebar

Related Questions

<asp:GridView ID=GridView3 runat=server Width=100% DataSourceID=SDSAllowPaging=True AutoGenerateColumns=False > <Columns> <asp:BoundField DataField=Hint HeaderText=textSortExpression=Hint /> <asp:BoundField DataField=Visi
I have the following gridview: <asp:GridView ID=gdvReport runat=server AutoGenerateColumns=False DataSourceID=sdseport> <Columns> <asp:BoundField DataField=Phone HeaderText=Phone
Here is my ASP code: <asp:GridView ID=WagerTable runat=server AutoGenerateColumns=False CssClass=basix > <columns> <asp:BoundField DataField=GameName
so I have a GridView like this: <asp:GridView ID=gv runat=server AutoGenerateColumns=False GridLines=None OnRowCommand=gv_RowCommand OnRowDeleting=gv_RowDeleting
I have a GridView : <asp:GridView ID=GridView1 runat=server AllowPaging=True GridLines=None HorizontalAlign=Left AutoGenerateColumns=False DataSourceID=SqlDataSource1 onrowcommand=GridView1_RowCommand1>
I have a gridview like this. <asp:GridView ID=grdMerchant runat=server GridLines=None HeaderStyle-Font-Bold=True AutoGenerateColumns=False AllowSorting=True ShowHeader=false
<asp:GridView Width=700 ID=gridInboxMessage runat=server DataSourceID=LinqDataSource1> <Columns> <asp:BoundField DataField=Row Visible=false HeaderStyle-Width=10 HeaderText=row ReadOnly=True SortExpression=Row />
I have a Gridview <asp:GridView ID=GridView1 runat=server Width=400px AutoGenerateColumns=false OnSelectedIndexChanged=GridView1_SelectedIndexChanged1> <Columns> <asp:TemplateField> <ItemTemplate> <asp:CheckBox
I want to populate GridView below with images: <asp:GridView ID=GrdDynamic runat=server AutoGenerateColumns=False> <Columns> </Columns>
I have this ASP.NET code: <asp:GridView ID=gvImages runat=server AutoGenerateColumns=False CellPadding=4 ForeColor=#333333 GridLines=None> <Columns> <asp:ImageField

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.