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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Select entire row in GDBG

Thread ID:

Created:

Updated:

Platform:

Replies:

47755 Aug 11,2006 06:34 AM UTC Aug 14,2006 06:00 AM UTC WinForms 6
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 11, 2006 06:34 AM UTC

hi, how do i select the entire row when i click on a cell, and the cell can start editing.

thanks!

Administrator [Syncfusion]
Replied On August 11, 2006 06:58 AM UTC

Hi Lim,

Try the below property setting to achieve this.

this.gridDataBoundGrid1.ListBoxSelectionMode = SelectionMode.One;

Thanks,
Rajagopal

Administrator [Syncfusion]
Replied On August 11, 2006 10:21 AM UTC

hi thanks! It''s working!

but when i click on a disable cell in the other row, the selected row is remain at the previous row.
how could i select the row whenever i click on a cell including the disable cell.

Thanks!

>Hi Lim,

Try the below property setting to achieve this.

this.gridDataBoundGrid1.ListBoxSelectionMode = SelectionMode.One;

Thanks,
Rajagopal

Administrator [Syncfusion]
Replied On August 11, 2006 11:16 AM UTC

Hi Lim,

I dont see your problem, even when you click over any disabled cells in the grid, the selection of the row should be fine. Are you able to see this problem in the attached sample. If you still face any problem, kindly post a sample showing the problem.
Here is a sample
http://www.syncfusion.com/Support/user/uploads/GDBGRow_bb50254c.zip

Thanks,
Rajagopal


Administrator [Syncfusion]
Replied On August 11, 2006 11:37 AM UTC

hi! from the sample u gave me, the problem is same as mine.

if i click the other cell which is disable, the row is only highlighted but the selected row is still remain at the previous row and also the active cell is still there..

How do i make the row is selected and activate the first enable cell in the row when i click on a disable cell.

Thanks!

Administrator [Syncfusion]
Replied On August 11, 2006 01:12 PM UTC

Hi Lim,

Please try the code below in the CellClick event of the grid, to get this working as desired.

int index = 0;
private void gridDataBoundGrid1_CellClick(object sender, GridCellClickEventArgs e)
{
GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
if(!this.gridDataBoundGrid1.Model[e.RowIndex, e.ColIndex].Enabled)
{
for(int i = 1; i <= this.gridDataBoundGrid1.Model.ColCount ; i++)
{
if(this.gridDataBoundGrid1.Model[e.RowIndex, i].Enabled == true)
index = i;
break;
}
this.gridDataBoundGrid1.CurrentCell.MoveTo(e.RowIndex, index);
}
}

Let me know if you need any further assistance.
Regards,
Rajagopal

Administrator [Syncfusion]
Replied On August 14, 2006 06:00 AM UTC

hi! that''s what i want!

Thanks a lot!

CONFIRMATION

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.

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

;