Updating a Label content from code behind using dispatcher

hi,
I am trying to update a label's content from code behind.
This part of the code is running in background worker. I wrote the following code to update a label's content:
volumecontrol.Dispatcher.BeginInvoke(new Action(() =>
volumecontrol.Content = volumeupdate;
 i tried using both BeginInvoke and Invoke but the application exits with the error:
System.InvalidOperationException' occurred in WindowsBase.dll
Using Invoke works when updating the UI from another thread but it not working in this case:
Pls help.
Thanks,
Shaleen
TheHexLord

When you do that new action stuff you're capturing variables.
If that means you grab a control's value across from outside the {} then you're trying to capture the variable on the background thread.  If that's some sort of control you're messing with then that will cause a problem as they have thread affinity.
Because you don't want to be blocking the UI thread at all you should use BeginInvoke rather than Invoke.
To explain this clearly - and provide a way you could use to explore what's going on and learn  - we need a separate thread which can be done using Task.Factory.StartNew.
This bit of code allows you to put code onto a background thread:
Task.Factory.StartNew(() =>
// On a separate thread to the UI here
Create a new solution, add a textBlock and Button:
<StackPanel>
<TextBlock Name="tb"/>
<Button Name="btn" Click="btn_Click">Change the text</Button>
</StackPanel>
Then in the button click you can play around with what's going on.
Just to be clear.
That textblock is a control and it is created on the UI thread.
To get from that task thread back to the UI thread you should use Dispatcher.BeginInvoke.  With no control name.
Let's start with a broken piece of code:
private void btn_Click(object sender, RoutedEventArgs e)
Task.Factory.StartNew(() =>
string thingummy = tb.Text + "Banana";
Dispatcher.BeginInvoke(new Action(() => { tb.Text = thingummy; }));
When you click the button it'll error because when you access tb.Text there you do so on a background thread and tb has thread affinity.
This, however, will work OK.
Task.Factory.StartNew(() =>
Dispatcher.BeginInvoke(new Action(() => { tb.Text = tb.Text + "Banana"; }));
That's OK because the Action runs on the UI thread where tb was created and all is good.
Anonymous methods and actions capture variables ( you can google that for more info ).
If you wanted to use a variable which was created on the background thread you can set it here:
Task.Factory.StartNew(() =>
string thingummy = "banana";
Dispatcher.BeginInvoke(new Action(() => { tb.Text = thingummy; }));
or here
string thingummy = "banana";
Task.Factory.StartNew(() =>
Dispatcher.BeginInvoke(new Action(() => { tb.Text = thingummy; }));
They both work.
They are not accessing properties of a UI control because you're just setting the variable to a string.
All of which means you could have a variable in your code which is set to volume or whatever that is from your control  ON THE UI THREAD and then modify that variable on the background thread.  Variables do not have thread affinity.  A
double, string or whatever isn't a control.
And this approach might well be more convenient.
Hope that helps.
Recent Technet articles:
Property List Editing ;  
Dynamic XAML

Similar Messages

  • Detect current device channel from code behind

    From
    MSDN article about device channels:
    Also, device channels can set a JavaScript variable called effectiveDeviceChannel that contains the current channel alias. This variable can be used to show which channel is currently being used.
    Is there similar variable, that could be used in code behind (in C#), to determine which channel is currently used?

    You can use DeviceChannelPanel in your web part...
    For e.g. the following in a visual web part will render only to a channel that is targetted for tablets.
    <Publishing:DeviceChannelPanel runat="server" ID="pnlTab" IncludedChannels="Tab">
        You can see this tab devices.
    </Publishing:DeviceChannelPanel>
    From code behind, you can create a device channel panel dynamically and add contents to it.
    e.g.
                LiteralControl l = new LiteralControl();
                l.Text += "Sample content for tablets";
                DeviceChannelPanel dp = new DeviceChannelPanel();
                dp.Controls.Add(l);
                dp.IncludedChannels = "Tab";
                MyPanel.Controls.Add(dp);

  • How to execute SQL Query in Code behind Using infopath 2010?

    Hi,
    I've repeatable on infopath form, and want bind it throuth code behind from SQL table. My question is that how to execute SQL Query in code behind from infopath as well as how would get Query result to bind repeatable control?
    Thanks In Advance
    Shoeb Ahmad

    Hello,
    You first need to add new SQL DB connection then you need execute connection from code behind.
    See below link to create new connection
    http://office.microsoft.com/en-in/infopath-help/add-a-data-connection-to-a-microsoft-sql-server-database-HP010092823.aspx:
    http://www.bizsupportonline.net/infopath2010/connect-infopath-2010-sql-server-2008-table.htm
    Then use below code to execute this connection:
    AdoQueryConnection conn = (AdoQueryConnection)(this.DataConnections["Data connection name"]);
    string origCommand = Select * from tablename;
    conn.Command = origCommand;
    conn.Execute();
    Finally bind your table:
    http://www.bizsupportonline.net/infopath2007/4-way-programmatically-add-row-repeating-table.htm
    http://stevemannspath.blogspot.in/2010/09/infopath-20072010-populate-repeating.html
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • [WPF] AutoCompleteBox: set parameters from code behind

    Hi,
    I'm using AutoCompleteBox from Codeplex.com
    I would set some parameters from code behind... 
    In XAML, I defined namespace:
    xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
    After using AutoCompleteBox:
    <toolkit:AutoCompleteBox
    x:Name="myAutoComplete"
    ItemsSource="{Binding Source={StaticResource DomainDataViewModel}, Path=SampleProperties, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
    SelectedItem="{Binding Name}"
    ValueMemberPath="Name"
    ItemTemplate="{StaticResource PropertyBoxItemTemplate}"
    MouseLeave="PropertyAutoCompleteBox_MouseLeave"
    >
    </toolkit:AutoCompleteBox>
    If I would set any parameter from code behind, in my.xaml.cs, I not found myAutoComplete, why?
    Thanks.

    >>I inserted the AutoCompleteBox as DataGridTemplateColumn.CellEditingTemplate.
    Then you cannot access it directly from the code-behind as I told you.
    >>I would apply a FilterCustom and a ItemFilter.
    You could handle the Loaded event for the AutoCompleteBox and set any of its properties in there:
    <toolkit:AutoCompleteBox
    x:Name="myAutoComplete"
    Loaded="myAutoComplete_Loaded"
    ItemsSource="{Binding Source={StaticResource DomainDataViewModel}, Path=SampleProperties, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
    SelectedItem="{Binding Name}"
    ValueMemberPath="Name"
    ItemTemplate="{StaticResource PropertyBoxItemTemplate}"
    MouseLeave="PropertyAutoCompleteBox_MouseLeave"
    >
    </toolkit:AutoCompleteBox>
    private void myAutoComplete_Loaded(object sender, RoutedEventArgs e)
    AutoCompleteBox myAutoComplete = sender as AutoCompleteBox;
    //set properties or do whatever here...
    myAutoComplete.ValueMemberPath = "Name";
    dynamic dataObject = myAutoComplete.DataContext;
    //access any properies of the data object in the DataGrid...
    How to do filtering is a completely other question that should be asked in a new thread though. It has nothing to do with your original question.
    Please remember to mark helpful posts as answer to close your threads and then start a new thread if you have a new question. Please don't ask several questions in the same thread.

  • Raiseevent from code behind

    I need to use the PCC to update a secondary portlet at a specific time during the postback of a click event. Can I use the PCC to raise an event from the code behind file?

    I'm afraid you cannot do this - the PCC exists solely on the client so must be called from the client, not the server. What you can do is include some javascript to handle this instead. One simple solution would be to add the script block
    <script defer language="JavaScript">document.PCC.raiseEvent(...)</script>
    This however will only work in IE. If you want cross browser support then you will have to register for your own portlets rerender event, then upon a rerender you must check some condition which you set in the codebehind (i.e. the text in a hidden element) and raise the PCC event accordingly.

  • Newbie: Trying to get data  from Code Behind file to HTML file.

    Greetings,
    I am trying to use the opener link adaptive tag to open a specific page. I have the Object ID, and classID as variables in my class in my class file, but I do not know how to get that data into the opener link which is on the html page.
    Should I be using session variables? If so how, I am a newbie.
    Does anyone know how?
    Thanks.

    Kinda depends on your flavor/need/preference. I've done it...
    * Using session variables and just writing to the page in script blocks. Not preferred in .NET-land, but definitely more of the fast/traditional ASP style. Use sparingly and with caution. Be really careful about VS.NET totally destroying your tags. It seems to love doing that (as an aside - HUGE thank-yous to the BEA engineers who altered the tags to consistenly use lower case. Really. I can't thank you enough. :) )
    * Using label controls and then just populating the label with the formatted adaptive tag (this can work well)
    * One of our guys did a really simple/elegant server control that takes arguments for the objectid, classid, etc. Nice for creating things repeatedly server-side and gets you by the HTML, quotes, etc. all over the place. Nice as it also consolidates the tag in a single place you can alter once.
    For session variables, you'd just do something like...
    <%
    '//in your code-behind
    Session("myClassID") = 18
    Session("myObjectID") = 12345
    %>
    <!-- in your aspx file -->
    <pt:standard.openerlink xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/' pt:objectid='<%=Session("myObjectID")%>' pt:classid='<%=Session("myClassID")%>' pt:mode='2' target='myWindow' onclick=window.top.open('','myWindow','height=800,width=700,status=no,toolbar=no,menubar=no, location=no');>Adaptive Tags Made This Easy - Click to Open My Awesome Document</pt:standard.openerlink>
    That help?
    Personal style, I would try to avoid using session, etc. directly on your ASPX file. I'd go with writing out the HTML through labels, data lists, etc. in your code-behind.
    Thanks,
    Eric

  • Setting JSLink for XSLTListViewWebPart from code behind

    I am adding an XSLTListViewWebPart from within a user contol code behind.  It adds fine, but I am not able to get it to resolve the JSLink file.  The js file works, as I've attached it to a list view web part in the web part properties and it works.
    How do I set the JSLink property from the code?  I have set it on the view object and on the XsltListViewWebPart, but neither has any effect.  This has to be deployable from a wsp, so setting the value from the UI is not an option. 
    XsltListViewWebPart FooterMenuListView = new XsltListViewWebPart();
      FooterMenuListView.ListId = linkList.ID;
      FooterMenuListView.ViewGuid = linkView.ID.ToString("B");
      FooterMenuListView.JSLink = "/_Layouts/15/FooterMenu.js";                                
      FooterMenuListView.BorderStyle = System.Web.UI.WebControls.BorderStyle.None;
      FooterMenuListView.ChromeType = System.Web.UI.WebControls.WebParts.PartChromeType.None;
      phFooterMenuList.Controls.Add(FooterMenuListView);
    Any advice would be appreciated.

    Hi,
    Please try to use the code line below:
    FooterMenuListView.JSLink = "/_layouts/15/FooterMenu.js";
    Or you can upload the js file into a document library(JSLib) and use like this:
    FooterMenuListView.JSLink = "~site/JSLib/FooterMenu.js";
    JSLink also supports the following tokens, you can try it.
    •~site
    •~sitecollection
    •~layouts
    •~siteLayouts
    •~siteCollectionLayouts
    More information:
    http://spdevlab.com/2013/07/07/5-facts-about-jslink-in-sharepoint-2013-you-might-not-know/
    http://networkedblogs.com/GmSvo
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • Cannot update iMovie and iPhoto from Apple Store using Mountain Lion

    Hi,
    Everytime I try and update iMovie and iPhoto from the App Store I get an "an error has occured" followed by a "There was an error in the App Store. Please try again later. (20)." I tried to download the update from the apple website, but much to my chagrin I was told "The version of iPhoto installed on this Mac must be updated through the Mac App Store. Check the Mac App Store to see if an update is available."
    Help anyone?
    Thanks,

    I have only had one AppleID ever.  I do not have any other AppleIDs.  My kids have thier own... and only one each for this very reason.  Pick an ID and stick with it becuase it will be with you the life of ownership of Apple products.

  • How To Force Open Document In Edit Mode From Code-Behind (Chrome and Firefox)?

    Hello,
    Currently I am developing an IHttpHandler which at the should redirect the user to an Edit mode of a document located in a Document Library.
    The Problem is that in Firefox and Chrome it downloads the document in the temp folder. In IE it works as expected.
    The following code is used for the redirection:
    SPUtility.Redirect(urlOfTheNewDocument, SPRedirectFlags.Trusted, context);

    Hi,
    Please try to use IE Tab.
    Chrome IE Tab:
    https://chrome.google.com/webstore/detail/ie-tab/hehijbfgiekmjfkfjpbkbammjbdenadd?hl=en 
    Firefox IE Tab:
    https://addons.mozilla.org/en-us/firefox/addon/ie-tab/
    Here is a similar thread for your reference:
    http://stackoverflow.com/questions/14455212/how-to-open-sharepoint-files-in-chrome-firefox
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • How does one remove content from iPod/iPhone using iTunes 11

    Well, I can more or less get content on my mobile devices with iTunes 11 (managed manually, as I've always done).  How do I get it off?  I have a series of files formatted as audiobooks (continuing education). I put them on my iPhone (for in the office) and iPod (in the car to work).  Now I'm done - and can't get them off.  Going on the Music app doesn't allow me to remove an audiobook, and that's never been an option on the iPod.  When I try to do it through iTunes, I get the following:
    Pod:  I can at least FIND the files on "On This iPod", but cannot find any option to delete (and I tried both del and command-del).  I ended up having to set it up to sync, which I dont like as I typically (for space issues) keep my audiobook library on an external disk - anything I put on the Pod has to stay on the hard drive till I finish listening to it.
    Phone:  I can't view the content on the phone other than apps.  Via iTunes, I can't even see what's there, much less do anything with it.
    Am I missing something?  There seems to be no option to manually manage media anymore - I can't do it without syncing, and that requires me to leave everything on my hard drive indefinitely.
    If anyone's found a solution I missed (other than the process to revert back to 10.7, that is), I;d appreciate a point in the right direction.  Mahalo!

    When you click on your device you are presented with the pages
    Summary
    Info
    Apps
    Tones
    Music
    Movies
    TV shows
    Books
    Photos
    To remove Audiobooks depending on the type of Audiobook ie a series of mp3 files you will find under music and probably have to deselect the album name to remove it. I don't have any of these as I download from Audible or I use Audiobook Builder to stictch together mp3 files into m4b files. To find these Click on Books you will immediately see a section for books (in reality ebooks). Scroll down past that and you will see Audiobooks where you can select and deselect. Deselect the required Audiobooks and Click Sync

  • Update email on IT0105 from Active Directory using LDAP connector

    Hi,
    I see lots of  threads in this area, but none on this particular requirement.
    The requirement is simply to retrieve email addresses from AD by feeding the employee number into the LDAP connector. The email address returned would then be used to update the email field on IT0105.  (Our AD is set up with employee number as key)
    Does anyone know if there are any standard reports or functionality around to allow the customer to do this? I would prefer to rule this option completely out before looking at writing an abap to do the job.
    Regards
    Phil

    hi
    check if the below link of any use to you
    http://help.sap.com/saphelp_nw04s/helpdata/en/eb/0bfa3823e5d841e10000000a11402f/frameset.htm
    regards
    sameer

  • Fm or class existing for fetching xml contents from a file using abap ?

    Hi,
    I need to fetch an xml file in a string of type xstring. I am using class cl_gui_frontend_services=>gui_upload.
    This returns me content in table format, than i am planning to conver to xstring.
    Is there any better approach or any existing function module any one know of ?
    thanks
    Regards
    Pooja

    Hi Pooja,
    You can try out this program to read the XML file using abap.
    *& Report  ZXMLTOITAB                                                 *
    REPORT  ZXMLTOITAB                            .
      TYPE-POOLS: ixml.
      TYPES: BEGIN OF t_xml_line,
              data(256) TYPE x,
            END OF t_xml_line.
      DATA: l_ixml            TYPE REF TO if_ixml,
            l_streamfactory   TYPE REF TO if_ixml_stream_factory,
            l_parser          TYPE REF TO if_ixml_parser,
            l_istream         TYPE REF TO if_ixml_istream,
            l_document        TYPE REF TO if_ixml_document,
            l_node            TYPE REF TO if_ixml_node,
            l_xmldata         TYPE string.
      DATA: l_elem            TYPE REF TO if_ixml_element,
            l_root_node       TYPE REF TO if_ixml_node,
            l_next_node       TYPE REF TO if_ixml_node,
            l_name            TYPE string,
            l_iterator        TYPE REF TO if_ixml_node_iterator.
      DATA: l_xml_table       TYPE TABLE OF t_xml_line,
            l_xml_line        TYPE t_xml_line,
            l_xml_table_size  TYPE i.
      DATA: l_filename        TYPE string.
      PARAMETERS: pa_file TYPE char1024 DEFAULT 'c:\temp\orders_dtd.xml'.
    * Validation of XML file: Only DTD included in xml document is supported
      PARAMETERS: pa_val  TYPE char1 AS CHECKBOX.
      START-OF-SELECTION.
    *   Creating the main iXML factory
        l_ixml = cl_ixml=>create( ).
    *   Creating a stream factory
        l_streamfactory = l_ixml->create_stream_factory( ).
        PERFORM get_xml_table CHANGING l_xml_table_size l_xml_table.
    *   wrap the table containing the file into a stream
        l_istream = l_streamfactory->create_istream_itable( table =
    l_xml_table
                                                        size  =
    l_xml_table_size ).
    *   Creating a document
        l_document = l_ixml->create_document( ).
    *   Create a Parser
        l_parser = l_ixml->create_parser( stream_factory = l_streamfactory
                                          istream        = l_istream
                                          document       = l_document ).
    *   Validate a document
        IF pa_val EQ 'X'.
          l_parser->set_validating( mode = if_ixml_parser=>co_validate ).
        ENDIF.
    *   Parse the stream
        IF l_parser->parse( ) NE 0.
          IF l_parser->num_errors( ) NE 0.
            DATA: parseerror TYPE REF TO if_ixml_parse_error,
                  str        TYPE string,
                  i          TYPE i,
                  count      TYPE i,
                  index      TYPE i.
            count = l_parser->num_errors( ).
            WRITE: count, ' parse errors have occured:'.
            index = 0.
            WHILE index < count.
              parseerror = l_parser->get_error( index = index ).
              i = parseerror->get_line( ).
              WRITE: 'line: ', i.
              i = parseerror->get_column( ).
              WRITE: 'column: ', i.
              str = parseerror->get_reason( ).
              WRITE: str.
              index = index + 1.
            ENDWHILE.
          ENDIF.
        ENDIF.
    *   Process the document
        IF l_parser->is_dom_generating( ) EQ 'X'.
          PERFORM process_dom USING l_document.
        ENDIF.
    *&      Form  get_xml_table
      FORM get_xml_table CHANGING l_xml_table_size TYPE i
                                  l_xml_table      TYPE STANDARD TABLE.
    *   Local variable declaration
        DATA: l_len      TYPE i,
              l_len2     TYPE i,
              l_tab      TYPE tsfixml,
              l_content  TYPE string,
              l_str1     TYPE string,
              c_conv     TYPE REF TO cl_abap_conv_in_ce,
              l_itab     TYPE TABLE OF string.
        l_filename = pa_file.
    *   upload a file from the client's workstation
        CALL METHOD cl_gui_frontend_services=>gui_upload
          EXPORTING
            filename   = l_filename
            filetype   = 'BIN'
          IMPORTING
            filelength = l_xml_table_size
          CHANGING
            data_tab   = l_xml_table
          EXCEPTIONS
            OTHERS     = 19.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    *   Writing the XML document to the screen
        CLEAR l_str1.
        LOOP AT l_xml_table INTO l_xml_line.
          c_conv = cl_abap_conv_in_ce=>create( input = l_xml_line-data
    replacement = space  ).
          c_conv->read( IMPORTING data = l_content len = l_len ).
          CONCATENATE l_str1 l_content INTO l_str1.
        ENDLOOP.
        l_str1 = l_str1+0(l_xml_table_size).
        SPLIT l_str1 AT cl_abap_char_utilities=>cr_lf INTO TABLE l_itab.
        WRITE: /.
        WRITE: /' XML File'.
        WRITE: /.
        LOOP AT l_itab INTO l_str1.
          REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>horizontal_tab
    IN
            l_str1 WITH space.
          WRITE: / l_str1.
        ENDLOOP.
        WRITE: /.
      ENDFORM.                    "get_xml_table
    *&      Form  process_dom
      FORM process_dom USING document TYPE REF TO if_ixml_document.
        DATA: node      TYPE REF TO if_ixml_node,
              iterator  TYPE REF TO if_ixml_node_iterator,
              nodemap   TYPE REF TO if_ixml_named_node_map,
              attr      TYPE REF TO if_ixml_node,
              name      TYPE string,
              prefix    TYPE string,
              value     TYPE string,
              indent    TYPE i,
              count     TYPE i,
              index     TYPE i.
        node ?= document.
        CHECK NOT node IS INITIAL.
        ULINE.
        WRITE: /.
        WRITE: /' DOM-TREE'.
        WRITE: /.
        IF node IS INITIAL. EXIT. ENDIF.
    *   create a node iterator
        iterator  = node->create_iterator( ).
    *   get current node
        node = iterator->get_next( ).
    *   loop over all nodes
        WHILE NOT node IS INITIAL.
          indent = node->get_height( ) * 2.
          indent = indent + 20.
          CASE node->get_type( ).
            WHEN if_ixml_node=>co_node_element.
    *         element node
              name    = node->get_name( ).
              nodemap = node->get_attributes( ).
              WRITE: / 'ELEMENT  :'.
              WRITE: AT indent name COLOR COL_POSITIVE INVERSE.
              IF NOT nodemap IS INITIAL.
    *           attributes
                count = nodemap->get_length( ).
                DO count TIMES.
                  index  = sy-index - 1.
                  attr   = nodemap->get_item( index ).
                  name   = attr->get_name( ).
                  prefix = attr->get_namespace_prefix( ).
                  value  = attr->get_value( ).
                  WRITE: / 'ATTRIBUTE:'.
                  WRITE: AT indent name  COLOR COL_HEADING INVERSE, '=',
                                   value COLOR COL_TOTAL   INVERSE.
                ENDDO.
              ENDIF.
            WHEN if_ixml_node=>co_node_text OR
                 if_ixml_node=>co_node_cdata_section.
    *         text node
              value  = node->get_value( ).
              WRITE: / 'VALUE     :'.
              WRITE: AT indent value COLOR COL_GROUP INVERSE.
          ENDCASE.
    *     advance to next node
          node = iterator->get_next( ).
        ENDWHILE.
      ENDFORM.                    "process_dom
    Regards,
    Samson Rodrigues.

  • Query and sort content from two lists using search API

    Hi,
    I have a custom web part which I would like to query two different lists and sort the results by Created Date. One is a list of news articles and the other contains blogs. So basically the result set will be an intermix of news and blog items sorted by date.
    I would also like to do this by query through the search API. Does anybody have any sample code to do this?
    thanks,
    Sherazad.
    Sherazad

    Hi Sherazad:
    To use the JOIN operator in CAML, your lists must have a
    defined relation(Lookup column). You can refer to sample code that I list as follow.
    Create your query from one of your lists.
    SPList Projects= SPContext.Current.Site.RootWeb.Lists["Projects"];
    SPQuery query = new SPQuery();
    To do the join, setquery.Joins
     <Join Type="INNER" ListAlias="Contacts">
        <Eq>
            <FieldRef Name="ProjectManager" RefType="ID" /> ///
    ProjectManager is a Lookup Column.
            <FieldRef List="Contacts" Name="ID" />
        </Eq>
     </Join>
    And query.ProjectedFields (To tell SharePoint how to project the lookup columns into the result)
    <Field Name="Project Name" Type="Lookup" List="Projects" ShowField="Title">
    /// My Project Name is a Display Name in Memory so you can give a name by yourself But ShowField must be Internal Name of the Column(Project Name)
    You can add a lot of columns that you want to display.
    Everything comes from memory.
    To choose the fields to display set query.ViewFields
    <FieldRef Name="Your Internal Name of Column Or
    ProjectedFields - Field Name">
    <FieldRef Name="Your Internal Name of Column Or
    ProjectedFields - Field Name">
    <FieldRef Name="Your Internal Name of Column Or
    ProjectedFields - Field Name"> 
    Then
    SPListItemCollection result = ListA.GetItems(query);

  • Updating Vendor Master Address from HR Master using PRAA

    Hi All,
    When PRAA updates the Address into the Vendor Master from Infotype 6 subtype 1, does it consider the Second Street address as well?
    Some employees have 2nd address line populated in their IT0006 record and this isn’t showing in their vendor account.
    Regards,
    Anjali.

    Hi Anjali,
    No, the sttandard program does not update any subtypes of infotype 0006 other than subtype 0001. However, you can adapt this to suit your needs: an empty routine is supplied in the includes RPRAPAEX and RPRAPAEX_001 which you can adapt to your requirements You must implement the user exit routine 'set_address_by_user'. An experienced ABAP programmer can do this.
    Regards,
    Rodrigo

  • Retrieve SMS content from mobile phone using PC throught USB

    To all the experts in Java, anyone knows how to do the above title using Java please leave your solutions here. It will be more pleasure if u can leave some source code or any references website.
    Thanks in advance.

    hi,
    i am working to achieve the same goal too.but on linux..
    so plz lemme know if u get some info abt the above topic.
    which OS r u using?
    ill do the same if i get any info
    thank u

Maybe you are looking for

  • Error while checking in Document as attachement

    Hi All I am getting the following error when i am trying to check in documents as "add attachement" Error Deatils are as follows : The service stack for this request is --EDIT_RENDITIONS (dID=12155) intradoc.data.DataException: !syParameterNotFound,H

  • What the weblogic server will do when we request a URL

    Hi I developed ADF 11g application using the jdeveloper tool.i deployed the the EAR on Weblogic server10.3. I can able to run the application on WLS 10.3. i want the flow how the weblogic server is processing my request.means what is the first step i

  • Not able to change the price of PO

    Hi All, I am not able to edit the price on PO. Materail is free text catalog orders from SRM, I am not able to change the price. Could you please help me in changing the price. Is there any other steps i need to do to change the price. Thanks

  • Cant change domain name

    I cant seem to get rid of my old domain name in iweb every time i try to visit my new site it always takes me to my old domain and also at the bottom of the iweb page it still lists my old domain in parentheses. I have tried over and over to change d

  • Window 2008 R2 DHCP setup for /21 subnets

    I have a 2008 r2 domain server that I am setting up separate client DHCP scopes.  One for regular wireless network and one for the guest network.  I followed the same process to create both but they both created differently when viewed in the DHCP mg