Syncfusion Grid with CSLA

Syncfusion Grid with CSLA

Old forum URL: forums.lhotka.net/forums/t/8025.aspx


Vinodonly posted on Saturday, November 21, 2009

This is not a question but a information post.. If anybody is trying to use Syncfusion Grid with CSLA (Winform) then use

GridGroupingControl instead of databound grid..

Surprisingly, GridGroupingControl provides sorting (by clicking on the columns which is not functional in normal win grid), alongwith other features like filtering (like excel autofilter) and export to excel etc..

I'm not a market person but just a user who is using their product and i thought to post it here..

They hv a wpf grid also but i have not tried it with csla..

If you have to use DataBoundGrid only then use below given code to set it up without getting runtime errors..


internal void SetUpDBGrid(GridDataBoundGrid GridToSet, object ObjToSet, BindingSource BsToSet)
{
// Clear existing columns
GridToSet.DataMember = null;
GridToSet.DataSource = null;
GridToSet.Binder.InternalColumns.Clear();
GridToSet.Binder.GridBoundColumns.Clear();

// Set bindingsource's data source to the new object created which is passed by calling code.
// [Setting Binding source to the retrieved Object]
BsToSet.DataSource = ObjToSet;

// Now we set the grid's datasource and execute other req code.
GridToSet.DataSource = BsToSet;
GridToSet.Model.ColWidths.ResizeToFit(GridRangeInfo.Table(), GridResizeToFitOptions.NoShrinkSize);
//GridToSet.Model.RowHeights.ResizeToFit(GridRangeInfo.Table(), GridResizeToFitOptions.NoShrinkSize);
GridToSet.Refresh();
}

Copyright (c) Marimer LLC