Selecting row in UltraGrid (with grouping on)

In my implementation, I use the selected row of an UltraGrid to do some work.

I found that clicking a cell does NOT select the row so I wrote a simple OnClick handler of cells:

	private void epiUltraGridJobs_ClickCell(object sender, Infragistics.Win.UltraWinGrid.ClickCellEventArgs args)
	{
		// ** Place Event Handling Code Here **
		// --- FORCE SELECTION OF ROW ON CLICK
		epiUltraGridJobs.Rows[args.Cell.Row.Index].Selected = true;

	}

That worked perfect until I started playing with grouping in the grid, now it doesn’t work.

Any thoughts?

You can disable cell selection and force it to always select a row… use the google

Google is only helpful if you know what you are looking for :slight_smile: Lucky for me you narrowed it down.

epiUltraGridJobs.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.RowSelect;

And hooking a “system” control to hijack the handler? I need to fire an onTextChange event for a system epiTextBox. I thought about making a timer and copying contents into a custom textbox but it just seemed wrong.

You can hook a Field_changed event on the EpiDataView… you can also just add your own handler in code…

I can just add the handler?! I am so confused about what I can and can’t do to a ‘standard\default’ control.

A standard control you can do whatver you want with it, just have to do it via code… use csm.GetNativeControlRef and then you get a standard object

So I could go and change any event handler for any control on any form? I am liking the chaos of this thought! Not sure where I came up with my current (mis)conception of these controls. I guess I just pieced it together from various posts.

On second though, I think maybe the Event Wizard may have added to my confusion.

Why do you always go to naughty places?

Haha - I already have a mess of code from orphaned code wizard stuff (and that’s not even counting my own code mess)

I tried (for a minute) to figure out how to get things OFF of the Event list in the wizard

Which event are you setting the override?

I believe I used FormLoad