Telerik Forums
UI for ASP.NET MVC Forum
3 answers
135 views

I have a simple kendo.grid with inline editing and some decimals and datatime columns.

The problem is that when hitting the EDIT button, the editable inline fields are not styled as I normally see in other websites, we have (see attached mage).

What am I missing - I have compared this site with a site, where it works, but can't find the difference.

It should be obvious, but I cant see it :-)

Thank you in advance.

Jacob
Top achievements
Rank 1
 answered on 02 Sep 2015
2 answers
395 views

I am attempting to use a Kendo UI Window modal to edit an IList<T> and it is posting back NULL in the controller. I found a fairly old posts here from 2012 but was wondering if anyone has a newer solution or if there are any other alternatives?

Main View: 

@using (Html.BeginForm())
{
    @(Html.Kendo().Window()
        .Name("seg_locations_modal")
        .Title("Other Locations")
        .Content(@<TEXT>
            <div id="modal-content" class="split-sub-content-container" style="width:480px;">
                <ul>
                    @Html.EditorFor(x => x.Locations)
                </ul>
            </div>
            <div class="form-submit-container" style="width:480px; margin:0;">
                <p><button id="add-location" type="button" name="add-location" title="Close">Add Location</button></p>
                <p><button id="close-modal" type="button" name="close-modal" title="Close">Close Window</button></p>
            </div>
        </TEXT>)
        .Width(500)
        .Height(500)
        .Draggable(true)
        .Modal(true)
        .Visible(false)
    )
 
}

EditorTemplate: 

@model ReMemberMvc.Data.Model.Locations
@{
    Layout = null;
}
<li class="locations-row">
    <div data-locationsid="@Model.LocationsId" data-locationsseq="@Model.Seq">
        @Html.HiddenFor(x => x.LocationsId)
        @Html.HiddenFor(x => x.Seq)
        <span class="locations-description-column">@(Html.Kendo().TextBoxFor(x => x.Description).HtmlAttributes(new { style = "width:301px;", placeholder = "Bridgewater, NJ" }))</span>
        <span class="locations-employeerange-column">@(Html.Kendo().DropDownListFor(x => x.EmployeeRangeId).OptionLabel("Not Provided").DataTextField("Description").DataValueField("EmployeeRangeId").DataSource(source => { source.Read(read => { read.Action("GetEmployeeRangeList", "SelectLists"); }); }))</span>
    </div>
</li>

ViewModel: 

using ReMemberMvc.Data.Model;
using System.Collections.Generic;
 
namespace ReMemberMvc.Data.ViewModels
{
    public class SegApplicationViewModel
    {
        public virtual SegApplication SegApplication { get; set; }
 
        public virtual IList<Locations> Locations { get; set; }
    }
}

Thank you in advance.

Dimo
Telerik team
 answered on 01 Sep 2015
1 answer
100 views

Hello,

 II have a grid that looks a lot like the one in ths example (Grids in a Master Grid) :

http://demos.telerik.com/kendo-ui/grid/hierarchy

 â€‹It works very well. But I would really like to be able to DragNDrop rows from one Detail Template to another one. Is this possible with your grid ?

 

Thanks !

 Guillaume

 

Kiril Nikolov
Telerik team
 answered on 01 Sep 2015
4 answers
214 views
Hello

Is it possible to set / change the mask of an UI for ASP.NET MVC MaskedTextBoxFor clientside?  If so, can you please provide a sample?  As an example if a onSelect of a dropdown.

Thanks
Kiril Nikolov
Telerik team
 answered on 01 Sep 2015
2 answers
617 views
Can anyone direct me to an example of how to create two kendo grids using the mvc wrappers and allow drag and drop (drag and drop 1 or more rows) functionality between the two?

I have searched the forums and documentation and cannot find any.
Kiril Nikolov
Telerik team
 answered on 31 Aug 2015
3 answers
250 views

I'm building the list of values a column can be filtered by using the FilterMenuInit event and the initCheckboxFilter(e) javascript code and it's working great.

Now I add a new row to the grid using the toolbar Create method and AJAX.  The new row might contain a value for the column being filtered that wasn't there before.  I would like to be able to add that new value to the existing list in the filter for that column.  Can I somehow set the FilterMenuInit event to be triggered again?

Thanks,
Stu

Boyan Dimitrov
Telerik team
 answered on 31 Aug 2015
2 answers
204 views

Hello 

I have question how can I refresh data on TreeList after update action? 
When I am editing item i am also editing few other items. After close popup only edited item is refreshed. I need to find way how to refresh whole control. 
I tried:
- on update action return whole data
public JsonResult Update([DataSourceRequest] DataSourceRequest request, ProductCategoryViewModel category)        {          
  if (ModelState.IsValid)            {  
              var services = new ProductCategoryServices(db);               
.Update(category, ModelState);            

}            var result = db.ProductCategories.ToTreeDataSourceResult(request,                                cat => cat.ProductCategoryId                                , cat => cat.FKParentProductCategoryId                                , cat => cat.ToProductCategoryViewModel(request)                );            //DataSourceResult dataTreeList =             return Json(category, JsonRequestBehavior.AllowGet);

}

Mateusz
Top achievements
Rank 1
 answered on 28 Aug 2015
5 answers
1.2K+ views

I have a kendo grid that I try to set different columns as follow

            .Columns(columns =>
            {
                if ((bool)ViewData["resourcePooled"])
                {
                    columns.Bound(s => s.ResourceIdAssignmentName).Width(300);
                }
                else
                {
                    columns.Bound(s => s.ResourceIdPoolName).Width(300);
                }​

But it only can set first column, i.e it works only when ViewData["resourcePooled"]=true. When ViewData["resourcePooled"]=false, it doesn't work. Note that above code works well in Telerik MVC Extension. But after in Kendo, it has above problem. I'd like to know what happen. Thanks.

 

Dimiter Madjarov
Telerik team
 answered on 28 Aug 2015
1 answer
199 views

I have a colour code property on my model which has UIHint set to a colour picker partial view.

Everything works as expected for existing values in my grid but not when I add a new row from the Grid.

I have tried setting default values onto my model property and even put debug lines to write out when the Get property is called.

 However when the Add button is pressed from the Grid, the get property is NOT called and I get a Cannot parse colour "" error.

 How can a default be given to the colour picker?

 

Dimiter Madjarov
Telerik team
 answered on 28 Aug 2015
3 answers
585 views

Hi, 

 I'm using a template for grid popup edit. There are validations for the text input such as pattern="[a-zA-Z0-9_-]{20390}" and they work fine. However, I also want to make validation on  the server side, and I can only use error event of data source:

     error: function (e) {
                alert(e.xhr.responseJSON.error.message);
            }

 

This approach works but its style is not consistent with the former validation message. How can I show the message from remote below the input box, just as they are validated locally?

 Thanks.

Daniel
Telerik team
 answered on 28 Aug 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?