Call RadWindow from CommandItem

6 posts, 0 answers
  1. Tim
    Tim avatar
    60 posts
    Member since:
    May 2011

    Posted 18 Aug 2011 Link to this post

    I have a Hierarchical RadGrid with CommandItems to Add New, Refresh and Export to Excel. This was created in a class and then displayed onto a content page. I have also created a WorkFlow usercontrol that displays in a RadWindow intended to be used for the user to Add New and Edit the records. How can I change the AddNew command to launch a RadWindow containing the usercontrol? I know I can call a control from GridFormEditType but I would like to keep the window

    Thanks
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 18 Aug 2011 Link to this post

    Hello Tim,

    Check the following demo which implements a similar scenario.
    Grid / Window Editing .

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Tim
    Tim avatar
    60 posts
    Member since:
    May 2011

    Posted 19 Aug 2011 Link to this post

    Shinu,
    I had already reviewed that solution but it was my assumption that I would have to create a Custom CommantItemTemplate? Keep in mind I am creating this datagrid in a class file not in the html markup. I do not what to have to create a custom template as I am taking advantage of other built in functions of the default CommandItemTemplate. Is there another way this can be accomplished?
  5. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 19 Aug 2011 Link to this post

    Hello,

    Sorry but please tell me you want Windows editing functionality without commandItemTemplete. Correct ??

    Thanks,
    Jayesh Goyani
  6. Tim
    Tim avatar
    60 posts
    Member since:
    May 2011

    Posted 19 Aug 2011 Link to this post

    My Goal is to override the default behavior of the BuildIn AddItem from the RadGridCommandItem to open a RadWindow using a jquery call  radopen("Controls/AddNewItem.aspx", "AddNewItemDialog");
    Here is the a partial set of code from my class where I define the grid.
    GridTableView _childRadGrid = new GridTableView(_parentRadGrid)
    {
        DataMember = "Policy",
        AutoGenerateColumns = false,
        Width = Unit.Percentage(100),
        PageSize = 10,
        BackColor = Color.FromArgb(198, 203, 214),
        CommandItemDisplay = GridCommandItemDisplay.Top,
        CommandItemSettings =
        {
            ShowExportToExcelButton = true,
            AddNewRecordText = "Add New Adjustment",
        },
        EnableHeaderContextMenu = true,
        HorizontalAlign = HorizontalAlign.NotSet,
        EditFormSettings =
        {
            //UserControlName = "Controls/AdjustmentWorkFlow/NewAdjustment.ascx",
            //EditFormType = GridEditFormType.WebUserControl,
            //PopUpSettings =
            //{
            //    Width = Unit.Pixel(740),
            //},
     
            EditColumn =
            {
                UniqueName = "EditRecord",
            },
     
        },
        HierarchyLoadMode = GridChildLoadMode.ServerOnDemand,
        //EditMode = GridEditMode.PopUp,
    };

    I know I have the option to use EditMode = GridEditMode.Popup But I would rather use the RadWindow I want the user to be able to add several items without having to reopen the window.


  7. Tim
    Tim avatar
    60 posts
    Member since:
    May 2011

    Posted 24 Aug 2011 Link to this post

    Bump
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017