Telerik Forums
UI for ASP.NET MVC Forum
3 answers
155 views
I have a reusable view for displaying project information in a handful of places.  In two places, I use this view to update a model and send it to the server for processing.  I'm seeing some strange formatting issue with the DatetimePicker when the same view is used on different pages (see attached screenshots).  I don't explicitly apply a format string to the Datepicker, but even having done so it doesn't make a difference.  If I edit the value, the format gets applied, but on load it is incorrect.  Both of the views are being called slightly different from my controller, but return the same partial with the same model:

[HttpPost]
public ActionResult UpdateView(Project project)
{
    var pipelineProject = project;
    ViewBag.IsUpdate = true;
    return PartialView("_CreateUpdateProject", pipelineProject);
}
 
 
[HttpPost]
public ActionResult UpdateViewForProjectDocumentGuid(string projectDocumentGuid)
{
    var projectRepository = new ProjectRepository(SystemConnection, CurrentUser, WebConfigHelper.GetConfigurationValue("DefaultProgram"));
    var pipelineProject = projectRepository.Read(new ProjectSearchModel() { AccountNames = AccessibleProjects.Select(a => a.ProjectAccountName).ToList(), DocumentGuid = projectDocumentGuid}).First();
    ViewBag.IsUpdate = true;
    ViewBag.CollapseGeneral = true;
    return PartialView("_CreateUpdateProject", pipelineProject);
}

The GoodDatepickerFormat image comes from result of UpdateViewForProjectDocumentGuid and the BadDatepickerFormat comes from UpdateView,  Everything looks the same in both cases (other than UpdateView returning the DateTimes in question with a Kind of Local rather than Unspecified), and I attempted to read it exactly the same as the working case but that made no difference.  Is there any workaround to force format on the field?

Petur Subev
Telerik team
 answered on 14 Apr 2014
6 answers
958 views
I am trying to disable an entire form or all form fields within a parent div.  This works by disabling the div with the following jquery:
$('#timerequest-details').attr('disabled', 'disabled');

except for the Kendo Editor controls within that div.  I have seen posts that show to use the following jquery to disable the content of an Editor:
$($('#editorName').data().kendoEditor.body).attr('contenteditable',false)

but I would like to do this from the parent div or form so that I don't have to do it for each form field.  More specifically, some of my form fields are loaded through various partial views and I don't want to have to check if they should be disabled and set them as disabled on each partial view.

Is this possible to do?






Stephen
Top achievements
Rank 1
 answered on 11 Apr 2014
1 answer
503 views
Howe to create a dynamic column grid with multiple cell values. I've managed to create a dynamic column grid, not clear on how to add multiple values to a dynamic column cell. I have attached the mock screen of what I want to create. The right side of the grid is dynamic columns which each cell of the column display's 2 data valued.

Thanks.
Dimo
Telerik team
 answered on 11 Apr 2014
1 answer
248 views
  model
public class OModel
{
public IEnumerable<REF_OTRASLEVAYA_PRENADLEGNOST> RefOtraslevayaPrenadlegnost { get;set; }
public int OTRASL_ID { get; set; }
}

html
@model OModel
@Html.Kendo().DropDownListFor(m => m.OTRASL_ID).Name("Otraslevaya").DataTextField("Text").DataValueField("Value").BindTo(Model.RefOtraslevayaPrenadlegnost)

control
public ActionResult Update()
        {    
            return View(new OModel{RefOtraslevayaPrenadlegnost=dataManager.RefOtraslevayaPrenadlegnosts.GetRefOtraslevayaPrenadlegnosts());
        }


[HttpPost]
        public ActionResult Update(Model model)
        {
                  int i = model.OTRASL_ID   //  =0  ?????????????
            return View(model);
        }


when I select a value in DropDoschnListFor nazhimatyu and submit, then the selected value does not come to the server. Why?





Georgi Krustev
Telerik team
 answered on 10 Apr 2014
5 answers
232 views

Hello,

after the page containing the tree view is refreshed, the state isn’t remembered so the tree view is collapsed totally. We have the requirement that the state is unchanged on a refresh or navigation operation on the browser.

So our question: Is it possible to store the state in any way (cookies etc.) to restore it on a page load?

Thanks in advance.

Daniel
Telerik team
 answered on 10 Apr 2014
1 answer
228 views
I have a bit of javascript that selects the first row in the grid when the page loads (to trigger a subsequent load).  When I have frozen columns enabled and I select the first row (in the DataBound handler) the unlocked rows are highlight properly, but the locked column portion of the row is not (see attached).  Here is the javascript snippet:

var grid = $(pipelineForecastGridId).data("kendoGrid");
var item = grid.tbody.find("tr:first");
grid.select(item);

Selection works perfectly, other than the row style not being applied.  Thanks!
Nikolay Rusev
Telerik team
 answered on 10 Apr 2014
2 answers
117 views
I have a little problem with the MVC datasource configuration of the grid.
I want to be able to specify a unique URL per row for the Update and Delete method of the datasource (ajax enabled).

My configuration right now looks like this:

// Removed other configurations here...
.DataSource(dataSource => dataSource
          .Ajax()
// Removed other configurations here...
          .Read(i => i.Route(RouteNames.ReadRoute)) // This should point to /api/users + GET
          .Create(i => i.Route(RouteNames.CreateRoute).Type(HttpVerbs.Post)) // This should point to /api/users + POST
          .Update(i => i.Route(RouteNames.UpdateRoute, new { id = ????? }).Type(HttpVerbs.Put)) // This should point to /api/users/{id} + PUT
          .Destroy(i => i.Route(RouteNames.DeleteRoute, new { id = ????? }).Type(HttpVerbs.Delete)) // This should point to /api/users/{id} + DELETE

There seems to be some problems with Kendo not supporting REST specifications.
First of; The Read method CANNOT be a GET, it must be a POST (is this correct and why?)
Secondly, and more important; The Update and Destroy NEEDS to be in the form of /collection/{id}

So for each row, I would have different Update and Delete urls where the {id} part varies.
This can be solved if I configure the datasource using javascript by setting the url of the create and delete methods to a javascript function.
But unfortunately this isn't possible in MVC - why?

Kind regards
Richard
Jarle
Top achievements
Rank 1
 answered on 09 Apr 2014
2 answers
69 views
Is it possible to have the functionality in a listview similar to where a user can set the filtering on a grid column? (the little popup via column header filter button).?
Rene
Top achievements
Rank 1
 answered on 09 Apr 2014
2 answers
157 views
I posted the same my be in some wrong category. Please answer ASAP as I am in critical Situation.

Hi,
I am new to Kendo UI widgets and MVC4. I am using Razor View. I have a model Called Project. I have another model called Location. In Project model there is a property "List<LocationType> Locations". 

On my razor form i have "@model Model.Project" and one of my multiselect widget shows me location list. I have declared it "@(Html.Kendo().MultiSelectFor(model => model.LocanTypes)". Now when I try to get "Project.Locations" in controller in [HttpPost] action I get Project.Locations as null.

Model declaration on Razor Page: 
@model PestPec.Models.Project 

Multiselect declartion of Multiselect:
@(Html.Kendo().MultiSelectFor(model => model.LocanTypes)
                        .Name("LocationTypesMultiSelect")
                        .Placeholder("Select Location Type(s)")
                        .DataTextField("Name")
                        .DataValueField("ID")
                        .Filter(FilterType.Contains)
                        .DataSource(source =>
                        {
                            source.Read(read =>
                            {
                                read.Action("GetLocatinTypes", "Project");
                            });
                        }) 
                    ) 

Project.cs:
 public class Project
    {
        public int ID { get; set; }
        public string Name { get; set; }
        public int Type { get; set; }
        public string CreatedBy { get; set; }
        public List<Technician> Technicians{get; set;}
        public List<Route> Routes { get; set; }
        public List<ProjService> Services { get; set; }
        public List<Division> Divisions { get; set; }
        public List<Branch> Branches { get; set; }
        public List<LocationType> LocanTypes { get; set; }
        public String Country { get; set; }
        public String City { get; set; }

        [DisplayFormat(DataFormatString = "{0:MM/dd/yy}")]
        public DateTime CreatedDate { get; set; }

        [DisplayFormat(DataFormatString = "{0:MM/dd/yy}")]
        public DateTime LastUpdatedDate { get; set; }
    }

LocationType:
public class LocationType
    {
        public int ID { get; set; }
        public string Name { get; set; }
    }
Daniel
Telerik team
 answered on 09 Apr 2014
2 answers
372 views
Hi,

I tested a web application with kendo (the last version 2014.1.318), this app works fine in Chrome but in Firefox the behaviour is strange, for example the dropdownlist works fine until I search and the data shown in the kendo grid, after the search the dropdownlist doesn't show the items or show and hide they very fast.

I put an example of how scripts I import and how I used them.

<link rel="stylesheet" href="@Url.Content("~/Content/kendo/2014.1.318/kendo.common.min.css")"type="text/css" />
    <link rel="stylesheet" href="@Url.Content("~/Content/kendo/2014.1.318/kendo.default.min.css")"type="text/css" />
    <script src="@Url.Content("~/Scripts/kendo/2014.1.318/jquery.min.js")"type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/kendo/2014.1.318/kendo.all.min.js")"type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/kendo/2014.1.318/kendo.aspnetmvc.min.js")"type="text/javascript"></script>
 
@{
    ViewBag.Title = "Control Interno";
    Layout = "~/Views/Home/PaginaInicio.cshtml";
}
 
<h2 class="Cabecera">Control interno</h2>
 
<div>
   <table style="font-size: x-small" align="center">
            <tr>
                <td>
                    <label for="start">Desde: </label><label class="obligatorio">*</label>
                    @(Html.Kendo().DatePicker().Name("txtFechaInicio").Events(e => e.Change("startChange")).Value(ViewBag.Fecha))
                </td>
                <td>
                    <label for="end" style="margin-left:3em">Hasta: </label><label class="obligatorio">*</label>
                    @(Html.Kendo().DatePicker().Name("txtFechaFin").Events(e => e.Change("endChange")).Value(ViewBag.Fecha))
                </td>
            </tr>
    </table>
    
    <br />
 
    <table style="font-size: x-small" align="center">
            <tr>
                <td>
                   <label>Tipo de control</label>
                    @(Html.Kendo().DropDownList()
                      .Name("tipocontrol")
                      .OptionLabel("Todos")
                      .DataTextField("NOMBRE_TIPOCONTROL")
                      .DataValueField("ID")
                      .AutoBind(false)
                      .DataSource(source =>
                      {
                          source.Read(read =>
                          {
                              read.Action("ToolbarTemplate_TipoControl", "Consultas");
                          });
                      })
                    )
                </td>
 
                <td>
                   <label> Mostrar registros: </label>
                   @(Html.Kendo().DropDownList()
                      .Name("tipocaso")
                      .OptionLabel("Todos")
                      .DataTextField("NOMBRE_TIPOCASO")
                      .DataValueField("ID")
                      .AutoBind(false)
                      .DataSource(source =>
                      {
                          source.Read(read =>
                          {
                              read.Action("ToolbarTemplate_TipoCaso", "Consultas");
                          });
                      })
                    )
                </td>
            </tr>
            
    </table>
 
    <br />
    <p>
        <label class="obligatorio">(*) Campo obligatorio</label>
    </p>
 
    <br />
 
    <table style="font-size: x-small" align="center">
        <tr>
            <td>
                @*<input type="Button" value="Buscar" onclick="BindGrid();" class="BotonBuscar" />*@
                <button type="button" id="btnSearch" onclick="BindGrid();" value="Buscar" class="k-button" >
                <img src="../../Images/Buscarboton.png" />
                </button>
            </td>
        </tr>
    </table>
     
</div>
<br />
  
<div>
    <table style="font-size: x-small" align="center" id="tabDato">
        <tr>
            <td class="etiquetas1" align="right">
                <label><strong>Desde: </strong></label>
            </td>
            <td class="etiquetas2">
                <label id="lblDesde"></label>
            </td>
            <td class="etiquetas1" align="right">
                <label><strong>Hasta: </strong></label>
            </td>
            <td class="etiquetas2">
                <label id="lblHasta"></label>
            </td>
        </tr>
        <tr>
            <td class="etiquetas1" align="right">
                <label><strong>Tipo de control: </strong></label>
            </td>
            <td class="etiquetas2">
                <label id="lblControl"></label>
            </td>
            <td class="etiquetas1" align="right">
                <label><strong>Mostrar registros: </strong></label>
            </td>
            <td class="etiquetas2">
                <label id="lblCaso"></label>
            </td>
        </tr>
    </table>
</div>
 
<br />
 @model IEnumerable< SIS_CSC.ViewMoldels.ControlInternoViewData>
<div style="font-size:xx-small">
    @(Html.Kendo().Grid(Model)
        .Name("Grid")
        .Columns(columns =>
                {
                    columns.Template(t => { }).Title("N°").ClientTemplate("#= renderRecordNumber(data) #").Width(40);
                    columns.Bound(p => p.ID_SOLICITUDSERVICIO).Visible(false);
                    columns.Bound(p => p.NOMBRE_CLIENTE).Title("Cliente");
                    columns.Bound(p => p.SFECHA_SOLICITOSERVICIO).Title("Fecha");
                    columns.Command(command => command.Custom("custom").Text("").Click("MostrarSolicitud")).Title("N° de solicitud").Width(75);
                    columns.Bound(p => p.SERIE_EQUIPO).Title("N° de serie");
                    columns.Bound(p => p.NOMBRE_TECNICO).Title("Técnico");
                    columns.Bound(p => p.NOMBRE_UNIDADNEGOCIO).Title("Siglas");
                    columns.Bound(p => p.SUGERENCIA_TECNICO).Title("Sugerencia del técnico");
                    columns.Bound(p => p.OBSERVACION_CLIENTE).Title("Observación del cliente");
                    columns.Bound(p => p.SUGERENCIA_INTERNA).Title("Sugerencia interna");
                    columns.Bound(p => p.CASO_CERRADO).Visible(false);
                    columns.Command(command => command.Custom("Gestionar").Text("").Click("GestionarCI")).Title("Gestionar").Width(75);
                })
                       .Filterable()
                       .Sortable()
                       .Pageable(m => m.PageSizes(new int[] { 10, 20, 50, 100 }))
                       .Groupable()
                       .Events(e => e.DataBound("dataBound"))
                       .Scrollable(s => s.Height("auto"))
                       .TableHtmlAttributes(new { style = "table-layout: fixed;" })
                       .Resizable(r => r.Columns(true))
               .DataSource(dataSource => dataSource
                   .Ajax()
                   .Events(ev =>
                    {
                        ev.RequestStart("Load");
                        ev.RequestEnd("Ready");
                    })
                   .Read(read => read.Action("LeerExt_ControlInterno", "Consultas").Data("getParameter"))
                   .Model(model => { model.Id(p => p.ID_SOLICITUDSERVICIO); })
               )
               .ToolBar(toolBar =>
                    toolBar.Custom()
                        .Text("Exportar a PDF")
                        .HtmlAttributes(new { id = "export" })
                        .Url(Url.Action("ExportarPDFControlInterno", "Consultas",
                        new
                        {
                            page = 1,
                            pageSize = "~",
                            filter = "~",
                            sort = "~",
                            txtFechaInicio = "~",
                            txtFechaFin = "~",
                            tipocontrol = "0",
                            tipocaso = "0",
                            nombre_control = "Todos",
                            nombre_caso = "Todos"
                        }))
                )
                .ToolBar(toolBar =>
                    toolBar.Custom()
                        .Text("Exportar a Excel")
                        .HtmlAttributes(new { id = "exportex" })
                        .Url(Url.Action("ExportarExcelControlInterno", "Consultas",
                        new
                        {
                            page = 1,
                            pageSize = "~",
                            filter = "~",
                            sort = "~",
                            txtFechaInicio = "~",
                            txtFechaFin = "~",
                            tipocontrol = "0",
                            tipocaso = "0",
                            nombre_control = "Todos",
                            nombre_caso = "Todos"
                        }))
 
                )
           )
</div>
 
<div>
    @(Html.Kendo().Window()
    .Name("Rates")
    .Title("Solicitud de servicio")
    .Visible(false)
    .Modal(true)
    .Draggable(true)
    .Width(800)
    .Height(600)
    .Events(e =>
    {
        e.Open("onOpen");
        e.Refresh("onRefresh");
    })
)
</div>
 
<div>
    @(Html.Kendo().Window()
    .Name("GCI")
    .Title("Gestionar control interno")
    .Visible(false)
    .Modal(true)
    .Draggable(true)
    .Width(600)
    .Height(400)
    .Events(e =>
    {
        e.Open("onOpen");
        e.Refresh("onRefresh");
    })
)
</div>
 
<div>
    @(Html.Kendo().Window()
    .Name("CCI")
    .Title("Control interno")
    .Visible(false)
    .Modal(true)
    .Draggable(true)
    .Width(600)
    .Height(400)
    .Events(e =>
    {
        e.Open("onOpen");
        e.Refresh("onRefresh");
    })
)
</div>
 
<script type="text/javascript">
    function Load(e) {
        kendo.ui.progress($("#Grid"), true);
    }
 
    function Ready(e) {
        kendo.ui.progress($("#Grid"), false);
    }
 
    function onOpen(e) {
        kendo.ui.progress(e.sender.element, true);
    }
 
    function onRefresh(e) {
        kendo.ui.progress(e.sender.element, false);
    }
</script>
 
<script type="text/javascript">
    var rowNumber = 1;
    var flag = false;
 
    function resetRowNumber(e) {
        rowNumber = 1;
    }
 
    function renderRecordNumber(data) {
        var page = parseInt($("#Grid").data("kendoGrid").dataSource.page()) - 1;
        var pagesize = $("#Grid").data("kendoGrid").dataSource.pageSize();
        return parseInt(rowNumber++ + (parseInt(page) * parseInt(pagesize)));
    }
 
</script>
 
<script type="text/javascript">
 
    $(document).ready(function () {
        OcultarControl("tabDato", true);
    });
 
    function CambiarTexto() {
 
        var desde = $("#txtFechaInicio").val();
        var hasta = $("#txtFechaFin").val();
        var tipocontrol = $("#tipocontrol").data("kendoDropDownList").text();
        var tipocaso = $("#tipocaso").data("kendoDropDownList").text();
 
        $("#lblDesde").text(desde);
        $("#lblHasta").text(hasta);
        $("#lblControl").text(tipocontrol);
        $("#lblCaso").text(tipocaso);
 
        OcultarControl("tabDato", false);
    }
 
</script>
 
<script type="text/javascript">
    function dataBound(e) {
 
        //var pageSizes = [{ text: "10", value: 10 }, { text: "20", value: 20 }, { text: "50", value: 50 },
        //    { text: "100", value: 100 }, { text: "Todo", value: 1000000 }];
 
        //$('.k-pager-sizes select[data-role="dropdownlist"]').data('kendoDropDownList')
        //    .setDataSource(new kendo.data.DataSource({ data: pageSizes }));
 
        resetRowNumber(e);
 
        var rows = this.table.find("tr[role='row']");
        for (var i = 0; i < rows.length; i++) {
            var model = this.dataItem(rows[i]);
            $(rows[i]).find(".k-grid-custom").contents().last()[0].textContent = model.CODIGO_SOLICITUDSERVICIO;
 
            if (model.CASO_CERRADO == false || model.CASO_CERRADO == null) {
                $(rows[i]).find(".k-grid-Gestionar").contents().last()[0].textContent = "Gestionar";
            }
            else {
                $(rows[i]).find(".k-grid-Gestionar").contents().last()[0].textContent = "Cerrado";
            }
        }
 
        var grid = $('#Grid').data('kendoGrid');
 
        var requestObject = (new kendo.data.transports["aspnetmvc-server"]({ prefix: "" }))
        .options.parameterMap({
            page: grid.dataSource.page(),
            sort: grid.dataSource.sort(),
            filter: grid.dataSource.filter(),
            txtFechaInicio: $("#txtFechaInicio").val(),
            txtFechaFin: $("#txtFechaFin").val(),
            tipocontrol: $("#tipocontrol").val(),
            tipocaso: $("#tipocaso").val(),
            nombre_control: $("#tipocontrol").data("kendoDropDownList").text(),
            nombre_caso: $("#tipocaso").data("kendoDropDownList").text()
        });
 
        // EXPORTAR A PDF
        var $exportLink = $('#export');
        var href = $exportLink.attr('href');
        href = href.replace(/page=([^&]*)/, 'page=' + requestObject.page || '~');
        href = href.replace(/sort=([^&]*)/, 'sort=' + requestObject.sort || '~');
        href = href.replace(/pageSize=([^&]*)/, 'pageSize=' + grid.dataSource.total());
        href = href.replace(/filter=([^&]*)/, 'filter=' + (requestObject.filter || '~'));
        href = href.replace(/txtFechaInicio=([^&]*)/, 'txtFechaInicio=' + (requestObject.txtFechaInicio || ""));
        href = href.replace(/txtFechaFin=([^&]*)/, 'txtFechaFin=' + (requestObject.txtFechaFin || ""));
        href = href.replace(/tipocontrol=([^&]*)/, 'tipocontrol=' + (requestObject.tipocontrol || ""));
        href = href.replace(/tipocaso=([^&]*)/, 'tipocaso=' + (requestObject.tipocaso || ""));
        href = href.replace(/nombre_control=([^&]*)/, 'nombre_control=' + (requestObject.nombre_control || ""));
        href = href.replace(/nombre_caso=([^&]*)/, 'nombre_caso=' + (requestObject.nombre_caso || ""));
        $exportLink.attr('href', href);
 
 
        // EXPORTAR A EXCEL
        var $exportLinkex = $('#exportex');
        var hrefex = $exportLinkex.attr('href');
        hrefex = hrefex.replace(/page=([^&]*)/, 'page=' + requestObject.page || '~');
        hrefex = hrefex.replace(/sort=([^&]*)/, 'sort=' + requestObject.sort || '~');
        hrefex = hrefex.replace(/pageSize=([^&]*)/, 'pageSize=' + grid.dataSource.total());
        hrefex = hrefex.replace(/filter=([^&]*)/, 'filter=' + (requestObject.filter || '~'));
        hrefex = hrefex.replace(/txtFechaInicio=([^&]*)/, 'txtFechaInicio=' + (requestObject.txtFechaInicio || ""));
        hrefex = hrefex.replace(/txtFechaFin=([^&]*)/, 'txtFechaFin=' + (requestObject.txtFechaFin || ""));
        hrefex = hrefex.replace(/tipocontrol=([^&]*)/, 'tipocontrol=' + (requestObject.tipocontrol || ""));
        hrefex = hrefex.replace(/tipocaso=([^&]*)/, 'tipocaso=' + (requestObject.tipocaso || ""));
        hrefex = hrefex.replace(/nombre_control=([^&]*)/, 'nombre_control=' + (requestObject.nombre_control || ""));
        hrefex = hrefex.replace(/nombre_caso=([^&]*)/, 'nombre_caso=' + (requestObject.nombre_caso || ""));
        $exportLinkex.attr('href', hrefex);
    }
 
    function MostrarSolicitud(e) {
        e.preventDefault();
        var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
        var direction = "/Consultas/SomeAction/" + dataItem.ID_SOLICITUDSERVICIO;
        var wnd = $("#Rates").data("kendoWindow");
        if (!wnd) {
            // first click of the button - will automatically fetch the contentUrl
            wnd = $("#Rates").kendoWindow({
                title: "Solicitud de servicio",
                actions: ["Close"],
                content: direction,
                visible: false,
                modal: true
            }).data("kendoWindow");
        }
        wnd.refresh(direction);
        wnd.center();
        wnd.open();
    }
 
    function GestionarCI(e) {
        e.preventDefault();
        var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
        var direction = "/Consultas/GestionarControlInterno/" + dataItem.ID_SOLICITUDSERVICIO;
         
        if (dataItem.CASO_CERRADO == false || dataItem.CASO_CERRADO == null) {
            var wnd = $("#GCI").data("kendoWindow");
            if (!wnd) {
                // first click of the button - will automatically fetch the contentUrl
                wnd = $("#GCI").kendoWindow({
                    title: "Gestionar control interno",
                    actions: ["Close"],
                    content: direction,
                    visible: false,
                    modal: true
                }).data("kendoWindow");
            }
 
        }
        else {
            var wnd = $("#CCI").data("kendoWindow");
            if (!wnd) {
 
                // first click of the button - will automatically fetch the contentUrl
                wnd = $("#CCI").kendoWindow({
                    title: "Control interno",
                    actions: ["Close"],
                    content: direction,
                    visible: false,
                    modal: true
                }).data("kendoWindow");
            }
            //            wnd1.refresh(direction);
            //            wnd1.center();
            //            wnd1.open();
        }
        wnd.refresh(direction);
        wnd.center();
        wnd.open();
         
    }
 
</script>
 
 
<script type="text/javascript">
    function getParameter() {
        return {
            txtFechaInicio: $("#txtFechaInicio").val(),
            txtFechaFin: $("#txtFechaFin").val(),
            tipocontrol: $("#tipocontrol").val(),
            tipocaso: $("#tipocaso").val(),
            bandera: flag
        };
    }
 
    function BindGrid() {
        flag = true;
        CambiarTexto();
        $("#Grid").data("kendoGrid").dataSource.read();
        $("#Grid").data("kendoGrid").refresh();
    }
</script>
 
<script type="text/javascript">
        function startChange() {
            var endPicker = $("#txtFechaFin").data("kendoDatePicker"),
            startDate = this.value();
 
            if (startDate) {
                startDate = new Date(startDate);
                startDate.setDate(startDate.getDate());
                endPicker.min(startDate);
            }
        }
 
        function endChange() {
            var startPicker = $("#txtFechaInicio").data("kendoDatePicker"),
            endDate = this.value();
 
            if (endDate) {
                endDate = new Date(endDate);
                endDate.setDate(endDate.getDate());
                startPicker.max(endDate);
            }
        }
 
</script>

Thanks for the help.

Regards
Misahael
Top achievements
Rank 1
 answered on 09 Apr 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?