1) For development, always install the complete product, dont try to copy the Infragistics assemblies script files manually to set up your dev machine. A proper install will make sure that the components are added to your VS.Net IDE toolbox. If your install fails to do this, there is a command line utilty provided (available from Infragistics Program Group) with the product that will add VS.Net toolbox tab.
If you are upgrading Infragistics from an older version to newer version, make sure to upgrade your project files using .Net Project Upgrade Utility (also found in Infragistics Program Group). Make sure that you have all the latest hot fixes applied (to avoid nasty surprises). A complete installation will also install
help files, regsiter them propery, it also comes with a nice Samples Browser with a lot of working samples.
2) First time when you starting your development with Infragistics, (for example UltraWebgrid), you set your references to the required assemblies, dragged the control on to your form and ran it. If you get a runtime error pointing to missing “BorderStyle” class/namespace reference, you probably need to set “CopyLocal” property for the WebUI assembly to True. To do this locate Infragistics.WebUI.Shared.v5.3, right click and Properies, set CopyLocal to true.
4) Discussion of the previous point leads us to the deployment of applications that uses Infragistics, For a simple deployment follow these steps,
- Copy the Infragistics Assemblies that are used by your application to a install folder in your server. These are signed assemblies. Add these to Global Assembly Cache (GAC).
- Copy the directory that is pointed by ig_common virtual directory in your dev
- Create a virtual directory in your server, point it to the folder explained in the previous step.
- Build your application that uses Infragistics, deploy it to the server ( which ever way you choose, xcopy, copy project..)
6) UltraWebGrid – Simple Binding – Works pretty much the same way as a regular ASP.Net grid. Please remember that UltraWebgrid can have multiple bands (virtual grids within grid) and columns collection is within the Band. Another important property is DisplayLayout. Most of the UI elements are defined within this. If you are binding the grid on the fly relying on the underlying datasource for columns, Set DisplayLayout > AutoGenerateColumns to True. You can also choose to add columns design time, setting the data field names for each columns, in that case set AutoGenerateColumns to False.
myGrid.DataSource = myDataSet.Tables.DefaultView;
Once the DataBind() is done, the grid fires “InitalizeLayout” event. This is one event you can hace code to handle some useful
properties of the grid. This can be a good place to handle setting the column widths, making some columns hidden, setting “keys”
for columns, turning on/off sorting for columns, handling header captions and style to name a few.
//Do not forget to import the namespace
//Examples of setting keys for columns; you can use the key to grab handle to this column
myGrid.Bands.Columns.Key = "Check";
myGrid.Bands.Columns.Key = "Id";
myGrid.Bands.Columns.CellStyle.HorizontalAlign = HorizontalAlign.Center;
myGrid.DisplayLayout.Bands.Columns.Width = Unit.Pixel(30);
//setting click action on header
myGrid.DisplayLayout.Bands.Columns.Header.ClickAction = HeaderClickAction.NotSet;
//Setting Header Caption
myGrid.DisplayLayout.Bands.Columns.Header.Caption = "My Caption";
//set sort for all bands and columns of the grid to "No Sort"
myGrid.DisplayLayout.HeaderClickActionDefault = HeaderClickAction.NotSet;
More coming sooon….