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
AD
Administrator
Syncfusion Team
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.
ST
Stefan Tsalapatis
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
AD
Administrator
Syncfusion Team
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?
ST
Stefan Tsalapatis
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
AD
Administrator
Syncfusion Team
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.