Monday, September 29, 2008

Editing Form Fields in a SharePoint List


If you have been developing in SharePoint for any length of time, you have probably wanted to edit the default newform.aspx and editform.aspx to make it look a certain way of to hide columns in one view but not another. You can do this using SharePoint Designer by navigating to your SharePoint list and opening up NewForm.aspx. You may have deleted the exisitng ListFormWebPart, added your cuastom stuff, saved the form, and then tried to click on the new button in the list only to get an invalid URL dialog.


In order to prevent this DON'T delete the existing web part, hide it. Then add your custom list form and edit the controls and tables as you see fit.




Then you can save the form and click on the new button in the list and have it direct to your custom form.


The issue is documented in this Microsoft KB article.

Labels:

Wednesday, September 24, 2008

DataFormatString Not Working in SharePoint

Today I was trying to use a BoundField to show some data on the main page of my SharePoint site. I bound the field to the DataSource and then went to edit the DataFormatString so that the data would be formatted into a currency format.


I would save the page and then refresh it and no currency formatting. I thought at first that I just didn't understand how the format string works so I went to MSDN and looked it up. As long as I put {0:c0} I should be able to get back a number with currency formatting with no decimal places. So I made sure that my page was saved and that it was rendering the most recent copy. It was!


So I did a quick search and came across this article from Rickey Whitworth that described a Bug in the DataFormatString. You need to make sure that the HtmlEncode property is set to false, otherwise the formatting will not take effect.


The minute I changed the HtmlEncode property to false, all of my currency formatting was there.

Labels:

Tuesday, September 23, 2008

What can users find on your public-facing SharePoint site?

I recently found a blog post by Rich Finn that discussed activating the ViewFormPagesLockDown feature when using SharePoint as a public-facing Internet site. This feature is only available in MOSS and blocks anonymous access users from seeing form pages such as EditForm.aspx and DispForm.aspx and also blocks anonymous access to any pages residing in the _layouts folders that inherit from LayoutsPageBase.


By default, a publishing portal site will have this feature activated but the collaboration portal site definition does not. Rich's post contains a nice link that does a live search of the many sites that do not have this feature activated.


It is definitely something you will want to double check to make sure that your pubic-facing site is locked down so anonymouse users can't access pages they shouldn't.

Labels: ,

Thursday, September 18, 2008

Google Chrome

Chrome was released last week and I downloaded it right away to check and see how sites would render in it compared to other browsers. From a SharePoint point of view, the site I work on rendered fine and functioned as expected. Chrome does render some CSS styles differently which will cause headaches for web designers.

Other features of Chrome that are interesting include separate sand boxes for each tab so if one tab crashes it will not affect the other tabs.

When using the browser it tracks where you go and adds it to your browser history and search history. If you want to browse somewhere without it showing up in your history or without leaving traces (such as cookies) on your computer there is the option to use an Incognito Window.

Google Gears is built into the browser to allow you to work offline with many of the Google services including Reader and Gmail.

There is the option to create Application Shortcuts when you browse to a site. If you go to Gmail or Google Reader and then click on the icon that looks like a page and select Create Application Shortcuts, it will create a shortcut on your desktop to connect to that application.

There is only one box to enter in either your searches or URLs. You simply enter the search keywords into the box and hit enter to get search results.

There is a developer menu that includes a Javascript Console, the ability to debug Javascript, and a task manager to see how many CPU cycles each tab is using and the ability to kill a tab's process.

Chrome is also faster on loading many sites that I have tried it with and is based on WebKit. If you want to try it for yourself you can get it from the Google site.

Labels: , ,

Thursday, September 11, 2008

Microsoft Developers of Southwest Michigan September Meeting

Since SharePoint development is closely related and relies on ASP.Net development, I have found it useful to attend .Net developer groups to keep up on new things in the pipeline and tips and tricks that you can't always find on your own. One such group is the Microsoft Developers of Southwest Michigan (MDSM). The September meeting will feature Mike Eaton and will cover Alt.Net, the community and you (it will cover history behind the Alt.Net group, dive into some of the principles and practices, and how we as a community can drive change in the world of software development.


For more information and directions to the meeting visit the MDSM site.


To RSVP for the meeting, send an email to contact@devmi.com

Labels: , ,

Wednesday, September 10, 2008

SharePoint Magazine

I recently found a post that pointed me to SharePoint Magazine. It is completely free and offers articles on development, products, companies, and news. I expect many great articles to come out of this online magazine.

Labels:

Wednesday, September 3, 2008

Delegating Sending Mail on Behalf of in Exchange

Today my colleague asked me if I had any idea on how to delegate permissions for an Exchange mailbox for a user if the user was not around (so we didn't have access to their outlook). I was not sure how to accomplish this so I did a quick search and came across an article by Brian Cryer. I found that you can delegate permissions through Active Directory and this definitely simplifies trying to do this for users that could be spread throughout the country. The process is as follows and if you check out Brian's post there is information on delegating other permissions as well:



  1. Log onto the server running Exchange.

  2. Run Active Directory Users and Computers.

  3. Find the user's account that you want to be able to send on behalf of, and open up the account properties.

  4. Select the "Exchange General" tab.

  5. Click on the [Delivery Options...] button.

  6. Click the [Add ...] button and add the user (or users) that are to be granted permission to send on behalf of this account.

  7. Click [OK] button to close the "Delivery Options" dialog.

  8. Click [OK] button to close the account properties dialog..

That's all there is to it. Thanks to Brian for an excellent and simple post on how to accomplish this.

Labels: