Hi
1)I have a custom context menu which will show on the right click of cell or row.
When click on cell it shows vert scrollbar ,I want to show the default context menu(copy/paste) when i right click here.
But It still showing the custom context menu. Is there any event which will handle on right click of edited cell.
MouseDown,up enter all this events not firing .
2) I have a large data in a cell so it is not fitting on grid when i scroll it is jumping to next row. So I did as below an
private void ultraGrid1_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs
e){
if (e.Row.Height > ugdActivityAndAlarmLogInfo.Height)
e.Row.Height = ugdActivityAndAlarmLogInfo.Height - 50;
}
but still it is not resizing the row.
I am using the following in InitializeLayout event.
e.Layout.Bands[0].Override.CellMultiLine = Infragistics.Win.
.True;
e.Layout.Bands[0].Override.RowSizing =
.AutoFree;
Plese advise me.
srajeshreddy said: 1)I have a custom context menu which will show on the right click of cell or row. When click on cell it shows vert scrollbar ,I want to show the default context menu(copy/paste) when i right click here. But It still showing the custom context menu. Is there any event which will handle on right click of edited cell. MouseDown,up enter all this events not firing .
FAQ:Mouse events such as MouseDown, MouseUp, and DoubleClick do not fire when the mouse is over a cell that is in edit mode.
srajeshreddy said: 2) I have a large data in a cell so it is not fitting on grid when i scroll it is jumping to next row. So I did as below an private void ultraGrid1_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e){ if (e.Row.Height > ugdActivityAndAlarmLogInfo.Height) e.Row.Height = ugdActivityAndAlarmLogInfo.Height - 50; } but still it is not resizing the row. I am using the following in InitializeLayout event. e.Layout.Bands[0].Override.CellMultiLine = Infragistics.Win. DefaultableBoolean .True; e.Layout.Bands[0].Override.RowSizing = RowSizing .AutoFree;
Hm, that's odd. Did you try checking the Height property immediately after you set it to see if the height is being accepted?
Are you using RowLayouts in your grid?
Are you sure that you are not changing the height of the row in some other place in your code? Or calling PerformAutoSize on the row?
Thanks for the quick reply.
1) I am still not able to display the defaut context menu(copy/paste). Is there any way I can override the custom contaxt menu asnd display it.
2) I went thru code I am not changing row height in my code except in rowinitialize event.
When I see after e.Row.Height = 400;
row heoght is not changing it is still showing the actual height as 712.
srajeshreddy said:1) I am still not able to display the defaut context menu(copy/paste). Is there any way I can override the custom contaxt menu asnd display it.
I'm afraid you lost me here. The default context menu should always being showing unless you are doing something to disable it, like setting the grid's ContextMenu to an empty ContextMenu or ContextMenu strip.
If you want to show a custom context menu, then what you should do is set the ContextMenuStrip or ContextMenu on the grid at run-time. The best place to do this on a per-cell basis is probably in BeforeCellActivate or BeforeEnterEditMode, or maybe MouseDown as a last resort.
srajeshreddy said: 2) I went thru code I am not changing row height in my code except in rowinitialize event. When I see after e.Row.Height = 400; row heoght is not changing it is still showing the actual height as 712.
If you are setting the row height in InitializeRow, then that's probably the problem. That event will get called quite often. You probably need to check for e.ReInitialize and only set the height when this is false.