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. Image for the cookie policy date
close icon

How to cancel deactivation of dropdowngrid cell

when i call a new form from a dropdowngrid in griddataboundgridcell... the cell gets deactivated before i could handle the return value from subform. how can i retain focus to the embedded grid on return in vb.net.please help me out.


9 Replies

SR Sri Rajan Syncfusion Team August 20, 2008 11:00 AM UTC

Hi Reshma,

Thank you for your interest in Syncfusion products.

Normally DropDownGrid cell lost focus if the you are opening a new form from the DropDownGrid. Because focus change to the another form. Please try setting ForceCurrentCellMoveTo property of DropDownGrid as true. Here is the sample code.

this.gridControl1.ForceCurrentCellMoveTo = true;


Please let me know if this helps.

Best Regards,
Srirajan.



AD Administrator Syncfusion Team August 22, 2008 09:58 AM UTC

it didnt work.
i am attaching screenshot of my grid.
when i click new button on embedded grid, i have to popup a form for adding new guarantor.when i return from that form i have to get it added to the guarantor combo in embedded grid and be able to make a selection in same row in embedded grid.but when i return from popup form it returns to parent grid with dropdowngrid closed.
i am calling popup form in GridA_PushButtonClick event where GridA is the name of embedded grid.pls help me.

>Hi Reshma,

Thank you for your interest in Syncfusion products.

Normally DropDownGrid cell lost focus if the you are opening a new form from the DropDownGrid. Because focus change to the another form. Please try setting ForceCurrentCellMoveTo property of DropDownGrid as true. Here is the sample code.

this.gridControl1.ForceCurrentCellMoveTo = true;


Please let me know if this helps.

Best Regards,
Srirajan.





DropDownGrid_33b04aa1.zip


SR Sri Rajan Syncfusion Team August 22, 2008 01:17 PM UTC

Hi Reshma,

Thank you for your interest in Syncfusion products.

If a form is open from the DropDownGrid, then the DropDownGrid gets close normally. This is default behaviour. But you can achieve this task, by storing the currentcell row and column index. Then handling the dispose event of the form and show the dropdown of the currentcell. After that move the focus to the currentcell of the DropDownGrid.

Here is the minimal sample which implements this task.
http://websamples.syncfusion.com/samples/grid.windows/F75995/main.htm

Please let me know if this helps.

Best Regards,
Srirajan.



AD Administrator Syncfusion Team August 26, 2008 10:19 AM UTC

the sample you gave will definitely meet my requirements. but if you could give me a VB version of it,will be so grateful.

>Hi Reshma,

Thank you for your interest in Syncfusion products.

If a form is open from the DropDownGrid, then the DropDownGrid gets close normally. This is default behaviour. But you can achieve this task, by storing the currentcell row and column index. Then handling the dispose event of the form and show the dropdown of the currentcell. After that move the focus to the currentcell of the DropDownGrid.

Here is the minimal sample which implements this task.
http://websamples.syncfusion.com/samples/grid.windows/F75995/main.htm

Please let me know if this helps.

Best Regards,
Srirajan.





SR Sri Rajan Syncfusion Team August 26, 2008 11:29 AM UTC

Hi Reshma,

Thank you for your interest in Syncfusion products.

Here is the VB version of the sample. Please try this and let me know if this helps.
http://websamples.syncfusion.com/samples/grid.windows/F75995Aug26/main.htm

Best Regards,
Srirajan.



AD Administrator Syncfusion Team August 27, 2008 09:38 AM UTC

Yes... i could degisn my UI with the sample you gave.. but even now couldn't handle the return value from the popup form. suppose on clicking [New] button(second column of embedded grid) it popups a form and it returns a String value. i have to display this string in the first column of embedded grid. how can i get it done. i tried in many of the events.. but didnt work.

>Hi Reshma,

Thank you for your interest in Syncfusion products.

Here is the VB version of the sample. Please try this and let me know if this helps.
http://websamples.syncfusion.com/samples/grid.windows/F75995Aug26/main.htm

Best Regards,
Srirajan.





SR Sri Rajan Syncfusion Team August 28, 2008 12:05 PM UTC

Hi Reshma,

Thank you for your continued interest in Syncfusion products.

Here is the modified sample which implements your requirements.
http://websamples.syncfusion.com/samples/grid.windows/F75995Aug28/main.htm

Please let me know if this helps.

Best Regards,
Srirajan.



AD Administrator Syncfusion Team September 2, 2008 06:39 AM UTC

Thank u very much it worked very well.only issue is that ... i want to show dropdown in single click on dropdown button itself. its not so proper now.now its activating on clicking out of button face.

>Hi Reshma,

Thank you for your continued interest in Syncfusion products.

Here is the modified sample which implements your requirements.
http://websamples.syncfusion.com/samples/grid.windows/F75995Aug28/main.htm

Please let me know if this helps.

Best Regards,
Srirajan.





SR Sri Rajan Syncfusion Team September 2, 2008 11:07 AM UTC

Hi Reshma,

Thank you for your interest in Syncfusion products.

You need to Comment out CurrentCellActivated event to solve this issue.

'Private Sub gridControl1_CurrentCellActivated(ByVal sender As Object, ByVal e As EventArgs)
'Dim cc As GridCurrentCell = Me.gridControl1.CurrentCell
'If Me.gridControl1.Model(cc.RowIndex, cc.ColIndex).CellType Is "GridADropCell" OrElse Me.gridControl1.Model(cc.RowIndex, cc.ColIndex).CellType Is "GridBDropCell" Then
'Me.gridControl1.CurrentCell.ShowDropDown()
'End If
'End Sub


Please let me know if this helps.

Best Regards,
Srirajan.


Loader.
Live Chat Icon For mobile
Up arrow icon