Hi Serg,
Try this
public class NewGrid : DataGrid
{
public NewGrid()
{
this.ReadOnly = true;
}
protected override void OnCurrentCellCh anged(EventArgs e)
{
this.Select(thi s.CurrentRowInd ex);
}
protected override void OnVisibleChange d(EventArgs e)
{
if (this.CurrentRo wIndex > -1)
this.Select(thi s.CurrentRowInd ex);
}
}
If you dont want to see focused EditBox in the Grid's columns, you should
inherit DataGridTextBox Column and override Edit method
protected override void Edit(System.Win dows.Forms.Curr encyManager source,
int rowNum, System.Drawing. Rectangle bounds, bool readOnly, string
instantText, bool cellIsVisible)
{
if (this.ReadOnly)
return;
else
base.Edit(sourc e, rowNum, bounds, readOnly, instantText,
cellIsVisible);
}
HTH,
Radovan
"Serg Matvienko" <se******@hotma il.com> wrote in message
news:O1******** *****@TK2MSFTNG P12.phx.gbl...
Hi Mohamed,
Thank you very much for your help, but unfortunately it doesn't work this
way. Maybe you could advise me a good book about window form's data grids.
I have seen lots of book about web data grids, but never about window form's
ones.
Sincerely,
Serg