Cannot set value of RadNumericTextBox when checking for session datatable

3 posts, 0 answers
  1. Dave Miller
    Dave Miller avatar
    64 posts
    Member since:
    Oct 2004

    Posted 20 Sep 2008 Link to this post

    I cannot set the value (and I've also tried the text) of a RadNumericTextBox when checking for a session datatable returns true. I am trying to set the value from the session datatable. If the check returns false it sets the value but if true the RadNumericTextBox is blank. I've even tried commenting out everthing when true and just setting the value to no avail. The version for this site is 2008.1.415. Could it be a bug (that maybe was fixed later) or am I missing something. Please see code below.

    Any help would be greatly appreciated

    Dave


    private void ProcessQuoteRequests()

    {

    if (((DataTable)Session["DtQuoteRequest"]) != null)

    {

    //txtQuantity.Value = 5;

    DataTable dt = new DataTable("dtQuoteReqTemp");

    dt = (

    DataTable)Session["DtQuoteRequest"];

    DataRow dr = dt.Rows.Find(intProdID);

    if (dr == null)

    {

    phAddToQuote.Visible =

    true;

    phAddedQuote.Visible =

    false;

    lblQuantity.Visible =

    false;

    TempLabel.Text =

    "";

    txtQuantity.Value = 1;

    }

    else

    {

    TempLabel.Text =

    "Successfully added to quote request";

    phAddToQuote.Visible =

    true;

    lblQuantity.Text = dr[

    "Quantity"].ToString();

    txtQuantity.Value =

    Convert.ToInt32(dr["Quantity"].ToString());

    phAddedQuote.Visible =

    true;

    }

    }

    else

    {

    phAddToQuote.Visible =

    true;

    txtQuantity.Value = 1;

    }

    }

  2. Dave Miller
    Dave Miller avatar
    64 posts
    Member since:
    Oct 2004

    Posted 21 Sep 2008 Link to this post

    I have been able to solve this by moving the logic for setting the value for the RadNumericTextBox to its PreRender Event which now works fine.

    Best regards,
    Dave
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Esther Nirmala
    Esther Nirmala avatar
    19 posts
    Member since:
    Apr 2010

    Posted 03 Aug 2011 Link to this post

    Hi

        I am using Rad numeric text box in my page. Am trying to set the value of numeric text box on seleting a drop down list. But its not displaying the data. And i tried to set the value in prerender of text box also.. that is also not working . How to set the value of rad numeric text box in code behind. If i assign directly to value property its working.. If am assigning from viewstate its not working.

       protected void dropDownListResource_SelectedIndexChanged(object sender, EventArgs e)
            
    radNumericTextboxRate.Value = this.ResourceController.State.ResourceClientTypeCharge.DailyRate;
     //      radNumericTextboxRate.Value = 123;
    }

    how to set text from viewstate in rad numeric text box.. I tried in prerender event too..  but no progress :(:(

    Thx
    nirmal
Back to Top