Ejemplo n.º 1
0
 private void OnInvokeAddItemButton(ChildrenEditorGridPanelItemAddedEventArgs e)
 {
     if (AddItemButtonClicked != null)
         AddItemButtonClicked(this, e);
 }
Ejemplo n.º 2
0
        private void OnGridPanelAddItemButtonClicked(object sender, ChildrenEditorGridPanelItemAddedEventArgs e)
        {
            _addedTypes.Add(e.ItemType.FullName + "," + e.ItemType.Assembly.FullName);

            ContentItem contentItem = CreateItem(e.ItemType);
            Window editorWindow = AddEditorWindow(contentItem);
            editorWindow.Render(this);

            ExtNet.ResourceManager.RegisterOnReadyScript(string.Format(@"
                var store = {0};
                var record = new store.recordType({{ IconUrl : '{1}' }}, 'New{3}');
                record.newRecord = true;
                store.add(record);

                var window = Ext.getCmp('{2}');
                window.record = record;
                window.show();",
                                             _store.ClientID,
                                             contentItem.IconUrl,
                                             editorWindow.ClientID,
                                             _addedTypes.Count));
        }