how to display alerts in infopath form template - InfoPath Dev
in

InfoPath Dev

how to display alerts in infopath form template

Last post 11-24-2009 09:54 PM by Qazi Anis. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 11-23-2009 04:01 PM

    how to display alerts in infopath form template

    I'm learning infopath and designing the form. I have couple of questions -

    I would like to know how to display alerts in infopath.

    I'm not using data validation and I have some required fields. I would like to check if required field is empty, then disable the submit button. If not, enable the submit button.

    I have a textbox. is there a way to update the text in infopath form.

    public void rank_Validating(object sender, XmlValidatingEventArgs e)

    {

    //Ensure validation is only done when inserting or changing a value

    if (e.Operation == XmlOperation.Insert || e.Operation == XmlOperation.ValueChange)

    {

    //Check the Length of the NewValue of the field

    if (e.Site.InnerXml.Length <= 4)

    {

    string Newrank = e.Site.InnerXml.PadLeft(4,'0');XPathNavigator field = this.MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:rank", this.NamespaceManager);

    field.SetValue(Newrank);

    }

    }

    }

    I would really apreciate if someone can help me to resolve these issue. I have been struggling for a week.

    Thanks,

    -Shraddha

  • 11-23-2009 09:06 PM In reply to

    Re: how to display alerts in infopath form template

    to update textbox in infopath

    XPathNavigator xnDoc = null;

    XPathNavigator xnDoctemp = null;

    xnDoc = this.MainDataSource.CreateNavigator();

    xnDoctemp= xnDoc.SelectSingleNode("/my:myFields/my:fieldname", this.NamespaceManager);

    xnDoctemp.SetValue("your value");

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 11-24-2009 10:37 AM In reply to

    Re: how to display alerts in infopath form template

    Thanks you for reply. how do I update original XPathNavigator?

  • 11-24-2009 09:54 PM In reply to

    Re: how to display alerts in infopath form template

    i am not able to get your question (how to update original xpathnavigator).

    Can u rephrase it

     

     

    Qazi Anis
    Technical Architect
    Bitwise Inc
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.