Custom Forms in WSS

January 30th, 2009 No comments

This isn’t going to be an essay or guide on how to do this, it’s just I’ve been doing this and had the following problem.

I have custom forms as the default ones don’t cut it, they don’t cut it cos of hierarchical dependencies in dropdown lists.  Now I don’t have the time to do lots of ajax or try to fight to get some ajax framework approved by, whoever, to use in my product.  So I’m using good old fashioned postbacks.

But postbacks on large forms are annoying and you need to return to the same scroll position.

Since .Net 2.0 there has been built in the MaintainScrollPositionOnPostBack directive for the @Page, something that’s as new to me as .net 2.0 (I was doing SAP for a bit for fun and a break remember ?) .

You can use this in your custom forms to.

Now I don’t know how much custom forms stuff you may have done, but I want CodeBehind in mine and struggled to get any code-behind, so I have custom forms that host another user control that I do have code-behind in.

In that Code I use the following

this.Page.Master.Page.MaintainScrollPositionOnPostBack = true;

 

Now if you have a custom master page then you can use that @Page directive instead, if your using the default on then you can use this instead.

Works a treat.

Technorati Tags: ,
Categories: Sharepoint Tags:

Songsmith

January 29th, 2009 No comments

In case you have not heard, Microsoft Research have come up with some song writing software.  It’s called Songsmith.

The idea behind it is that you make up a tune in your head then sing it into songsmith.  First you pick a music style and then a tempo and then sing away.  Once recorded  the software will analyse your song and the notes you sang,( hopefully you sang them in tune I don’t think it cleverly pitch shifts your voice, but I may be wrong ) and then it will create a musical accompaniment in the style you selected.

Now I know what your thinking but the MS web site states

"The samples you hear in Songsmith aren’t toy sounds… they’re a high-powered general MIDI set from Garritan, one of the biggest names in the industry"

With resources like this how can it fail ?

Now it’s not aimed at pros but to give anyone a chance to write a song, well my son is seven and is not a musician, yet, he hasn’t displayed any interest in that area, until recently, but even he hears that the stuff this thing produces is absolute pap.  It can’t even compose a good jingle, take a listen to the MS videos and cringe.

Where the genius of Songsmith lies, and this was totally unintentional I’m sure, was the sheer comedy value provided when you take songs you know and feed the vocals into Songsmith and have it re-write the original into the dreadful "early eighties, cheap casiotone" sounding affair it produces.

Youtube is starting to accumulate examples of Songsmith Massacres.  Radio heads Creep, britney’s Toxic, battery by metallica and loads more.  

So I wouldn’t bother getting Songsmith but go take a look on youtube and laugh your pants off on the utter tosh it produces.

 

Technorati Tags:
Categories: Misc Tags:

Being Human

January 27th, 2009 No comments

Last night with tons of advertising and announcements (I don’t think), the first series of Being Human snuck its way onto the schedules.

Well done BBC for finally getting there with this series.

I’d love to tell you how good or bad it was but due to the marvelous media campaign I missed it, I stumbled across it half way through the episode where I managed to see all the characters and the new actors playing two of them. 

Like I say I missed it so I wonder how the new actors will fit, if at all, the characters we were introduced to.  I do have doubts about the ghost, far to attractive and very removed from the pilot character, who I absolutely loved.  Is this a real improvement to help the story or just eye candy to keep part of the male audience who struggle with plots engaged.  I don’t doubt the young ladies ability she seemed very good but its not the funny, kooky plain northern lass obsessed with making tea entrenched in routine to cope with her death and being tied to the house.

Anyone who did watch, what do you think ? Does it measure up to the pilot ?

Anyway, I can be thankful for iPlayer and will watch all of it tonight.

Technorati Tags:
Categories: Uncategorized Tags:

Blue Monday

January 20th, 2009 No comments

Other than a chest infection, which was quite bad and making me very sick monday morning, enough to take a day sick and the last resort book a doctors appointment, I thought it’s not that bad, after all I have a job at the moment, I don’t spend what I don’t have (usually) so I’m not in huge credit card debt, I get paid early in the month too.  So not much to worry about at all.

Till I got out of bed.  I phoned work to let them know I was sick and also off to the quacks.  I booked the appointment at the doctors, and got a good slot 9.50am unheard of.  Apart from the retching cough things were looking up the prospect of being cured and getting back to normal.

Then the phone rings.  Childminder, can’t have little’un today our ceiling is leaking.  So that messes up the wife’s morning.  Still I can watch him while off sick, all I have to do is lie on the floor to be at his level and play with his toys with him shouldn’t be too taxing, at least I’m in the warm and getting better.

Get in car to go to doctors, turn key, "whheeeeeeeeeee", "Wheeeeeeee". Damn. Starter motor.

Come back from docs, biotics to cure, maybe, its amoxicillin which hardly ever works for me, and as it should start working feel free to go back to work, I like my job so not too bad, but what about the car ? I wonder. 

Get garage to come get car, should be about 190 quid mate.  I’ll phone you later.

One exhausting day saying, get down, don’t touch, chest feels better though, ring ring.

"Got some bad news mate", "You’re fly wheel is damaged and sent bits flying into starter motor, we can replace it but won’t warranty it and that’s 250 quid or we do it properly new clutch, new flywheel and new motor £960, but your rear sub frame bushes although need doing we can leave them for a bit longer" , "Ok then", "Oh and it won’t be done till wednesday".

So blue Monday got its revenge on me, big bill to come, no savings to pay it, credit card gonna take a hit. 

Tues. So I’m here at work after an hours drive in freezing weather with icy roads on my motorbike. My legs are still cold.  But the cough is getting better at least and I got some interesting Sharepoint work to do, and Ashleigh has figured out whats wrong with my media pc, so at least I can cancel "Sky" to help pay for the damn car.  Gotta look on the bright side I suppose.

Categories: Uncategorized Tags:

SPQuery DateTime query and the Time ignored

December 11th, 2008 2 comments

The U2U CAML Editor is great but it does mean you don’t take the time to learn CAML properly, eh-hum!

My queries were going very wrong and I couldn’t figure out why, so I pasted them into the CAML query tool and tested it and noticed it didn’t matter what time I set in my query it was ignored.  The CAML editor doesn’t have an option to include time values, so I could not tell what was needed to make it work.

I found this blog post http://ucsharp.wordpress.com/2007/10/11/9/.

It basically tells you that you need to tell the Query to use the timevalues and not to ignore them, this particular part of the query needs that little bit extra

<Value Type=”DateTime” IncludeTimeValue=’TRUE’>2008-12-11T16:07:00</Value>

Go test it in the CAML creator tool and see for yourself!

Thanks ucsharp.

It would seem that CAML girl looks for posts on her great tool, (I would not presume that she reads my blog!), did I miss something ? if not can you tweak a new version to have an includetimevalue checkbox (it shows people its possible)

P.S. Whilst you at it can you add

a Recently opened sites bit too

Remember user creds (securley stored in isolated storage perhaps)

I should shut up really as you can’t complain about something so handy that’s so free.

Technorati Tags: ,,
Categories: development, Sharepoint Tags:

WSS3, Workflow Hint

December 10th, 2008 No comments

When exploring workflow you might want to create a bit of code and have it execute and fire of the debugger to investigate all the properties your expecting are there.

Hint.  In your Execute Code block where you write the code to check stuff out, its worthwhile placing this BEFORE any timeout events you have in your workflow, here I am sitting waiting for the next 60 minutes before my event fires.

In fact I’m finding that a call to Debugger.Break()  doesn’t start the debugger after a timer has started, how queer normally this works on everything.

Needless to say I’m making a quick change to my workflow order for now.

 

Technorati Tags: ,,,
Categories: development, Sharepoint Tags:

Using a ListViewWebPart for Search Results

December 5th, 2008 4 comments

I have had to try and create a Search page that displays its result set in the style of a ListViewWebPart.  This has proven quite tricky.

After a lot of Searching I found various articles on using SPQuery and then the List.RenderAsHtml(Query) to achieve this.  However I found a rather large problem with this method, whilst it queries what I want it to the resulting HTML looks nice but does not do any kind of paging also whilst the sort and filter  drop downs appear at the top of the columns, they don’t actually do any sorting or filtering.

Now that was completely unacceptable.

Read more…

Ajax DeepZoom

November 25th, 2008 1 comment

MS Live Labs have been playing with the “deepzoom” technology, and for those without silverlight installed, you naughty people, you can now create a deepzoom image that can be navigated in Javascript, cool eh ? They call it Seadragon Ajax after the original technology name before the marketing people got to it ;-) (Bill Crow pointed this out to me as I had mis-named it Ajax DeepZoom, The title remains the same as it gets the poitn acros to anyone not aware of the Seadragon name).

The link to the post detailing this explains pretty much what I just did then you can go and embed the Image.  Now its a little tricker than they explain so here is some more details.

Read more…

Categories: ajax, development, Silverlight Tags:

Focus on that Bug – TFS

November 21st, 2008 No comments

image One problem I find since I started using TFS is I don’t focus on one bug, I often solve several at a time sometimes interconnected sometimes not, often down to which one I feel like fixing as that, for me, yields better results.  However its not always the best way, especially when working with others.  Most of the time I don’t play with others so it works for me.

But I have to train myself to use this thing (TFS) better and part of that is pick a bug/task and stick to it.

So I came up with the simplest of things to help with this.  Visual Studio windows.

Simply pick the bug your working on select the code and create a new horizontal tab group and drag it to the top till you only see the tile of the task in yellow. 

Simple but effective, well not that effective cos here I am blogging it instead of coding.

Categories: development Tags:

You SLACKERS – WSS Team

November 19th, 2008 1 comment

Was that a bit harsh ?  Perhaps but sometimes it’s how I feel about Sharepoint, for five years now.

I’ve been scratching my head this morning.  I have some list templates as part of my feature that I have defined and I don’t want anyone to be able to create them again once the ListInstance is there.

So as part of my manifest file I have the following.

<ListTemplate Name="JamList" DisplayName="JamList" Type="51003"
                Description="JamList" BaseType="0" Hidden="true"
                OnQuickLaunch="false" SecurityBits="11" AllowDeletion ="false">

Yet the damn thing keeps showing up on the create lists page and it shouldn’t.  Well according to the wss.xsd schema file this is a valid attribute and value yet it doesn’t work.

Read more…

Categories: Uncategorized Tags: