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

GridDataBoundGrid - Next Cell Event

I have 2 columns in my Databoundgrid, first one is dropdownlist and second is RichText. When I select an option in the dropdownlist i want the richtextbox of the second column to popup. How I can achieve this? Please let me know.


2 Replies

AD Administrator Syncfusion Team February 2, 2007 04:46 PM UTC

Hi Heena,

This can be achieved by using the CurrentCellCloseDropdown in a grid and move the current cell to required cell(richtextbox cell). And also you need to call the CurrentCell.ShowDropDown method to show the drop-down window in cell. Please try the code snippet.

private void gridDataBoundGrid1_CurrentCellCloseDropDown(object sender, Syncfusion.Windows.Forms.PopupClosedEventArgs e)
{
if(e.PopupCloseType == Syncfusion.Windows.Forms.PopupCloseType.Done)
{
GridDataBoundGrid grid = sender as GridDataBoundGrid;
GridCurrentCell cc = grid.CurrentCell;
if( cc.Renderer.CurrentStyle.CellType == "ComboBox")
{
cc.EndEdit();
cc.MoveTo(cc.RowIndex,2);
cc.ShowDropDown();
}
}
}

Best regards,
Haneef


HP Heena Patel February 2, 2007 07:58 PM UTC

Thanks that worked!

>Hi Heena,

This can be achieved by using the CurrentCellCloseDropdown in a grid and move the current cell to required cell(richtextbox cell). And also you need to call the CurrentCell.ShowDropDown method to show the drop-down window in cell. Please try the code snippet.

private void gridDataBoundGrid1_CurrentCellCloseDropDown(object sender, Syncfusion.Windows.Forms.PopupClosedEventArgs e)
{
if(e.PopupCloseType == Syncfusion.Windows.Forms.PopupCloseType.Done)
{
GridDataBoundGrid grid = sender as GridDataBoundGrid;
GridCurrentCell cc = grid.CurrentCell;
if( cc.Renderer.CurrentStyle.CellType == "ComboBox")
{
cc.EndEdit();
cc.MoveTo(cc.RowIndex,2);
cc.ShowDropDown();
}
}
}

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon