This is a migrated thread and some comments may be shown as answers.

Selecting resources in new modal window

5 Answers 108 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Karol
Top achievements
Rank 1
Karol asked on 23 Mar 2015, 02:23 PM
As it is my first post on telerik forum i would like to say HI ;) 

And my question:

Is it possible to select resources for scheduler event in new window ? i have to create event that have participants as persons and companies and there is to many persons and companies in database to select them from dropdownlist.

Now i would like to have button for "Add Person" and "Add Company" or just "Add participants" and then generate a view where i could search and select in chceckboxes and then return these persons/companies back into controller.


Is it possible at all ? 

Could you make me a list of steps that allow me to achieve it ? (I am new in telerik)

5 Answers, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 24 Mar 2015, 09:46 AM
Hi Karol,

Basically the desired behavior is possible to be achieved, however it would require custom solution. For example you can define custom editor template (demo here) in which to place the desired custom buttons. On clicking the buttons you can open a new Window widget, load the edit template inside it and bind the current event model to it (using MVVM). 

Regards,
Vladimir Iliev
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Karol
Top achievements
Rank 1
answered on 24 Mar 2015, 10:17 AM
Thanks for answer. As editor template you think about scheduler custom editor ? and edit template for editing/selecting resources ? 

Is it possible to build it with example from here http://www.telerik.com/help/aspnet-ajax/scheduler-provider-with-multi-valued-resources.html

My database have similar schema, i connect event with it resource in many-to-many table EventResource,

Event is basic ISchedulerEvent table, and Resource table i store info about Event participants
0
Vladimir Iliev
Telerik team
answered on 25 Mar 2015, 07:04 AM
Hi Karol,

Straight to your questions:

1)  As editor template you think about scheduler custom editor ? and edit template for editing/selecting resources ? - Yes I was referring to custom editor and editing resources. 

2) Is it possible to build it with example from here.. - Yes, it's possible to use the schema listed in the related help topic. 


Regards,
Vladimir Iliev
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Karol
Top achievements
Rank 1
answered on 08 Apr 2015, 02:21 PM

Thank for answer Vladimir, i stopped developing for a moment and get back to idea and moved forward and now i am struggling with another problem as i go step by step i have a scheduler (which is a custom editor template where i added a button "Select Resources" which button opens a modal window where i have a two tabs with kendo grid (one grid for every tab)

 

and here comes my first issue if i close a modal window close custom editor template and start whole event adding process open new custom editor and click on button to open modal for selecting resources kendo grid somehow duplicates header row for searching through grid. 

 What is the reason of such behavior and where should i search for solution ? I provides code of one kendo grid( code for both are quite similar so providing both will be unnecessarily) and code for modal window can u check them for issues and point me aything what i could do wrong ?  

 kendo grid

//==============

 @(Html.Kendo().Grid<Larix.Esuite.Module.Contact.Public.IPerson>()
                    .Name("employessGrid")
                    .AutoBind(false)
                    .Columns(columns =>
                    {
                        columns.Bound(c => c.FirstName).Width(140).Filterable(ftb => ftb.Cell(cell => cell.Operator("contains")));
                        columns.Bound(c => c.LastName).Width(190).Filterable(ftb => ftb.Cell(cell => cell.Operator("contains")));
                        columns.Bound(c => c.TypeContact);
                    })
                    .Filterable(ftb => ftb.Mode(GridFilterMode.Row))
                    .Groupable()
                    .Sortable()
                    .Pageable(pageable => pageable
                        .Refresh(true)
                        .PageSizes(true)
                        .ButtonCount(5))
                    .Selectable(selectable => selectable
                        .Mode(GridSelectionMode.Multiple))
                    .DataSource(dataSource => dataSource
                        .Ajax()
                        .PageSize(15)
                        .ServerOperation(true)
                        .Read(read => read.Action("Employess_Get", "Scheduler"))
                    )
            )

//==============================

 

modal window

//=========================

<script>
    $(document).ready(function () {
        var win = $("\\#window").kendoWindow({
            actions: ["Maximize", "Minimize", "Close"],
            modal: true,
            resizable: true,
            title: "Select Resources",
            content: "../Scheduler/ResourcesTemplate",
            visible: false,
            height: "60%",
            width: "75%"
        }).data("kendoWindow");
    });

    $("\\#resourceButton").click(function () {
        $("\\#employessGrid").data("kendoGrid").dataSource.read();
        $("\\#contractorsGrid").data("kendoGrid").dataSource.read();
        var win = $("\\#window").data("kendoWindow");
        win.center();
        win.open();
    });
</script>
@* Modal window for choosing contactors or employees *@
<div id="window">

</div>

 

//========================

0
Vladimir Iliev
Telerik team
answered on 09 Apr 2015, 07:52 AM
Hello Karol,

From the provided information it's not clear for us what might be the reason for current behavior. Also as current thread is out of the original topic, may I kindly ask you to open a new support thread for the Scheduler and provide runable example where the issue is reproduced? In this way it is much easier to follow and concentrate on the particular issue which usually leads to its faster resolving.

Regards,
Vladimir Iliev
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
Scheduler
Asked by
Karol
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Karol
Top achievements
Rank 1
Share this question
or