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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:55:50+00:00 2026-05-31T00:55:50+00:00

I have a datebox user control in grid view and one of the properties

  • 0

I have a datebox user control in grid view and one of the properties is RowID. From Gridview I am passing the Row ID to the datebox as

<uc2:datePage1 ID="txtSubToSA" RowID=<%# Container.DataItemIndex %>   runat="server" Enabled="true" Text= '<%#Eval("SUBMITTED_TO_SA") %>' />

in the pageload of the usercontrol I am adding attribute to call a javascript function like this:

protected void Page_Load(object sender, EventArgs e)
    {

        txtDate.Attributes.Add("onchange", "getRow(" + RowID + ")");

    }
  public int RowID
        {
            get;
            set;
        }

Now when I make a change in the datebox of the gridview, no matter what row it is it always gives takes RowID of 0 and do not recognize changes I made in other rows. What is it that I am doing wrong here?

  • 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-31T00:55:51+00:00Added an answer on May 31, 2026 at 12:55 am

    You’re adding the onchange attribute in the Load event handler, before the RowId has been set – which will happend during databinding. You could perhaps override DataBind and set the attribute after databinding is complete:

    public override void DataBind()
    {
        base.DataBind();
        txtDate.Attributes.Add(...);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have deployed numerous report parts which reference the same view however one of them
Have one Doubt In MVC Architecture we can able to pass data from Controller
I'm trying to use jQM-DateBox with data-option timebox in Force Clock Mode, to have
Have converted devise new session from erb to Haml but doens't work, this is
Have you used the Perl 5.10 backtracking control verbs in your regexes yet? And
I am creating one application with jquery.mobile-1.0a4.1 release. I have a page which is
I have to give a particular width and height for datebox component in my
Have some runtime defined schedule for one week, for example: <schedule> <s day=Monday, time=1:00:00></s>
Different to: Restart an animated GIF from JavaScript without reloading the image I have
Have a fun issue with sharepoint calendar view filtering. That code works fine: SPSecurity.RunWithElevatedPrivileges(delegate()

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.