I've written an article about custom stsadm commands for SharePoint 2007 / WSS v3.
http://www.codeproject.com/useritems/stsadm_commands.asp
If you find the information useful, please let me know.
I've written an article about custom stsadm commands for SharePoint 2007 / WSS v3.
http://www.codeproject.com/useritems/stsadm_commands.asp
If you find the information useful, please let me know.
I have written a custom Sharepoint Timer Job.
In that job i send emails for some items in a sharepoint list using the Ader TemplateEngine.
In my Project i referenced the assembly.
The deployment succeeded and as the job runs the first time, there was an error in the event log:
Could not load file or assembly ...... (i think you know the text :))
I was surprised because the assembly is deployed in the gac. Other projects use this assembly also on that server and can use it.
I don't know why but i copied the assembly to the web server extensions\12\bin folder where the owstimer.exe (That piece of executeable is responsable for executing the jobs) is living and this solved the problem.
I got a task where documents can be published to a document library. Published documents should get properties attached that are stored in a seperate custom list with a custom content type.
The documents derive all from that custom list content type.
So I wrote an eventhandler for an Updated and Added event to load all the fields from the custom list entry and if the document has also that fields, wrote the value.
At the end i just put in properties.ListItem.Update() and it updates the item. That was my development machine.
In production there came an error across: The document has to be checked out to update its properties. Ah, ok.
Because its only metadata in my mind and the user cannot control if the file gets checked out and i don't want to increment the version number i searched for an alternative method. I could'nt turn off "versioning" and "checkout requirement".
Long term, short answer: just call listItem.SystemUpdate(false).
This bypasses the "normal" checkout and list settings and just updates the item and does not increment the version number (if you use the second ctor with the bool. bool incrementListItemVersionNumber). BE SURE TO KNOW WHAT YOU DO :)
http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.splistitem.systemupdate.aspx
If you are one of those who want to add custom application pages to sharepoint, then the following infos might be useful:
Whats left is that i want to use the Sharepoint User Controls like the other application pages but how do i do that?
Is this possible? Perhaps someone can tell me
UPDATE:
What works for me is to create a project under the _layouts folder and mark the aspx files as Build Action = none. Additionally i removed the iis application. it can compile but not debug but thats ok at the moment. Inline code files does'nt even call the Page_Load Event in my case.
In my current project, a winform application which searches addresses around different databases, i use the datagridview control
to display the found addresses.
I don't know how much results i get because that depends on the search criteria the user enters.
Already at results with a count of 1000 entries the performance of the grid is bad.
For example, if i sort the datasource with the click on one of the columns it needs 20-30 seconds.
Thats not really acceptable.
So i searched a little bit around and found cool results in dependency to the "virtual mode" property.
If you bind data to the datagrid with virtual mode set to true the datagrid asks for the data that should be displayed,
and ONLY that data.
Behind the scenes i have a datatable which holds my search results.
The "ask for data" is an event called "CellValueNeeded" and gives me an cell- and a rowindex.
Easy with the datatable.
Sorting is even more easy: call the datatable.DefaultView.Sort property and you're done.
CODE START
//binding the data
//this causes the datagridview to raise the CellValueNeeded Event
dataGridView1.VirtualMode = true;
dataGridView1.RowCount = currentDataView.Table.Rows.Count;
//CellValueNeeded Event
DataRow needeRow = currentDataView[e.RowIndex].Row;
if (needeRow != null && needeRow[e.ColumnIndex] != null)
e.Value = needeRow[e.ColumnIndex];
else
e.Value = System.DBNull.Value;
//Sorting
currentDataView.Sort = string.Format("[{0}] {1}", currentSortColumn, sortOrder);
CODE END
And the performance is amazing: click and get immediately results. very cool...
Summary: If you have more or an unknown amount of data to display, use the virtual mode.
You have to sort manually, set the sortglyph to the column you are sorting and give the datagridview the data it needs.
in my case i have a readonly datagrid, for editmodes enabled you have to do a little bit more :)
Some links to articles about it:
Presenting Data with the DataGridView Control in .NET 2.0
http://www.awprofessional.com/articles/article.asp?p=446453&seqNum=1&rl=1
Virtual Mode in the Windows Forms DataGridView Control
http://msdn2.microsoft.com/en-us/library/ms171622(VS.80).aspx
How to: Implement Virtual Mode in the Windows Forms DataGridView Control
http://msdn2.microsoft.com/en-us/library/2b177d6d.aspx
happy displaying ...
tingle
If you want to develop for Vista you have to check out the following Site:
http://projectglidepath.net/glidepath/overview.aspx
A Guidance Project created by Microsoft, supported by the Community.
Cool Stuff for FREE !!!
The Office Live Website is up and running:
http://officelive.microsoft.com/
Very cool Stuff, and the best: its totally FREE !!!
You have only to pay some fee if you want to use advanced features, like Employee Management.
You get a domain for your new site, of course free and you can customize the site online. New Sharepoint is used behind the scenes.
So be sure to check it out