Ultimate Collection - { fslSocial & faisalmb.com } Ultimate Collection - { fslSocial & faisalmb.com }   
Social   |   Site   |   Posts (353)   |   Tags Xplorer   |   Feed Subscribe Free! Welcome buddy @ home...    Partner Site - Real Home Contact Search   

Wed

25

Apr

2012

Tue-01-05-2012
   

Change or remove filter / filter content from Sharepoint list / library view columns



In sharepoint, if it is required to disable the filter and to keep only the sorting, then following workaround could be the solution one.
(Following change are done to sharepoint 2010 using sharepoint designer 2010, might be it works for 2007 aswell)

Please keep the copy of file(s) which you are going to change, incase if some mishap happen J

·         Open the desired sharepoint site in sharepoint designer

·         Select Lists and Libraries from the Site Objects

·         Select desired list / library

·         Select the desired view from the views list where you want to remove to remove filter

·         Click on advance mode

·         Search for the <ViewFields> inside <XmlDefinition>

·         Now add following desired attribute to all desired columns. (All column are  <FieldRef Name="ModifiedOn" />)

as

 <FieldRef Name=" ModifiedOn " LinkToItem="TRUE" Filterable="FALSE" FilterDisableMessage="No filter available "/>

After that, edit the page where the list / library webpart exists or add webpart (list / library) if not already added on the page,  edit webpart properties and select the desired view again then click apply button to reflect changes.

 

In above,

·         You can change the default text for disabled filter using FilterDisableMessage="No filter available " attribute

·         By adding Filterable="FALSE", now the filter will not be available

·         If you want to make a particular column clickable, then add LinkToItem="TRUE"

 


Sun

8

Apr

2012

Sun-08-04-2012
   

Badshah aur Behis Awam




Sun

8

Apr

2012

Sun-08-04-2012
   

Facts about Pakistan



 

 

Positive facts which people / world doesn't know much about Pakistan, other than doing and having just negative thoughts and critisism.

Of all the countries in the world

  • Pakistan is the second largest exporter of clothing
  • Fourth largest cotton producer
  • Fifth largest milk producer
  • Tenth largest workforce in the world
  • Seventh largest pool of scientists and engineers in the world
  • 28th largest economy in the world worth $1 trillion (Dh3 trillion)
  • Stands at number two in terms of per capita charity donations after the US.
  • Pakistany has the fifth largest coal, copper and gold reserves in the world worth $65 billion
  • Pakistan Stock exchange was the world's third best performing last year despite all the troubles.

 

 

 


Thu

23

Feb

2012

Fri-30-03-2012
   

Pakistani IT experts win international cyber drill



Pakistan has marked victory in International Cyber Drill Competition, the competition was based on tricks and techniques regarding ” Cyber Security and how to secure systems from hackers and hack attacks”. Pakistan took part in the drill for the first time and beaten experts from 28 other countries

LAHORE – IFTIKHAR ALAM - For the first time in the country’s history an eight member team of computer experts has participated in an international cyber drill and completed all the tasks successfully, various social websites and blogs reported here on Wednesday.

The Pakistani team won the competition held in Kuala Lumpur Malaysia, where 25 teams of experts from 20 countries participated, it was informed. The Pakistani team comprised four members of Pakistan Information Security Association and four students of National University of Science and Technology.

The event was organised by the Asia Pacific Computer Emergency Response Team (APCERT). The annual drill was held to test the response capability of leading Computer Security Incident Response Teams from Asia Pacific economies.

It was the first time that APCERT involved the participation from the Organization of the Islamic Cooperation – Computer Emergency Response Team (OIC-CERT) in the annual drill, following a Memorandum of Understanding on collaboration signed in September, 2011.

The theme of the APCERT Drill 2012 was “Advance Persistent Threats and Global Coordination”.

The objective was for participating teams to exercise incident response handling arrangements locally and internationally to mitigate the impact of advance persistent threats that involved large scale malicious software propagation and attacks capable of impairing the critical infrastructure and economic activities. The main focus of the event was to educate the participants, who were given specific task to complete them within a time limit.

The exercise reflected a strong collaboration amongst the economies, and it also enhanced the communication protocols, technical capabilities and quality of incident responses for assuring Internet security and safety. About 22 CSIRT teams from Australia, Bangladesh, Brunei Darussalam, People’s Republic of China, Chinese Taipei, Hong Kong, India, Indonesia, Japan, Korea, Macao, Malaysia, Myanmar, Singapore, Sri Lanka, Thailand, Vietnam, Tunisia, Egypt and Pakistan participated in the drill.

Courtesy : Daily Nation

 


Thu

28

Jan

2010

Tue-14-02-2012
   

Controls not functional after Export to Excel or Export to PDF of Telerik in Sharepoint Application page



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.

 


Thu

11

Feb

2010

Tue-14-02-2012
   

Sharepoint - SPWeb.Groups Vs SPWeb.SiteGroups



SPWeb has two sharepoint cross-site group collection, SPWeb.Groups and SPWeb.SiteGroups.

SPWeb.Groups returns collection of cross-site groups which has some permission on the site. So if you add group from a site without any permission on the site, then this group wont appear in SPWeb.Groups collection, but it will appear in SPWeb.SiteGroups collection.

You can not use SPWeb.Groups.Add method to add new cross-site group, you need to use SPWeb.SiteGroup.Add method for this purpose.

In addition to this SPWeb has a property AssociatedOwnerGroup, which will return the required SPGroup. You can iterate the SPGroup users to get the list of all owners of the site.

 foreach (SPUser user in web.AssociatedOwnerGroup.Users)
 {
      // .. list all the users                        
 }

 

Finding and adding group

SPGroup  group = GetSiteGroup(web, "groupName");
if (null == group)
{
 web.SiteGroups.Add("groupName", web.AssociatedOwnerGroup, null, "Test Group description");
}

 


private static SPGroup GetSiteGroup(SPWeb web, string name)
{
    foreach (SPGroup group in web.SiteGroups)
    {
 if (group.Name.ToLower() == name.ToLower())
 {
     return group;
 }
    }
 return null;
}

 

 


Fri

20

Jun

2008

Mon-13-02-2012
   

Find rowcount, columncount, table size in Sql Server Database



Today I tried to find out which table is taking much space in DB or to find the numbers of columns and rows in all tables of DB

Following query will return the required result

=========

USE DatabaseName
GO
CREATE TABLE #temp (
                table_name sysname ,
                row_count INT,
                reserved_size VARCHAR(50),
                data_size VARCHAR(50),
                index_size VARCHAR(50),
                unused_size VARCHAR(50))
    SET NOCOUNT ON
INSERT     #temp
    EXEC       sp_msforeachtable 'sp_spaceused "?"'
SELECT     a.table_name,
            a.row_count,
            COUNT(*) AS col_count,
            a.data_size
    FROM       #temp a
            INNER JOIN information_schema.columns b
            ON a.table_name collate database_default
    = b.table_name collate database_default
    GROUP BY   a.table_name, a.row_count, a.data_size
    ORDER BY   CAST(REPLACE(a.data_size, 'KB', '') AS integer) DESC
DROP TABLE #temp

 

 

 


Wed

20

Apr

2011

Mon-13-02-2012
   

Sigin as different user in asp.net using Windows authentication



If you want to have signin as different user functionality like sharepoint in your asp.net application, following workaround you might be looking for.
After setting your web.config file's 

<authentication mode="Windows" />

and in IIS after remove anonymous authentication and enable windows authentication, have following code snippet where you want to have this functionality

In your aspx page

    <div>You are logged in as <br /> <%=User.Identity.Name%> <br /><br /> 
    <asp:LinkButton ID="lnkSignOut" runat="server" Text="Sign in as different user" onclick="lnkSignOut_Click"></asp:LinkButton>


In your code behind file

 protected void Page_Load(object sender, EventArgs e)
{
    if (!this.IsPostBack)
    {
        Session["logOutRequested"] = false; //Initialize value. This will be set to true when user will click on sign in as differnet user
    }
}


protected
void lnkSignOut_Click(object sender, EventArgs e)
{
    if (null != Session["logOutRequested"] && !Convert.ToBoolean(Session["logOutRequested"])) // Check if user is clicking link first time
    {
        Session["logOutRequested"] = true; //Set value that user want to sign in as differnet user
        Response.StatusCode = 401;
        Response.StatusDescription = "Unauthorized";
        Response.End();
    }
    else
    {
        Session["logOutRequested"] = false; //Initialize value again after user is authenticated with differnet or same user again.
    }
}


Hope this workaround will help.

In case if above workaround is not working, you may try following one
www.roelvanlisdonk.nl/?p=825

 

 

 


Mon

23

Jan

2012

Tue-24-01-2012
   

Don't Sell your memory card with your mobile



Don't sell your memory card with your cell phone as it contain your photos and videos and other personal stuff which exists even after you delete it from your memory card or even after format. It can still be recoverable. So if you are selling your mobile then sell it without memory card. 

 

Dont+sell+memory+card+with+your+mobile+phone.jpg


Mon

26

Dec

2011

Mon-26-12-2011
   

Installing XP on computer with SATA hard drive



 

Installing XP on computer with SATA hard drive

I recently come across with a problem downgrading a computer comes with Windows 7 to Windows XP, but during setup following error appears telling about Virus or Checkdisk /F bla bla bla,

 

***STOP: 0x0000007B (0xf78d2524, 0xc0000034, 0x00000000, 0x00000000)

 

Dont' worry, give following a try, might be it will work for you aswell,

 

Go to Computer BIOS by pressing F2 or F10 or Del depending on your computer

Go to Storage Option / Drive Configuration

Search for option saying SATA Emulation and change this to IDE from AHCI.

Accept / Save your setting by pressing F10 or Save and Exit

Run Windows XP Setup again

 

Hope it will work 

 





Intro

Faisal Bashir
Consultant / Software Architect
KalSoft Limited Dubai
Microsoft Certified Technology Specialist.
[more]

Right Now

How could u reach the pearl by only looking at the sea? if u seek the pearl, be a diver: the diver needs several qualities, he must trust his rope and his life to the Friend's hand, he must stop breating and he must jump - Jalaluddin Rumi.

Random Visuals

PicoProjector8
PicoProjector8

Show Next Visual

Currently Being Viewed

Recent Comments

Calendar

<<  May 2012  >>
MoTuWeThFrSaSu
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

View posts in large calendar

And Allah has created every animal from water. Of them are one that walks on their belly and of them are one that walks on two feet, and of them are one that walks on four feet. Allah creates whatever He will. Undoubtedly, Allah is Powerful over everything. (Holy Quraan - Al Noor 24-45)
723841 hits. (Best viewed @ 1024x768 resolution min.) Comments here...
© 2001-2012 Muhammad Faisal | Disclaimer | Contact | Partner Site