All posts by David Wise

Creating a Generic Dictionary


It is great when you are in a field where you can learn at least one new thing every day.  For example, I've been using generics since they became available in .Net 2.0 and yet, somehow, this was the first time I've seen this particular way to use one of them:


Dictionary
<string, object> oProps = new Dictionary<string, object>();

This creates a strongly-typed dictionary object and that uses a string as the key and an object as a value.  Super simple and wonderfully powerful yet I had missed that in all of my readings and experimentation.  This just made my day!

Lesson Learned While Customizing Newform.aspx


Whenever you customize the default list forms (NewForm.aspx, Dispform.aspx, or EditForm.aspx) in SharePoint designer, never, ever, under penalty of torture using Ed Wood movies, ever, I mean ever, delete the default ListFormWebPart that is on those pages.  Doing this will subtly corrupt how your list is defined in SharePoint and can cause you all sorts of grief.

Supporting FilesThe most minor problem I've seen is that you lose the ability to specify the Supporting Files for the list.  Oh sure, it will look like you can set them and it will even save and refresh properly in Designer.  However, SharePoint will simply ignore that and go right along showing the default files instead.

The bigger problem is that deleting the ListFormWebPart from the NewForm.aspx page can effectively disconnect the "New" option on the list toolbar resulting in the ever annoying "Invalid page URL" dialog box when anyone clicks on it.  This is a known issue and the only way to fix it is to delete and recreate the list.  Not Fun.

FliEB

Instead, save yourself some grief when editing these pages and just leave those web parts on there and add a new DataFormWebPart above or below it and customize that to your liking. 

Note: make sure that you insert the new web part into the existing WebPartZone or else you will lose the 'Edit Page' option for that page on the Site Actions menu.

Once you have the customizations you want in place, you will need to hide (not delete!) the original ListFormWebPart.  To do this in Designer, simply change the IsVisible element in the WebPart XML to 'false'

FliF2

Alternatively, you can hide it using a browser as well.  Simply browse the page and edit it, either by using SiteActions -> Edit Page or by adding "&PageView=Shared&toolpaneview=2" to the querystring in the browser.

FliF0

FliF1Then edit the web part properties for the original ListFormWebPart and hide it

This keeps the original web part on the page which keeps SharePoint happy.  Your users only see the customized list view that you want them to see, which keeps everyone else happy.

Handy SnagIt Trick


I've been using SnagIt for years and absolutely love it.  Recently, I needed to grab a picture of menus but also needed to apply some effects to the unimportant areas so as to draw more attention to the menus themselves.  I stumbled a bit with the freehand selection tool, largely because I can't draw a straight line for diddly.  The rectangular selector was *so* close to what I wanted but it kept bringing in parts of the image that I didn't want to highlight.  Out of curiosity, I tried the old Shift trick and it worked exactly like I'd hoped!

FliEBWhat is the Shift Trick?

  • Use the Selection tool of your choice and make the first selection
  • Hold Shift and make another selection such that it partially overlaps with the first. 
  • SnagIt will merge the two selections
  • repeat as needed

This allows for some really odd selection shapes but is quite handy when you need to outline complex areas.  In this picture, I was able to select just the menus and then dim and blur the background.

(and for the record, yes, I could have applied the Torn Edge effect to the selected area which resulted in torn edges on each of the menus.  Interesting, but lost clarity)

Just for fun, I wanted to see what I could do with this – pretty neat, actually.

Finally! A Good RSS Reader!


A few days ago, my journey through the vast wasteland of dysfunctional RSS readers took an unexpected turn for the better.  After my most recent experiment (FeedReader) ate its own database, I decided to take a look at one that I have been seeing a lot of in my blog stats – JetBrains Omea Reader.  So far, I really like what I see.  The tool is visually appealing and is the first Reader I've tried in years that didn't leave me saying: "Oh, how I wish SharpReader was being updated…"

It has everything I expect from an RSS Reader and does most of it pretty well and pretty darned fast.  One of the nicest features I've found is the ability to create a View based on search criteria, allowing you to keep an eye on any hot items/keywords that you might be interested in, automatically.  Now I can easily keep tabs on how Visual Studio is going to take over World of Warcraft add-in development.

As a bonus, Omea also has a good Usenet News reader built into it.  This is something I had pretty much given up on since Anawave Gravity (the greatest Usenet reader of all time) was killed off.

I have tried quite a few RSS readers over the past few years but none quite fit what I was looking for.  Here are a few of them:

SharpReader – My personal favorite because of its speed and the tight focus on the tasks related to RSS but it has not been updated in quite some time.  It also suffers from the rather annoying habit of corrupting its own database every few months or so.  It recovers from this but it does require that I go through and mark thousands of entries as read.

Google Reader – fast but far too few options for managing large numbers of feeds.  Nice if you only have a few feeds or if you need access to feeds from multiple computers that you might not have control over (i.e. kiosk/walkups/guest machines).  The UI does take a little bit to get used to.

NewsGator – As a consultant, I rarely have Outlook open as most of my clients either use Notes or don't allow consultants to have accounts on their Exchange servers.  As such, I really don't like being that tightly tied to an app I never use (Outlook).  It also had WAY too few features for me to use to manage the number of feeds that I have.  I have read that it does work very well for consultants who travel a great deal because it caches feeds so that they can then be read while disconnected, like while on a plane.  My only travel is the drive to work and I'm pretty sure the other drivers would get a little upset if I was reading news feeds during that time.

FeedReader – good generic reader but pretty shallow on the features.  It lasted several months but then terminally corrupted its database  – no recovery whatsoever.

Omea – This is day three for this reader so only time will tell.  So far, it is very good.

 

#RENDER FAILED in View With Totals and Grouping


After searching the net, it appears that the generic "RENDER FAILED" message (below) appears when customizing certain views for a multitude of reasons, each with its own unique combination factors and its own solution.  So, here is one more set of parameters / solution to add to the chorus.

 

 

I had a view that was grouping on a single field and also had to provide the AVERAGE of a number field.  When trying this with the default Group By settings, I would get the <!– #RENDER FAILED –> error message.

 

 

The fix was obscure but simple.  Change the Group By options to Expanded and the problem was solved.