This is an enhanced
DataGrid that built in with Auto Search, Auto Column Sizing and Row Select features. In addition, it supports multiple Tablestyles binding to single
DataTable. New events such as
OnHeaderClick also have been included.
This component was created out of frustration with default datagrid controls. After searching around from web but could not find a Free datagrid control with the features that suit my needs. I decided to create one by myself. This is my first .NET component, feel free to give me feedbacks or comments so that I can learn something and improve my .NET skill. I hope this component is useful to those of you who are as frustrated as me.
|Enable or disable auto search function in datagrid.|
|Enable or disable column auto sizing in datagrid.|
|Enable or disable row select in datagrid.|
|Gets or sets a value indicating current |
TableStyle. Default value is -1.
|Gets or sets a value indicating whether |
TableStyles should follow the grid style.
|Occurs when current row has changed.|
|Occurs when grid header is clicked.|
How to use AutoSearch in GridEx
AutoSearch property to
true during design time or use the following code during runtime:-
this.gridEx1.AutoSearch = true;
During runtime, simple click on the header column that you want to perform search and then type in search value and
GridEx will perform incremental search for you. You may use [Backspace] to delete char or [Escape] to clear search value. If you search on
DateTime column type, a datetime input box will appear.
Creating Multiple TableStyles
Create styles using datagrid
TableStyles Editor. Set the style's
DataTable if you want
GridEX to load this style first. If none of the styles has MappingName assigned, default style will be used.
Changing TableStyles at Runtime
To change style at runtime, set
CurrentStyleIndex to a valid
this.gridEx1.CurrentStyleIndex = 1;
-1 will tell
GridEx to use default style.
AutoSearch only supports
AutoSearch will be turned off automatically if you assign a
DataSet to datagrid
I can be reached at email@example.com