This is a migrated thread and some comments may be shown as answers.

Retrieving a SharePoint ListId and ItemId in script

1 Answer 32 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
Alan
Top achievements
Rank 1
Alan asked on 19 Jul 2010, 02:17 PM

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:

 

var

 

webUrl = editor._dialogParameters["CurrentWebBaseUrl"];

thanks

 

1 Answer, 1 is accepted

Sort by
0
Stanimir
Telerik team
answered on 20 Jul 2010, 09:09 AM
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.
example:
<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.

Greetings,
Stanimir
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
WebParts for SharePoint
Asked by
Alan
Top achievements
Rank 1
Answers by
Stanimir
Telerik team
Share this question
or