Help me ...On Results not shown in the dropdownlist...Plz its very very urgent need - InfoPath Dev
in

InfoPath Dev

Help me ...On Results not shown in the dropdownlist...Plz its very very urgent need

Last post 11-10-2010 12:04 PM by Hilary Stoupa. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 11-08-2010 02:31 AM

    Help me ...On Results not shown in the dropdownlist...Plz its very very urgent need

    Hi All,

    I want to display sharpointlist items in a dropdown list control. for ref : below url same code i was  developed the form .

     http://www.walisystems.com/articles/SPS/dropdown2/sharepoint_list_data.htm

    but, when i publish,  am not getting data in the dropdown list even when i check preview also.

    I have  given the full trust and signature check option also. 

     please guide me .wt is the mistake have done.....

  • 11-08-2010 12:52 PM In reply to

    Re: Help me ...On Results not shown in the dropdownlist...Plz its very very urgent need

    The first thing that comes to mine is whether or not you changed the text field to a drop down box.

  • 11-08-2010 12:58 PM In reply to

    Re: Help me ...On Results not shown in the dropdownlist...Plz its very very urgent need

    Why are you using code for this? At least, the article you linked to uses code for this... If you are using code to populate your drop down list, my first guess would be you have an error in your code.
    Hilary Stoupa

  • 11-08-2010 08:40 PM In reply to

    Re: Help me ...On Results not shown in the dropdownlist...Plz its very very urgent need

    Hi All,

    Thanks for given reply. This code , am using populate list items into the dropdownlist control.

    The code is 100% is correct. there is no error. when i publish it is not giving any error. but the data is not shown in the dropdownlist.

    I think, anysetting to be need for the form ? But i already given full trust level and signature .

    I dont know , why the data is not populate. ?

     

    Below is the code i am given in the formEvents_ loading

    <b>

    try

    {

    SPSite site = new SPSite("http://srv-hq-itd-tmp1/");//SPContext.Current.Site;

    SPWeb web = site.OpenWeb();

    SPList list = web.Lists["List2"];

    SPListItemCollection listitems = list.Items;

    XPathNavigator nav = this.CreateNavigator().SelectSingleNode("/my:myFields/my:Countries", this.NamespaceManager);

    foreach (SPListItem li in listitems)

    {

    XPathNavigator newNode = null;

    newNode = nav.Clone();

    newNode.SelectSingleNode(
    "/my:myFields/my:Countries/my:Displayname", this.NamespaceManager).SetValue(li["Title"].ToString());newNode.SelectSingleNode("/my:myFields/my:Countries/my:Value", this.NamespaceManager).SetValue(li["Title"].ToString());

    nav.InsertAfter(newNode);

    newNode =
    null;

    }

    nav.DeleteSelf();

    nav =
    null;

    }

    catch

    {

     

    }

    </b> 

     

    Thanks

    MAK

     

     

  • 11-09-2010 07:15 AM In reply to

    Re: Help me ...On Results not shown in the dropdownlist...Plz its very very urgent need

    Try right clicking on the field and check the properties to be sure you have a Drop Down list box instead of just a text field.

    BJ

  • 11-09-2010 07:32 AM In reply to

    Re: Help me ...On Results not shown in the dropdownlist...Plz its very very urgent need

    Hi John,

    Thanks for givenr reply.

    I have checked,  it is a Dropdown list . not textbox .

     

     

     

  • 11-09-2010 10:21 AM In reply to

    Re: Help me ...On Results not shown in the dropdownlist...Plz its very very urgent need

    Again, I am wondering why you are using code for this.

    However, if you are sure your code is not the issue, drag the my:myFields/my:Countries field onto your form as a repeating table and preview your form. Do you see the data in that table that you'd expect? If so, the issue is with your drop down -- make sure you select the option that the data for your drop down is in your form, and select the Countries field. If the data is NOT there, the issue is somewhere in your code.

    If your issue is that your code works in client, but not in browser, you probably need to admin approve your template for use in the browser since it has managed code. 

    Hilary Stoupa

  • 11-09-2010 08:41 PM In reply to

    Re: Help me ...On Results not shown in the dropdownlist...Plz its very very urgent need

    Hi Hilay,

    This code for am using populate the sharepoint list items into the dropdownlist control.

    As you said, i tryed drag the repeating table of  my:myFields/my:Countries  onto the form. when i click the preview data is not display.

    I am sure that it is dropdown list , not any control and data is availble in the sharepoint list .

    next u said, admin approve to the template : am login with admin previlages and its already checked the " Allow fully trusted forms to your computer " in the trust center .

    its strang.......... 

    thanks

    mak. 

     

  • 11-10-2010 12:04 PM In reply to

    Re: Help me ...On Results not shown in the dropdownlist...Plz its very very urgent need

    Well, you say that on preview there is no data in the nodes you are populating via code. Thus, something is going wrong either with the code for getting data from List2 or with the code for populating the main data source from. Run in debug and see if you are actually getting data back from SharePoint.
    Hilary Stoupa

Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.