Infragistics – UltraWinGrid Tips

Written by lopezatienza on 25/10/2011 – 11:47 -

Hello everybody.

I'm gonna add to this post all that interesting tips that I usually use, and of course, all the new tips I will find on the web.

You should take a look at Knowledge Base about WinGrid:

http://devcenter.infragistics.com/Support/KnowledgeBaseResults.aspx?type=Full&query=&platform=2&component=2&articletypes=0&age=0&sort=LastModifiedDate&samplesonly=0

As well, you should take a look at the Official Forum, on WinGrid Forum:

http://blogs.infragistics.com/forums/65.aspx

Index:

Tip 1: How to Unselect a Selected Row
Tip 2: How to Format a Cell with 2 decimals

Tip 1: How to Unselect a Selected Row

Is your grid implementing multiple row selections?
If you can select only a row in the grid, set the following properties:

CellClickAction = RowSelect
SelectTypeRow = Single

Both properties are into the DisplayLayout | Override group.

Now.. If you are using multiple selections....

Each Row that you select is allocated into the MyGrid.Selected.Rows collection. You can use the AfterSelectChange or BeforeSelectChange events to evaluate if the current clicked row is selected already and then de-select it:

Using the Selected property you can select or unselect a row:

grdDetails.ActiveRow.Selected = False
Tip 2: How to Format a Cell with a required decimal number

We can assign the Format of a Numeric value column at design time and programmatically.

On design go to the Column Property Format and place the format as the picture below:

https://www.lopezatienza.com/Imagenes/UltraGridTips01.png

Ej: 0.0#.##

Result: 350.7

Ej: 0.00#.##

Result: 350.75

Ej: 0.000#.##

Result: 350.750


Autor: Antonio Lopez Atienza


Posted in Infragistics | No Comments »

Leave a Comment

 

RSS
MCC D5E