Tuesday, September 27, 2005

Sharepoint WebControl Part II : Creating Custom OWS Control for Webpart

Introduction
The first part of this series discuss how to reuse OWS controls from Sharepoint.WebControls. Strictly speaking, there are few steps to employ them in webpart; first, create OWSForm as field containers; second, add OWS * Field controls to the form; next submit the form either using OWSSubmit control or your own control and finally collect the value from POST value collections.

In fact, that Sharepoint.WebControls only define 2 ows field; dateField and numberField – which is far from our expectation. However if you keen to browse OWS.JS (the default javascript’s include in Sharepoint), then you’ll find that there are many other OWS inputs around such as URLField, BooleanField, NoteField, RichTextField, TextField etc. (Figure-1). Obviously, those input are just common input type found in HtmlControls of ASPNET or HTML basic tag. The OWS provides uniform appearance and finer user interface – such as the one we found in date picking tools of DateField or formatting tab of RichTextField etc. So our discussion here is to create the first custom OWS control, using available objects in OWS.JS scripts. For sake of simplicity and cleared purpose, I will take a simple example the TextField – giving you the methodology to create your own OWS*Field control and leaving the other field for you to implement.


/Gill

Sharepoint WebControl Part I :Reusing OWS Controls in Custom Webpart

Introduction
I am very sure that most of us have been familiar with NewForm.aspx from Sharepoint. That kind of submission form by Sharepoint is a template, which is then populated - based on columns definition of that list. So we can have date field, number field etc., depends on columns definition. Surprisingly, that kind of form is made by some JavaScript object. (Figure-1).Typically creating text field is not a problem but not with date field. Usually we need to allocate special effort for date field – either by creating new custom control or create some JavaScript for the date chooser. However if we could re-use date field object from Sharepoint – then the job can be done faster. So let’s start to figure out how!

Sunday, September 25, 2005

PDC Vidoes from Channel 9

Here are a whole bunch of technical videos made at the PDC, some of these are very interesting.

http://channel9.msdn.com/ShowForum.aspx?ForumID=14&TagID=12