Retrieving a SharePoint ListId and ItemId in script

2 posts, 0 answers
  1. Alan
    Alan avatar
    2 posts
    Member since:
    Jan 2009

    Posted 19 Jul 2010 Link to this post

    I am attempting to write a extension to the RADEditor to allow for some custom image handling. I have written a COM component to do the custom formatting and just need to pass in the listId and ItemId of the SharePoint list item that is being edited to the method. How would you recommend locating this data from the editor?

    Integrating the new tool bar item and javascript code was quite easy and the webUrl I found by:




    webUrl = editor._dialogParameters["CurrentWebBaseUrl"];



  2. Stanimir
    Stanimir avatar
    1654 posts

    Posted 20 Jul 2010 Link to this post

    Hello Alan,

    RadEditor for MOSS does not store information about the current list Id. How ever if you create a custom file such as ListConfigFile{Id (Guid)}.xml it will respect the settings in it. This means that in the control there is server code which gets the information for the current list. If you create an official support ticket and you have valid license information I will be able to provide you with the source code of RadEditor for MOSS. You will be able to use it and create a custom solution, where the control will store the required information.

    In addition in the source code of a test list I can find the following hidden filed.
    <input type="hidden" name="_ListSchemaVersion_{cb3f452a-a823-4b17-96c2-f591acae4812}" id="_ListSchemaVersion_{cb3f452a-a823-4b17-96c2-f591acae4812}" value="2" />

    The {cb3f452a-a823-4b17-96c2-f591acae4812} is the Id. So if you need to get this with javascript you can loop though all the hidden fields on the page and extract the id with a regular expression. This is just an idea.

    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top