Telerik Forums
Kendo UI for jQuery Forum
12 answers
2.6K+ views
I need to check a single field for several possible values in my datasource filter.

Imagine you want a filter to show only rows with "name" containing "Jennie" or "name" containing "Genie".

Trying this yields no matches:

myPeopleDataSource.filter([{field:"name",operator:"contains",value:"Jennie"}, {field:"name",operator:"contains",value:"Genie"}])

I'm guessing this is because the filter is limited to one criteria per field per filter action.  

Is that true?

Any way around this?
Boyan Dimitrov
Telerik team
 answered on 13 Jul 2017
3 answers
402 views

Hi,
I have problem loading Images and glyphs Icons and fonts of grid and drop down box when I use bundling and virtual path to deploy application. However, without bundling it is working fine in virtual path.


If, I do not use virtual path then it is working fine with bundling and without bundling.

My current path is in which not working
http://localhost:8089/HTML5/...
But if I use
http://localhost:8089/....
Then it is working fine
Below is the my codes
CSHTML File

<head>
    <meta name="viewport" content="width=device-width" />
    <base href="~/">
    <link rel="icon" href="~/Content/Images/favicon.gif" type="image/png">
    @Styles.Render("~/Content/KendoCss")
    @Styles.Render("~/Content/Styles")
    @Styles.Render("~/Content/appThemesCss")
    @Styles.Render("~/Content/SiteCss")
</head>

 

Below is my bundle Config file

#region Themes
bundles.Add(new Bundle("~/Content/appThemesCss")
.Include("~/Content/AppTheme/css/custom.min.css",new CssRewriteUrlTransform())
.Include("~/Content/AppTheme/css/custom-responsive.min.css", new CssRewriteUrlTransform())
 .Include("~/Content/AppTheme/css/custom-skins.min.css.css", new CssRewriteUrlTransform())
 .Include("~/Content/AppTheme/css/ace-skins.min.css", new CssRewriteUrlTransform()));
 
 bundles.Add(new StyleBundle("~/Content/SiteCss")
.Include("~/Content/AppTheme/css/main.css",
         "~/Content/AppTheme/css/main-rtl.css"
         ));
            #endregion
            #region Kendo
bundles.Add(new Bundle("~/Content/KendoCss")
.Include("~/Content/Kendo/styles/kendo.common.min.css", new CssRewriteUrlTransform())

.Include("~/Content/Kendo/styles/kendo.rtl.min.css", new CssRewriteUrlTransform())
.Include("~/Content/Kendo/styles/kendo.material.min.css", new CssRewriteUrlTransform())
            );

 

And my folder structure is look like in the attach

 

Please Help me,
Thank you.

Ivan Zhekov
Telerik team
 answered on 13 Jul 2017
2 answers
3.6K+ views
Hi,

I'm using Kendo UI Professional with Angular 4. I have a kendo grid with a bunch of rows and I'd like alternate rows to be colored. Ex. 1,3,5 rows in blue and 2,4,6 in gray.

How do I achieve this? Assigning a class to the kendo-grid-column and then changing its background obviously changes color for all the rows.

Thanks!
Stefan
Telerik team
 answered on 13 Jul 2017
3 answers
450 views

Hi,

It's a bug?
In hierarchy grid, and Inline Edit mode.

When I updated, and the RETURN result is null,
But why the Grid still has data?

MVC APSX:

<%:
        Html.Kendo().Grid<CarryingCapacityMD>()
            .Name("Grid").ToolBar(commands => commands.Create())
            .Columns
            (
                columns =>
                {
                    columns.Bound(o => o.Tonnage).Width(75).Format("{0:0.00}");
                    columns.Bound(o => o.CageCount).Width(75);
                    columns.Command
                    (
                        commands =>
                        {
                            commands.Edit();
                            commands.Destroy();
                        }
                    ).Width(180).Title("操作");
                }
            )
            .ClientDetailTemplateId("freightInformationTemplate")
            .DataSource
            (
                dataSource =>
                    dataSource.Ajax()
                        .Model
                        (
                            model =>
                            {
                                model.Id(p => p.CarryingCapacityID);
                            }
                        )
                        .Read("_AjaxCarryingCapacityList", "Configurations")
                        .Update("_AjaxCarryingCapacityUpdate", "Configurations")
                        .Destroy("_AjaxCarryingCapacityDelete", "Configurations")
                        .Create("_AjaxCarryingCapacityInsert", "Configurations")
            )
            .Editable(editing => editing.Mode(GridEditMode.PopUp))
    %>
    <script id="freightInformationTemplate" type="text/kendo-tmpl">
        <%:
            Html.Kendo().Grid<FreightInformation>()
                .Name("FreightInfo_#=CarryingCapacityID#")
                .Columns
                (
                    columns =>
                    {
                        columns.Bound(o => o.LocationName).Width(75);
                        columns.Bound(o => o.Mileage).Width(75);
                        columns.Bound(o => o.Freight).Width(75).Format("{0:¥0.00}");
                        columns.Command(command => { command.Edit(); });
                    }
                )
                .DataSource
                (
                    dataSource => dataSource.Ajax().ServerOperation(true)
                        .Model
                        (
                            model =>
                            {
                                model.Id(p => p.FreightID);
                                model.Field(p => p.LocationName).Editable(false);
                                model.Field(p => p.Mileage).Editable(false);
                            }
                        )
                        .Read("_AjaxGetFreightInfoListByCarryingCapacityID", "Configurations", new { carryingCapacityID = "#=CarryingCapacityID#" })
                        .Update("_AjaxLocationUpdateForCarryingCapacity", "Configurations")
                )
                //.Events(events => { events.SaveChanges("onSave");})
                .Editable(editing => editing.Mode(GridEditMode.InLine))
                //.ToolBar(commands => { commands.Save(); })
                .ToClientTemplate()
         %>

Behind Code:

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult _AjaxLocationUpdateForCarryingCapacity(FreightInformation updatedFreightInformation)
{
    if (ModelState.IsValid)
    {
        freightRepository.UpdateForCarryingCapacity(updatedFreightInformation);
    }
    freightRepository = new FreightRepository();
    return Json(freightRepository.GetFreightInfoByCarryingCapacityID(updatedFreightInformation.CarryingCapacityID)); //this result is null
}

But after update,
the grid is still show data.

Please see attachment file.

Kevin
Top achievements
Rank 1
 answered on 12 Jul 2017
1 answer
124 views

Hi guys I am trying to figure out how to set my center coordinates marker to a different color or a different image if that is easier. 

Scenario:

Based on the center coordinates we would like to place a marker on the map that identifies the center location. This marker should be identifiable by color. A good example of this would be the "You Are Here" on a map program like Around Me.  

It would also be ideal if there were a way to tag specific markers and change their colors. Example all the red markers are restaurants, all the blue markers are pubs, etc.

I have been working with the markerActivate function since from what I have read this is the opportunity to change marker color before rendering. However, I have not discovered a way to get a specific marker by name or coordinates. 

i.e. if (e.marker.someidentifier == 'foo') {

// change marker color code. 

}

Any help you could provide would be greatly appreciated. 

Nathan
Top achievements
Rank 1
 answered on 12 Jul 2017
2 answers
302 views

Hello,

After update to the latest kendo version imageClass for custom commands seems to be not working anymore, what is the replacement for this?

Thanks

Anton
Top achievements
Rank 1
 answered on 12 Jul 2017
3 answers
2.1K+ views

In our grid we have some columns locked. There is an edit option to edit data in columns. The editable columns have a multi-select box and when we select more than three options the hegith of the locked and unlocked columns starts mismatching.

If we remove the locked column property than there is no issue.

We are using kendo version "2015.3.1111".

Thanks

Stefan
Telerik team
 answered on 12 Jul 2017
5 answers
693 views

I want to listen Kendo ui Gantt Chart's expand event.

Main goal is loading summary rows first and when user clicked expand icon loading detail rows (Tasks).

Is there a way to find out which row is expanded and get its data (id maybe), or a lazy loading feature will be awesome?

Thanks.

Dimitar
Telerik team
 answered on 12 Jul 2017
8 answers
815 views
I'm working on Asp.net MVC3 application with KendoUI. Database is MySql.
Its a sample movie application.
This is my model:-
        public int Movie_ID { get; set; }
        public string Movie_Name { get; set; }
        public Nullable<System.DateTime> Release_Date { get; set; }
        public string Movie_Type { get; set; }
        public string Movie_Cert { get; set; }
        public string Movie_Poster { get; set; }
        public string Movie_Budget { get; set; }
        public bool Awards { get; set; }

This is the view:-
<h2>Add a Movie:-</h2>
 
 <br/>
 @using (Html.BeginForm("Create", "New_Movie",FormMethod.Post, new { id = "uploadForm", enctype = "multipart/form-data" }))
 {
    @Html.ValidationSummary(true)
    <fieldset>
 <label class="k-label">Movie Name:</label>
 <div class="k-textbox">
 @Html.TextBoxFor(m => m.Movie_Name)
 </div>

  <br/>
  <br/>
  <label class="k-label">Release Date:</label>
  @(Html.Kendo().DatePickerFor(m => m.Release_Date)

        .Name("Release_Date")

   )

  <br/>
  <br/>

 <label class="k-label">Movie Type:</label>

    @(Html.Kendo().ComboBoxFor(m => m.Movie_Type)
    .Name("Mov_Type")
    .Placeholder("Select Type...")
    .BindTo(new string[]
                {"Action",
                "Comedy",
                "Documentary",
               "Suspense Thriller"}
            )
)
<label class="k-label">Movie Budget:</label>
      @(Html.Kendo().DropDownListFor(m => m.Movie_Budget)
                    .Name("Budget")
                    .BindTo(new string[] {
                              "1 to 25 crores",
                              "26 to 50 crores",
                              "51 to 75 crores",
                              "above 76"
                          })
  )
<input type="submit" name="submit" value="Submit" />      
       
       </fieldset>
 }

Now when i submit this page to the controller create()

  [HttpPost]
        public ActionResult Create( movie_master movie_record)
        {
                 using (var insert = new moviesEntities())
                {
                    insert.movie_master.Add(movie_record);
                    insert.SaveChanges();
                }
                return RedirectToAction("Index");
        }
 the model object movie_record contains Movie_Type=null and Movie_Budget=null.
 The Kendo datapicker returns the date value selected.
What am i doing wrong ? Please help me.
Dimitar
Telerik team
 answered on 12 Jul 2017
5 answers
267 views

Hi

Is it possible to use templates in a databound panelbar?

Pseudo:

<ul kendo-panel-bar k-data-source="files.panelData.data()" k-rebind="files.panelData.data()">
    <span k-template>
        <i class="fa fa-folder-open" ng-hide="{{!dataItem.expanded}}"></i>
        <i class="fa fa-folder" ng-hide="{{dataItem.expanded}}"></i>
        {{dataItem.text}} <span ng-show="dataItem.count!= 0">({{dataItem.count}})</span>
    </span>
</ul>

(gives --> k-template without a matching parent widget found. It can be one of the following: ?^^kendoTreeMap, ?^^kendoMobileListView, ?^^kendoMobileScrollView, ?^^kendoListView, ?^^kendoTreeView )

 

 

 

 

Nencho
Telerik team
 answered on 12 Jul 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?