GridGroupingControl close form on DoubleClick

Hi, I use the gridgroupingcontrol as a datalist where use can select, sort, order records. After doubleclicking the record the app opens a new window. the events I use or: - TableControlCurrentCellActivating => show full selection line ( e.Inner.ColIndex = 0 - TableControlCellClick - TableControlCellDoubleClick

2 Replies

KM Krijn Michiels January 21, 2005 07:25 AM UTC

(damn message textbox) Hi, I use the gridgroupingcontrol as a datalist where use can select, sort, order records. After doubleclicking the record the app opens a new window. the events I use or: - TableControlCurrentCellActivating => show full selection line ( e.Inner.ColIndex = 0) - TableControlCellClick => grab the current displayed datarow - TableControlCellDoubleClick => open other window and close current I keep getting NullReference exception(s) when the code exits the TableControlCellDoubleClick handler. I think the refresh method is called by the control itself and doesn''t know that is doesn''t exist anymore. Any solution or work around would be great !


AD Administrator Syncfusion Team January 21, 2005 12:12 PM UTC

Hi Krijn, make sure you set e.Inner.Cancel = true. If that still gives problems close the form using a timer as follows: { System.Windows.Forms.Timer t = new System.Windows.Forms.Timer(); t.Tick += new EventHandler(t_Tick); t.Interval = 20; t.Start(); } private void t_Tick(object sender, EventArgs e) { System.Windows.Forms.Timer t = (System.Windows.Forms.Timer) sender; t.Tick -= new EventHandler(t_Tick); t.Dispose(); myform.Close(); } Stefan >(damn message textbox) > >Hi, > >I use the gridgroupingcontrol as a datalist where use can select, sort, order records. After doubleclicking the record the app opens a new window. >the events I use or: >- TableControlCurrentCellActivating >=> show full selection line ( e.Inner.ColIndex = 0) >- TableControlCellClick >=> grab the current displayed datarow >- TableControlCellDoubleClick >=> open other window and close current > >I keep getting NullReference exception(s) when the code exits the TableControlCellDoubleClick handler. I think the refresh method is called by the control itself and doesn''t know that is doesn''t exist anymore. > >Any solution or work around would be great ! >

Loader.
Up arrow icon