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

How to lay an external editor on top of the current active cell

Thread ID:

Created:

Updated:

Platform:

Replies:

117444 Oct 21,2014 02:26 PM UTC Oct 27,2014 04:46 PM UTC WPF 1
loading
Tags: GridControl
Shi Ming
Asked On October 21, 2014 02:26 PM UTC


I am trying to overlay an external editor on top of the current active cell (we don't want to use GridControl's editors for various reasons).  My apporach is to create an adoner out of the current active cell and lay my custom control on top of it.   There are two issues I am facing currently

1) How to get the "bound" of current active cell.  I used Rect rect = AssociatedObject.RangeToClippedVisibleRect(args.CellRowColumnIndex) in the event handler of CurrentCellActivating, but the "Rect" always has some offset and is not the correct "bound" of the current active cell

2) How to get the Adorner of the current active cell when CellType is "Static" (since cell model's rendered control is null in the case)

Thanks in advance for the help.

Ming






Kanimozhi Bharathi [Syncfusion]
Replied On October 27, 2014 04:46 PM UTC

Hi Ming,

We have analyzed your query and you can achieve your requirement “Load your own custom control in edit mode” by creating Custom CellRenderer like below.

public class CustomGridCellRenderer : GridVirtualizingCellRenderer<ContentControl>

{

    public CustomGridCellRenderer()

    {

    }

}

You can load your custom control instead of ContentControl. By overriding the OnInitializeContent method of GridVirtualizingCellRenderer<T> class, you can initialize your custom control. Please refer the attached sample for your reference.

You can also refer our Dashboard sample “Custom DropDown Demo” which is under the below path in Syncfusion Dashboard.

Path: WPF Dashboard -> CellGrid -> CellTypes -> Custom DropDown Demo

Please let us know if you need any information.

Thanks

Kanimozhi B


Attachment: CustomRenderer_Sample1474809702_2d39a33a.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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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

;