Ask a questionAsk a question
 

Answercreating user defined web parts

Answers

  • Tuesday, November 03, 2009 1:58 PMAjith George Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Siva,

           IF you are done wit the coding art, then do the following to deploy the webpart in the shareoint site.

                1. After buliding the roject with zero errors, Right click on the solution and go for -properties - Signing - Add a key name (your classname for easy reference).

               2. In password, uncheck the password option. and then save and build the solution once again.

               3. Open the folder where you have the solution At  bin- debug find the dll of the solution you made.

              4. Open the assembly folder at - Start - Run- type 'assembly' -Click  Enter.

             5. Drag and drop the dll file to the assembly folder.

              6. in the assembly folder - Right click - properties- find the version and the public key token-

              7. Add the  safe control tags with informations find above in the web.config file of the sharepoint site.

              8. Do an IISRESET and then open the site to find the webpart in the webpart gallery ( as said in the document)



    Regards, Aj (http://www.ajittgeorge.blogspot.com) MCTS
    • Marked As Answer bysiva111kumar Wednesday, November 04, 2009 6:35 AM
    •  

All Replies

  • Tuesday, November 03, 2009 1:56 PMDave Hunter Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    You can drag and drop the assembly into the GAC.  The best solution would be to package this as a WSP.  Have a look at WSPBuilder http://www.codeplex.com/wspbuilder

    There is a kickstart article for packaging a webpart as WSP using WSPBuilder http://rasor.wordpress.com/2008/10/12/wss-dev-quickstart/

    What do you mean by user defined?  Who is the user (the developer or front-end user)?
    My SharePoint Blog - http://www.davehunter.co.uk/blog
  • Tuesday, November 03, 2009 1:58 PMAjith George Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Siva,

           IF you are done wit the coding art, then do the following to deploy the webpart in the shareoint site.

                1. After buliding the roject with zero errors, Right click on the solution and go for -properties - Signing - Add a key name (your classname for easy reference).

               2. In password, uncheck the password option. and then save and build the solution once again.

               3. Open the folder where you have the solution At  bin- debug find the dll of the solution you made.

              4. Open the assembly folder at - Start - Run- type 'assembly' -Click  Enter.

             5. Drag and drop the dll file to the assembly folder.

              6. in the assembly folder - Right click - properties- find the version and the public key token-

              7. Add the  safe control tags with informations find above in the web.config file of the sharepoint site.

              8. Do an IISRESET and then open the site to find the webpart in the webpart gallery ( as said in the document)



    Regards, Aj (http://www.ajittgeorge.blogspot.com) MCTS
    • Marked As Answer bysiva111kumar Wednesday, November 04, 2009 6:35 AM
    •  
  • Tuesday, November 03, 2009 2:02 PMAjith George Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    You can follow what Dave has suggested also, but since you seems to be doing it for the first time you can try with the steps above for a better understanding of the process.

    Cheers.......
    Regards, Aj (http://www.ajittgeorge.blogspot.com) MCTS
  • Tuesday, November 03, 2009 2:27 PMAvinashKT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Siva,

    Check this link-
    http://avinashkt.blogspot.com/2007/06/developing-custom-web-part.html

    Regards, Avinash | avinashkt.blogspot.com
  • Wednesday, November 04, 2009 4:23 AMsiva111kumar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    hi all,
         your replies helped me a lot.. thanks for it.
    dave hunter,,
           the user is the developer. i want to create a web part by which color coding for task can be made.
    im having a list of tasks and color coding should be done with that web part.. how to make it..
    Ajith goerge,
          Thanks for your massiva support.. pls provide me any inks for creating web parts for color coding.
    AvinasKT,
          your blog is super... im trying to go through it....

    Thanks to all i  advance,

    Regards,
    Siva
  • Wednesday, November 04, 2009 6:35 AMsiva111kumar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    hi jith george,

        As your reply helped me to get an idea about deploying web parts.
      Thanks for it.
    But still im having the same problem . i added the dll to assembly. i added it in safecontrols. did a iisreset but the web part is not present in add web part list..
    Pls help me in this issue...
     
    Thanks in advance,
     
    Regards,
    Siva.
  • Wednesday, November 04, 2009 9:13 AMAvinashKT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Siva,

    While developing the WebPart, you must have created the *.webpart or *.dwp file.
    Go to following path-
    Site > Site Actions > Site Settings > Galleries > Web Parts > Web Part Gallery

    Upload your *.webpart file there... now it will be visible in your Add Web Part pop-up.
    Regards, Avinash | avinashkt.blogspot.com
  • Wednesday, November 04, 2009 9:56 AMsiva111kumar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    hi avinash,
      Thanks for your response i got it..
    i have another one doubt..
    can i create a web part which take input from a tasklist (some conditions like priority high) and change the color of such tasks.
    is it possible how can i do this...


    Thanks in advance..

    Regards,
    Siva.
  • Wednesday, November 04, 2009 10:59 AMDave Hunter Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    You could create a dataview using SPD and use conditional formatting http://office.microsoft.com/en-us/sharepointdesigner/HA100996241033.aspx .  If you want to create a custom webpart and implement this you will need to set the css class on a row depending on some conditional logic.  I would suggest using SPGridView to display the information and on DataBound http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.spgridview.ondatabound.aspx set the css class depending on the data for that row.

    Dave


    My SharePoint Blog - http://www.davehunter.co.uk/blog
  • Wednesday, November 04, 2009 11:47 AMsiva111kumar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    hi dave,
       whether it is possible to access a list in a web page with the help of C# code using Gridview..
    is it able to check the datas with some conditions...
    also can the color be modified for those tasks.

    Advance Thanks,
    Siva.
  • Wednesday, November 04, 2009 2:04 PMAjith George Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Siva,

            Verify whether your requirement matches out-of -box

           Verify the link below : http://pathtosharepoint.wordpress.com/ - Color Coding

             http://www.sharepoint-tips.com/2007/05/sharepoint-designer-article-2-creating.html

           You can also perform what you have asked for, showing a sharepoint list in a gridview.

           Access the site - list and add the columns in the list to gridview as bound column.

          Or you can simply get the data from the list using a caml query, extract the data using a getdatatable() function and the add to the gridview da datasouce..............

    You will find n number of ways to do it via coding as well as SPD customization.
    Regards, Aj (http://www.ajittgeorge.blogspot.com) MCTS
  • Friday, November 06, 2009 5:26 AMsiva111kumar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    hi ajith,
        Thanks for your response..
    im new to sharepoint... i doesnt know about caml query can you provideme tutorial web sites for using it...
    also about gridview....

    Thanks in advance..

    Regards,
    Siva
  • Friday, November 06, 2009 6:02 AMLily WuMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    For reference of CAML Query and SPGridView, Please have a look at these links.

    Introduction to Collaborative Application Markup Language (CAML)
    http://msdn.microsoft.com/en-us/library/ms426449.aspx

    Query Schema
    http://msdn.microsoft.com/en-us/library/ms467521.aspx

    GridView Overview
    http://msdn.microsoft.com/en-us/library/ms752213.aspx

    Displaying Data by Using the SPGridView Control in Windows SharePoint Services 3.0
    http://msdn.microsoft.com/en-us/library/bb466219.aspx

    Hope it helps.


    Best Regards!
  • Friday, November 06, 2009 10:48 AMsiva111kumar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    hi lily wu,
       can u provide some sample codings on this topic...

    thanks in advance..

    Regards,
    Siva...