Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
80
Syntax Editor with Infragistics UltraGrid
posted

Hi,

One of my requirement is to use Infragistics with SyntaxEditor of Actipro's intellisense.
SyntaxEditor provides the user-friendly operations like intellisense to select the object type and so on.

1) I need to integrate it with Ultragrid. Can it be done ?
2) Can SyntaxEditor used as textbox within Ultragrid of Ingragistics (windows control)?

following is the code. .

[DefaultProperty("DataType")]
public class DataTypeEditTextBox : ActiproSoftware.SyntaxEditor.SyntaxEditor, IProvidesEmbeddableEditor
{

private EmbeddableImageRenderer imageRendererExternal = null;
#region IProvidesEmbeddableEditor Members

EmbeddableEditorBase IProvidesEmbeddableEditor.Editor
{
get { return this.ImageRendererExternal; }
}

#endregion
internal protected EmbeddableImageRenderer ImageRendererExternal
{
get
{
if (this.imageRendererExternal == null)
{
this.imageRendererExternal = new EmbeddableImageRenderer(); }

return this.imageRendererExternal;
}
}
}

currently I am just trying to use EmbeddableImageRenderer to support EmbeddableEditorBase IProvidesEmbeddableEditor.Editor property.

ultragrid1_InitializeLayout has following code.
{
...
e.Layout.Bands[0].Columns["DataType"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Edit;
...
e.Layout.Bands[0].Columns["DataType"].EditorControl = _syntaxEditor;
}

here

DataTypeEditTextBox _syntaxEditor = new DataTypeEditTextBox();

please respond if someone has tried this.


thanks
Paresh

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi Paresh,

    I am not familiar with SyntaxEditor. But I don't see how what you have here can possibly work.  There is no easy way to simply embed a control in the grid. It looks like you have started to try to implement IProvidesEmbeddableEditor here. But the code you have here is not enough. Implementing an editor is not a trivial thing and can takes days or even weeks to implement correctly. I would not recommend attempting it unless you have a subscription that includes the Infragistics source code so you can use the exitsing editors as an example. 

    It would probably be easier for you to simply position the SyntaxEditor control over the cell in the grid that is being edited. But even this is not trivial and will require you to handle quite a few events of the grid. 

Reply Children