Full Row Select in DataGrid (WindowsForms)

Full Row Select in DataGrid (WindowsForms)

Post by Alexander Yevchenk » Tue, 21 Jan 2003 18:36:18



Hi, All!

I have a problem with full row selecting in DataGrid.
I've written an event handler:

private void grd_CurrentCellChanged(object sender, System.EventArgs e)

{

grd.Select(grd.CurrentRowIndex);

Quote:}

this makes row selected, but that is not the same as I'd like.

 The grey TextBox in the focused cell is very unnecessary on my DataGrid.

I'd like to have a grid with simple full row selection, but no TextBoxes in
any cell.

Thanks for any advice,

  Alexander Yevchenko

 
 
 

Full Row Select in DataGrid (WindowsForms)

Post by ClayB [Syncfusion » Wed, 22 Jan 2003 04:28:15


George Shepherd's Windows Forms FAQ contains an entry entitled:

     How can I make my grid never have an active edit cell and always select
whole rows (as in a browser-type grid)?

Check it out at:
http://www.syncfusion.com/faq/winforms/search/856.asp

=============================================
Clay Burch, .NET MVP

Syncfusion, Inc.
visit http://www.syncfusion.com for the coolest tools


Quote:> Hi, All!

> I have a problem with full row selecting in DataGrid.
> I've written an event handler:

> private void grd_CurrentCellChanged(object sender, System.EventArgs e)

> {

> grd.Select(grd.CurrentRowIndex);

> }

> this makes row selected, but that is not the same as I'd like.

>  The grey TextBox in the focused cell is very unnecessary on my DataGrid.

> I'd like to have a grid with simple full row selection, but no TextBoxes
in
> any cell.

> Thanks for any advice,

>   Alexander Yevchenko


 
 
 

Full Row Select in DataGrid (WindowsForms)

Post by Alexander Yevchenk » Sat, 25 Jan 2003 00:35:19


Thaks a lot.
But I've found that the implementation has some features, if set
grd.ReadOnly = true;
Ok, we have such grid with those columns . Click on a row (Result: selecting
of the row).
 Wait a bit and click once more (Row will be deselected :(( )
Further clicks on the row will have no result :(
Helps only click on another row and back on the above mentioned row.

having grd.ReadOnly == false; , all works ok :)

Best Regards,
  Alexander Yevchenko


> George Shepherd's Windows Forms FAQ contains an entry entitled:

>      How can I make my grid never have an active edit cell and always
select
> whole rows (as in a browser-type grid)?

> Check it out at:
> http://www.syncfusion.com/faq/winforms/search/856.asp

> =============================================
> Clay Burch, .NET MVP

> Syncfusion, Inc.
> visit http://www.syncfusion.com for the coolest tools



> > Hi, All!

> > I have a problem with full row selecting in DataGrid.
> > I've written an event handler:

> > private void grd_CurrentCellChanged(object sender, System.EventArgs e)

> > {

> > grd.Select(grd.CurrentRowIndex);

> > }

> > this makes row selected, but that is not the same as I'd like.

> >  The grey TextBox in the focused cell is very unnecessary on my
DataGrid.

> > I'd like to have a grid with simple full row selection, but no TextBoxes
> in
> > any cell.

> > Thanks for any advice,

> >   Alexander Yevchenko

 
 
 

Full Row Select in DataGrid (WindowsForms)

Post by Alexander Yevchenk » Sat, 25 Jan 2003 00:54:25


Unfortunately  when I set
dwVisible.AllowDelete = dwVisible.AllowEdit = dwVisible.AllowNew = false;

grd.DataSource = dwVisible;

I have the same feature :(((

I think I shall override another method of Column Style?


> Thaks a lot.
> But I've found that the implementation has some features, if set
> grd.ReadOnly = true;
> Ok, we have such grid with those columns . Click on a row (Result:
selecting
> of the row).
>  Wait a bit and click once more (Row will be deselected :(( )
> Further clicks on the row will have no result :(
> Helps only click on another row and back on the above mentioned row.

> having grd.ReadOnly == false; , all works ok :)

> Best Regards,
>   Alexander Yevchenko



> > George Shepherd's Windows Forms FAQ contains an entry entitled:

> >      How can I make my grid never have an active edit cell and always
> select
> > whole rows (as in a browser-type grid)?

> > Check it out at:
> > http://www.syncfusion.com/faq/winforms/search/856.asp

> > =============================================
> > Clay Burch, .NET MVP

> > Syncfusion, Inc.
> > visit http://www.syncfusion.com for the coolest tools



> > > Hi, All!

> > > I have a problem with full row selecting in DataGrid.
> > > I've written an event handler:

> > > private void grd_CurrentCellChanged(object sender, System.EventArgs e)

> > > {

> > > grd.Select(grd.CurrentRowIndex);

> > > }

> > > this makes row selected, but that is not the same as I'd like.

> > >  The grey TextBox in the focused cell is very unnecessary on my
> DataGrid.

> > > I'd like to have a grid with simple full row selection, but no
TextBoxes
> > in
> > > any cell.

> > > Thanks for any advice,

> > >   Alexander Yevchenko