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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Select multiple rows/cols/cells and CurrentCellEditingComplete events

Thread ID:

Created:

Updated:

Platform:

Replies:

18313 Aug 27,2004 01:17 PM UTC Aug 30,2004 08:55 AM UTC Windows Forms 10
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 27, 2004 01:17 PM UTC

Hi, I am using databroundgrid. I would like to have several options to edit the cell 1. The user can edit the cell by himself 2. The user should be able to use Ctrl-Mouse click to select multiple rows/cols/cells and add 1 to all I have two questions, where can I get information about which cols/rows/cells are currently get selected? When the data changed inside the cell and the CurrentCellEditingComplete get called, which can I get that row''s number from the event? My grid get polulated by a query on several table joins. I am basically try to grad the key from another col in the row while one cell value get changed, then I will update the DB based on that cell value (or is there a better way?). Thanks a lot Chris

Administrator [Syncfusion]
Replied On August 27, 2004 01:52 PM UTC

Here is a KB on how you can get the selections. http://www.syncfusion.com/Support/article.aspx?id=564 To get the row/col of the currentcell, you can try GridCurrentCell cc = this.grid.CurrentCell; // cc.RowIndex and cc.Colindex will give you the row/col //cc.Renderer.ControlText will give you the new text if the cell is being edited.

Administrator [Syncfusion]
Replied On August 27, 2004 05:31 PM UTC

Thanks Clay. Further question on that CurrentCellEditingComplete. It seems the event will be triggered as long as I click cell. In fact, I only want it triggered when the content inside the cell is changed. Is there any way to do it? Thanks Chris >Here is a KB on how you can get the selections. >http://www.syncfusion.com/Support/article.aspx?id=564 > >To get the row/col of the currentcell, you can try > >GridCurrentCell cc = this.grid.CurrentCell; >// cc.RowIndex and cc.Colindex will give you the row/col >//cc.Renderer.ControlText will give you the new text if the cell is being edited. >

Administrator [Syncfusion]
Replied On August 27, 2004 05:47 PM UTC

Try using the CurrentCellValidating event. It is only raised when you leave a cell that has been modified.

Administrator [Syncfusion]
Replied On August 27, 2004 06:19 PM UTC

Thanks Clay. You are the best! >Try using the CurrentCellValidating event. It is only raised when you leave a cell that has been modified.

Thiyagu
Replied On August 28, 2004 08:48 AM UTC

Hi Clay, Can you plz guide in doing the following. I''ve GDBG grid. The grid will be in read-only mode, until the user selects a particular row and then click on Edit button. Here How I can get the selected row alone as editable??... Thanx in advance Thiyagu.

Administrator [Syncfusion]
Replied On August 28, 2004 09:10 AM UTC

Try this. In your button click, set a member, say editatbleRowIndex, to be the row you want your user to be able to edit. Initially set editatbleRowIndex = -2; (Not -1). Then handle grid.Model.QueryCellInfo. In your handler, if e.RowIndex = editatbleRowIndex and e.ColIndex >0, set e.Style.ReadOnly = false; Also handle the RowEnter event. There set editatbleRowIndex = -2. I think this should turn off Readonly for the row whose RowIndex is editatbleRowIndex. When you enter a different row, the editatbleRowIndex value is set to -2 so no row is editable.

Thiyagu
Replied On August 28, 2004 09:28 AM UTC

Thanks Clay for ur immediate response. I''ll try this tommorrow and will let u know the status. Once again, Thank u very much. Thiyagu.

Thiyagu
Replied On August 30, 2004 01:39 AM UTC

Hi Clay, I''m having a GDBG Grid in a form. Here, I want the focus to be on the lastRow of the Grid when the Form gets Loaded??..As of now, the Focus is on the header. ThanX for Ur Help in advance. Thiagu.

Thiyagu
Replied On August 30, 2004 04:04 AM UTC

Hi Clay, I tried ur suggestions. But stil, the selected row is in Readonly mode. Will be gratefull if you can help ASAP. FYI.. My Need is to turn the selected row in to edit mode when the user clicks on Edit button. Thiyagu.

Administrator [Syncfusion]
Replied On August 30, 2004 08:55 AM UTC

Here is a sample that makes the current row editable when you click a button. WindowsApplication17_8041.zip

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

;