Thu 28 Jan 2010

Few days before, I was having problem that after clicking on Export to pdf button / image, other controls of web part/user control stops working on the application page on WSS 3.0 environemnt that has RadGrid on it.

While the same thing was working on other asp.net application outside the sharepoint environment.

1st workaround (can be a solution)

The cause for this behavior is that there is a flag (named _spFormOnSubmitCalled) in SharePoint which prevents double form submition. This flag is set when the form is submitted and clear when the response is received.
However when exporting the response is redirected and the page is not updated, thus the flag is not cleared and page's postbacks are blocked.

In order to workaround this behavior you should manually clear the flag when exporting. This can be achieve, for example in export button's client click function similar to the following:

MyExportButton.OnClientClick = "_spFormOnSubmitCalled = false;"  

Above workaround will allow you to export multiple times, but all the other controls on the page were still not functional after the export.

2nd workaround (Not / Never recommended)

In your sharepoint master page, remove onsubmit attribute from your form tag

<form runat="server" onsubmit="return _spFormOnSubmitWrapper();"> 

and remove the onsubmit attribute.  This is what it looks like now:

<form runat="server"> 

3rd workaround (so far so good and implementable)

Add the following script to your webpart / custom control that need to have export and other controls functionals, rather then implementing the above workarounds
So here you go with the working solution.

<script type="text/javascript" language="javascript">

    //sharepoint postback to work after clicking on telerik export to pdf
    if (typeof (_spBodyOnLoadFunctionNames) != 'undefined' && _spBodyOnLoadFunctionNames != null) {
        _spBodyOnLoadFunctionNames.push("supressSubmitWraper");
    }

    function supressSubmitWraper() {
        _spSuppressFormOnSubmitWrapper = true;
    }
   
</script>

 

Hope this will helps.

 

Comments (23)
Mon 25 Jan 2010

Pakistan - T20 World Cup Champion...

IPL - Incomplete without Pakistani pLayers

 

IPL+Pakistan+Players.jpg

Categories : Health / Medical
Comments (2)
Sun 17 Jan 2010

Hollywood actress

 

Paris Hilton's

 

Latest Clips......

never seen before.........

 

 

Please be alone in your room before viewing them

so you would not feel emabarassed any more

 

Scroll down and hold your breaths....

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

 

paris+hilton+clips.jpg

Comments here
Sun 6 Dec 2009

Sindhi Topi and Ajrak Day 6th December - A Symbol Of Love & Peace

 

sindhi+topi+ajrak.jpg

 

Comments (2)
Sat 5 Dec 2009

Following are the orders that comes to the conduct of War.

1. Do not commit treachery
2. Do not deviate from the right path
3. Do not mutilate dead bodies
4. Do not kill children
5. Do not kill women
6. Do not kill aged men
7. Do not harm or burn trees
8. Do not destroy buildings
9. Do not destroy an enemy’s flock, unless you use it for your food
10. When you pass people who have devoted their lives to monastic services leave them alone

Above orders given by Muhammad (peace be upon him) which must be obeyed by every Muslim against every Non Muslim.

There is nowhere in Islam, whether it be in the Quraan or the teachings of Muhammad, that promotes the killing of innocent people. A real muslim is one that is real against terrorism.

 

Comments here
Mon 5 Oct 2009

Today I was getting following error while writing to Event Log on Windows 2008 Server (also applicable to windows 2003 server) using .NET

The resolution worked for me was appending (A;;0x3;;;AU) in CustomSD without quotes under HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Eventlog\EventLogName in windows registry where AU is referring to "Authenticated Users". Because in W2K3, the security of Application Event Log is controlled by CustomSD.
After appending the value would be similier to

O:BAG:SYD:(D;;0xf0007;;;AN)(D;;0xf0007;;;BG)(A;;0x f0007;;;SY)(A;;0x7;;;BA)(A;;0x7;;;SO)(A;;0x3;;;IU)(A;;0x3;;;SU)(A;;0x3;;;S-1-5-3)(A;;0x3;;;AU)


If CustomSD doesnt exists, then create a string named CustomSD and set its value to O:BAG:SYD:(A;;0x3;;;AU)

 P.S. Be careful by taking proper backup of registry before doing any change to it.

 

 

Comments (1)
Tue 22 Sep 2009

تمام کرم فرماؤں کو میری طرف سے دلی عید مبارک

:)

 

eid+2009.jpg

 

Categories : Thoughts / Lessons
Comments here