We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridControl - AlphaBlendSelection

Thread ID:





25237 Feb 22,2005 07:35 PM UTC Feb 23,2005 06:15 PM UTC WinForms 5
Tags: GridControl
Stefan Tsalapatis
Asked On February 22, 2005 07:35 PM UTC

Hi, AlphaBlendSelection for Current Row works fine. But I want to use internally the MoveTo( rowindex+1, .. GridSetCurrentCellOptions.BeginEndUpdate | ..); How to force the AlphaBlendSelection for the new current Row . I tried after MoveTo the Grid.RefreshRange(GridRangeInfo.Row(e.RowIndex) But it doesn''t work. I hope you understand my problem. I don''t want to use PrepareViewStyleInfo Regards Stefan

Administrator [Syncfusion]
Replied On February 22, 2005 09:47 PM UTC

Do you have ListBoxSelectionMode set to something other than none? For me using 3010, with that ListBoxSelectionMode set, just calling grid.CurrentCellMoveTo was enough to move the selection to another row with the whole row selected (with the exception of the currect cell). Is it only the CurrentCell that you need to color? Or is it all cells in teh row that are no being selected? To color the CurrentCell, you will have to use CellDrawn and call e.Graphics.FillRectangle with teh alphaselectioncolor to color that cell.

Stefan Tsalapatis
Replied On February 23, 2005 03:05 PM UTC

Thanks Clay . It was my mistake in a complicated grid. Can you help in another one case please. In an existing GridControl I had set not Resize Columns. Now I want to change to Resize but I do not remember what I did or how to change it. May be the problem is in my code or settings. I did set again the same settings as your sample HighLightCurrentRow. CurrentCellBehavior= ..None RefreshCurrentCellBehavior=.RefreshRow AllowSelection =.Any ControllerOptions=.All ListBoxSelectionMode=.One; ResizeColsBehavior=.ResizeSingle|.OutlineBounds|G.OutlineHeaders I have code in OnQueryColWidth for the Last Column but doesn''t influence. Except Settings I tried to resize the ColWidths[..] in OnResizingColumns and I can do it there ( I would prefer it ) but the GridResizingColumnsEventArgs -> e.Reason never equals to ResetDefault. I can catch only the e.Reason=MouseUp and in this case the e.Width equals to ColWidths[..]. May be you can help me . Thanks Stefan

Administrator [Syncfusion]
Replied On February 23, 2005 04:59 PM UTC

If you add this ResizingColumns event handler, private void gridControl1_ResizingColumns(object sender, GridResizingColumnsEventArgs e) { Console.WriteLine(e.Reason); } you should see HitTest pop up in the output window and see the cursor change to a sizing cursor when you move ove a column header border. Do you? If not, have you done anything with mouse controllers or are you doing something special in QueryCellInfo when e.RowIndex == 0?

Stefan Tsalapatis
Replied On February 23, 2005 05:14 PM UTC

I can not see the Hit Test But in your sample ( modified from me) this code works ok. ResizingColumns if(e.Reason==GridResizeCellsReason.MouseUp ) { e.Columns.GetFirstCell(out row,out col); if(e.Width != ColWidths[col]) ColWidths[col]=e.Width; } In my Grid every time is e.Width == ColWidths[col]) Yes In QueryCellInfo for Column Headers e.Style.CellValue=someCaption; e.Handled = true; Stefan

Administrator [Syncfusion]
Replied On February 23, 2005 06:15 PM UTC

Are you overriding OnResizingColumns? If so, are you calling the baseclass? This would prevent the events from being raised.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon