Telerik Forums
UI for ASP.NET MVC Forum
1 answer
81 views

I want to use the date category axis which should only show years:

@(Html.Kendo().Chart().Name("CompetenceEvolution")

.SeriesDefaults(sd => sd.Line().Style(ChartLineStyle.Smooth))
.Series(series =>
{
foreach (var data in Model.EvolutionChartData)
{
series.Line(data.Items).Field("Score").CategoryField("AssessmentDate").Name(data.Name);
}
})

.CategoryAxis(axis => axis.Date().BaseUnit(ChartAxisBaseUnit.Years))

...

but I would like that for plotting the points the real date is used (now the point is placed above the category label), but is should be placed according to the date. Because now, when having two different items in the same year (with a different date), only one item is getting plotted to the chart.
           

Iliana Dyankova
Telerik team
 answered on 21 Aug 2015
0 answers
139 views

Ok my requirement is simple and I am just getting lost in the various partial examples and forum posts on how to do this. What is surprising is I would expect this to be so standard there would hundreds of examples out there but I cannot find one.

 

I have a basic person model with properties to include a birthdate.  All of those properties are on a grid in a MVC 5 Razor view.  The grid is setup and works fine.  What I would like to do is keep the existing filter capability on the birthdate field but add four additional filters that signify age groupings, so one for under 11 years old, one for between 11 and 14, and one for between 14 and 18, and one for over 18.

 

Then of course since this is not a field in the actual database, I would need to do "custom server binding" as all the partial examples somewhat show. I have played with the datasourcerequest object in the past and I have no need to implement a fill blown custom binding scenario. Is it possible to just intercept these four requests, pull them out of the IFilterDescriptors, apply them manually, and then pass the remaining request object to the ToDataSourceResult method?

If so I have not seen this either. If someone could please guide me to the right area on this I would appreciate it. To sum up:

1. How do you add custom filters to the grid menu on a column but keep the default ones there?

2. Can you intercept these filters and pull them out of the filter descriptor collection?

3. How would you identify these custom filters to pull them out?

Andrew
Top achievements
Rank 1
 asked on 21 Aug 2015
2 answers
192 views
I have Two relational KendoGrids on same MVC View. I need to apply CRUD operations for both the grids. Please suggest me the best approach to do Insert/Update/Delete operations for both the grids altogether.
Mahendra
Top achievements
Rank 1
 answered on 20 Aug 2015
2 answers
744 views

I have a kendogrid:

 @(Html.Kendo().Grid<OAIWebInterface.Models.Leadership>()
                            .Name("LeadershipGrid")
                            .Columns(columns =>
                            {
                                columns.Bound(c => c.LeadershipID).Width(150);
                                columns.Bound(c => c.Organization).Width(150);
                                columns.Command(command => { command.Edit(); }).Width(95);
                            })
                            .Editable(editable => editable.Mode(GridEditMode.PopUp).TemplateName("LeadershipEditorTemplate"))
                            .HtmlAttributes(new { style = "max-height: 350px;" })
                            .DataSource(dataSource => dataSource
                                .Ajax()
                                .Model(model => model.Id(p => p.LeadershipID))
                                .Read(read => read.Action("Leadership_Read", "AnnualSummary", new { ASId = Model.AnnualSummaryID}))
                                .Update(update => update.Action("LeadershipPopup_Update", "AnnualSummary"))
                            )
                        )​

 

I have a Editor Template called "LeadershipEditorTemplate" in which I got the following code:

    @Html.RadioButtonFor(x => x.Reimburse, true)Yes
      @Html.RadioButtonFor(x => x.Reimburse, false)No

 

On edit kendo row, one of the radio buttons in the editor template do not get checked. For example, Yes should be checked when the Reimburse value is true/1 and No should be checked when the value is set to false/0.

 I verified that Reimbuse has a value when in template, but can't make it work with radio buttons.

 I would appreciate any input on this issue.

Thanks.

 

Sindhura
Top achievements
Rank 1
 answered on 20 Aug 2015
1 answer
272 views

Hello 
I have question how to refresh control after edit?

I tried:

  • return all data after upadte but this doesn't work
public JsonResult Update([DataSourceRequest] DataSourceRequest request, ProductCategoryViewModel category)
       {
           if (ModelState.IsValid)
           {
               var services = new ProductCategoryServices(db);
               services.Update(category, ModelState);
           }
 
           var result = db.ProductCategories.ToTreeDataSourceResult(request,
                               cat => cat.ProductCategoryId
                               , cat => cat.FKParentProductCategoryId
                               , cat => cat.ToProductCategoryViewModel(request)
               );
 
           return Json(category, JsonRequestBehavior.AllowGet);
          // return Json(new[] { category }.ToTreeDataSourceResult(request, ModelState));
       }
  • - also add some events like:
    - requestEnd it is call only once
    - complete added to update action in trasport but this work also only once and only if inside is alert function
  • event onSave on TreeList also doesn't work

PS. Stupid question but where is edit post option? :)

Genady Sergeev
Telerik team
 answered on 20 Aug 2015
1 answer
343 views

Hi Team,

 I am using kendo UI editor and image browser in MVC View in form of HTML. I have to upload an image. I have created one action method and bound to the upload function of image browser. When i upload, image gets saved to the location and after that an automatic thumbnail call goes to app which has a url and pass the path parameter which is the file name. In case of new file upload it pass the path value to undefined. In upload action i am returning json response in form of:

 var json = new    {              name = Path.GetFileName(file.FileName),

                    type = "f",

                    size = file.ContentLength
                };
                return Json(json, "text/plain");

 

Thumbnail action method is the default action method of  EditorImageBrowserController class which i am using.

Please let me know if i am missing anything or do i need to override thumbnail action. If yes please provide me example.

Thanks.

Dimo
Telerik team
 answered on 20 Aug 2015
2 answers
179 views

Has anyone got any advice on the best way to get Lat and Long from a postcode?

 It needs to be embedded into a commercial application so I understand we may have to pay for a license from Google, Bing , etc.

 Anyone doing this?

Mark
Top achievements
Rank 1
 answered on 20 Aug 2015
3 answers
175 views

Hi,

Is it possible, that dataSource.sync(); causes a double postback if using a slow connection ?

It looks like that the client postback twice if the server doesn't reply within e.g. 15 seconds.

The code:

var dataSource = $("#" + gridname).data("kendoGrid").dataSource;
dataSource.sync();
Is it something you have seen before - if not, then I guess I'll have to find it somewhere else in my code :-)

Are there any good ways to prevent double postbacks using the kendo framework?

Thanks.

 

Kiril Nikolov
Telerik team
 answered on 20 Aug 2015
3 answers
144 views

Hi,

I am trying to use the @Html.Kendo().Grid(Model) to generate a row template, but it doesn't do what I want... The code I have so far is:

 

@(Html.Kendo().Grid(todayFocus)
    .Name("TodaysFocus")
    .Columns(columns =>
    {
        columns.Template(c => { }).ClientTemplate(" ").Title("Today's Focus");
        columns.Template(c => { }).ClientTemplate(" ").Title("Mid Day");
        columns.Template(c => { }).ClientTemplate(" ").Title("End Dday");
        columns.Template(c => { }).ClientTemplate(" ").Title("Plan");
        columns.Template(c => { }).ClientTemplate(" ").Title("Target");
    })
      .RowTemplate(grid => @<text>
                                <td>@item.TaskName</td>
                                <td>@item.MidDay</td>
                                <td>@item.EndDay</td>
                                <td>@item.Plan</td>
                                <td>@item.Target</td>
                            </text>)
)

 And what I am getting for each row is:

<tr>
    <td colspan="5"> /<td>
    <td>Task Name</td>
    <td>10</td>
    <td>20</td>
    <td>30</td>
    <td>40</td>
</tr>

Why am I getting the extra <td colspan="5"> and how do I get rid of it?

Thanks

Dimiter Madjarov
Telerik team
 answered on 20 Aug 2015
1 answer
97 views

Hi,

 I'm using a user-defined template for grid, it looks fine in Chrome, but a red frame appears around the text box.

How to solve it?

 

Thanks.

Iliana Dyankova
Telerik team
 answered on 19 Aug 2015
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
Upload
ComboBox
MultiSelect
ListView
Window
TabStrip
Menu
Installer and VS Extensions
Spreadsheet
AutoComplete
TreeList
Gantt
PanelBar
NumericTextBox
Filter
ToolTip
Map
Diagram
Button
PivotGrid
Form
ListBox
Splitter
Application
FileManager
Sortable
Calendar
View
MaskedTextBox
PDFViewer
TextBox
Toolbar
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
ListView (Mobile)
Pager
Accessibility
ColorPicker
DateRangePicker
Wizard
Security
Styling
Chat
MediaPlayer
TileLayout
DateInput
Drawer
SplitView
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Template
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Rating
ScrollView
ButtonGroup
CheckBoxGroup
Licensing
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
DateTimePicker
AppBar
BottomNavigation
Card
FloatingActionButton
Localization
MultiViewCalendar
PopOver (Mobile)
Ripple
ScrollView (Mobile)
Switch (Mobile)
PivotGridV2
FlatColorPicker
ColorPalette
DropDownButton
AIPrompt
PropertyGrid
ActionSheet (Mobile)
BulletGraph
Button (Mobile)
Collapsible
Loader
CircularGauge
SkeletonContainer
Popover
HeatMap
Avatar
ColorGradient
CircularProgressBar
SplitButton
StackLayout
TimeDurationPicker
Chip
ChipList
DockManager
ToggleButton
Sankey
OTPInput
ChartWizard
SpeechToTextButton
InlineAIPrompt
TimePicker
StockChart
RadialGauge
ContextMenu
ArcGauge
AICodingAssistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?