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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:07:50+00:00 2026-06-17T19:07:50+00:00

I have a JQuery Datepicker bound correctly (I feel so) to the gridview. It

  • 0

I have a JQuery Datepicker bound correctly (I feel so) to the gridview. It works fine and shows perfectly on all textboxes of the grid and on each row.

The problem is that it outputs the value to only first row.

So when I click on 10th row of the grid, a DatePicker pops out on the 10th Row, but when I select a date, that date is filled in the first row of the grid only.

No matter which row I choose, it always outputs the value to first row only.

Any help would be greatly appreciated.

I have tried to attach the DatePicker through both textbox ID as well as the Class name with no luck.

Thanks
Ashutosh

    $("#txtGivenDate").datepicker({ dateFormat: "dd/mm/yy", max: '0', changeYear: true,         changeMonth: true });

And the grid markup is as below:

    <asp:TemplateField HeaderText="Given Date" ControlStyle-Width="90%" HeaderStyle-Width="9%">
                <ItemTemplate>
                    <asp:TextBox ID="txtGivenDate" runat="server" Text='<%#Bind("GivenDate")%>' BorderStyle="None"
                        CssClass="youpi"></asp:TextBox>
                </ItemTemplate>
            </asp:TemplateField>

Tried all possible solutions

  1. Using Class name instead of ID
  2. Using IDs to identify the name of the textbox
  3. Using ClientIDMode=Static in the textbox declaration
  4. Attaching the JS from code behind on the RowCreated event of the gridview.

None seemed to work.

Thanks
Ashutosh

  • 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-06-17T19:07:52+00:00Added an answer on June 17, 2026 at 7:07 pm

    I think I figured out the answer.

    Problem was with the ClientIDMode.

    We need to set ClientIDMode of the textbox to “AutoID”.

    Setting this worked well and problem was resolved.

    Thanks everyone.

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

Sidebar

Related Questions

I'm using the jQuery datepicker where I have two textboxes (start date / end
I have used jquery datepicker in my .aspx page. The control is working fine.
I have two input text boxes which is bound to jquery Datepicker widget. When
hi I have a Jquery Datepicker object that is created fine with no highlighted
The jquery datepicker plugin works, but I'd like to have onSelect triggering a function
I have the usual Jquery datepicker working fine. But I want to feed it
I'm updating a JQuery datepicker with Ajax and have to reinitialize the datepicker each
I have a jquery datepicker which is renders the current date by default as
I have this jQuery datepicker code that initially set the minDate of the datepicker.
I have a JQuery datepicker that outputs the number of nights in a span

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.