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

Hello,
i'm having trouble with kendo ui events handler.
When an error has been throwed from controller to the request response, the error is showed on an alert, like this:

@(Html.Kendo().Grid(Model)
      .Name("grid")
      .Events(e => e.Error("error")
//another declarations
 
function error (args){
   if (!args) return;
 
   if (args.errors) alert(args.errors)
}

The problem is when the delete request is make again, the grid makes the requisition again, and keep maintaining the request makes before, doing multiple requests.




Alexander Popov
Telerik team
 answered on 29 Jan 2014
6 answers
710 views
I'm trying to use Upload inside Grid with GridEditMode.PopUp

I have already created custom Edit Template for property:

    public class Contact
    {
        [UIHint("PhotoFileNameEditor")]
        public string PhotoFileName { get; set; }
    }
}

@(Html.Kendo().Upload()
    .Name("PhotoFileName")
    .Multiple(false)
    .Async(async => async.Save("SavePhoto", "Contact").Remove("RemovePhoto", "Contact").AutoUpload(true))
)

And Save method
  public ActionResult SavePhoto(IEnumerable<HttpPostedFileBase> PhotoFileName)
        {
            if (PhotoFileName != null)
            {
                foreach (var file in PhotoFileName)
                {
                    var fileName = Path.GetFileName(file.FileName);
                    var physicalPath = Path.Combine(Server.MapPath("~/Images/"), fileName);
                     file.SaveAs(physicalPath);
                }
            }
            return Content("");
}

It saves the file without problem, but Contact.PhotoFileName is not changed so the PopUp form is not submited at all.

How do I change the value of PhotoFileName so i can save it to database?

Thank you
amit
Top achievements
Rank 1
 answered on 28 Jan 2014
4 answers
201 views
I recently updated to the latest version and previously did some custom css to pull in white icons instead of black but that is no longer working. Is there anyway to change the filter/sort icons from black to white?
Justin
Top achievements
Rank 1
 answered on 28 Jan 2014
1 answer
205 views
http://www.kendoui.com/code-library/mvc/mvc/scheduler/custom-editor.aspx

Hi everyone,
I want to create custom editor which is given above link. However, I want to add extra fields from my tablo this custom editor. Although I add extra fields such as example codes at below;

//extra field
  public int ZTip { get; set; }

//Schedler
 @(Html.Kendo().Scheduler<ZiyaretHareketleri>()
    .Name("scheduler")
    .Date(new DateTime(2014, 1, 20))
    .StartTime(new DateTime(2014, 1, 20, 7, 00, 00))
        //.Height(600)
    .AllDaySlot(false)  
       .Editable(e =>
           {             
               e.TemplateName("CustomEditorTemplate");
           })
    .Views(views =>
    {
        views.DayView(d => d.Footer(false));
        views.WeekView(WeekView =>
        {
            WeekView.Selected(true);
            WeekView.Footer(false);
        });
        views.MonthView();
        views.AgendaView();
    })
    .Timezone("Etc/UTC")
    .Group(group => group.Resources("Attendees").Orientation(SchedulerGroupOrientation.Vertical))
             .Resources(resource => resource.Add(m => m.OwnerID)
                                            .Title("Kullanıcılar")
                                            .Name("Attendees")
                                            .DataTextField("Name")
                                            .DataValueField("UserId")
                                            .DataColorField("Colour")
                                            .DataSource(ds => ds.Read("GetKullanici", "Home"))
                                          
                                            )
    .DataSource(d => d
        .Model(m =>
        {
            m.Id(f => f.TaskID);
            m.Field(f => f.Title).DefaultValue("Yeni Ziyaret");
            m.Field(f => f.OwnerID).DefaultValue(1);
            m.Field(f => f.Start);
            m.Field(f => f.End);
            m.Field(f => f.Description);
            m.Field(f => f.IsAllDay);
            m.Field(f=>f.ZTip); // Extra Field
            
        })
        .ServerOperation(true)
       .Read(read => read.Action("Read", "Home").Data("filterData"))
        .Create("Create", "Home")
        .Destroy("Destroy", "Home")
        .Update("Update", "Home")

    )
      )

//Custom Editor
<div data-container-for="ZTip" class="k-edit-field">
    @(Html.TextBoxFor(model => model.ZTip, new { @class = "k-textbox", data_bind = "value:ZTip" }))
</div>

always I have been getting zero value from input. 



Daniel
Telerik team
 answered on 28 Jan 2014
0 answers
165 views
Hello there

I am trying to make work an online demo. I have a problem with unrecognized namespace

using kendo.mvc.examples.models

and 

productservice

as attached this thread.  Please help me what procedure should I follow...
TURKALP
Top achievements
Rank 1
 asked on 28 Jan 2014
1 answer
59 views
Hi,

Kendo MVC Grid is not binding the data initially. But when i do sorting on column, it loads data after sorting.


Can you tell me what may teh cause for this?
Atanas Korchev
Telerik team
 answered on 27 Jan 2014
1 answer
130 views
on each one of my Grids I employ the following behavior.  What is the best way to create a variable/array/object? that I can then just reuse on each grid so that I can change these common settings in a single spot.  There are a few grids in our application that do not use these settings so I do not want to change the default behavior of all grids.

.HtmlAttributes(new { @class = "cursorLink"})
.Pageable(p =>
     {
          p.Input(true).Numeric(false);
          p.PageSizes(new int[] { 25, 50, 100, 200, 500 });
     })
.Filterable()
..ColumnMenu()
Dimo
Telerik team
 answered on 27 Jan 2014
3 answers
181 views
Hello Kendo-Team,

I have the following bug with multiple Inline Editing Grids using Internet Explorer 8. The bug only occurs in native IE8. It does not occur if you simulate (via the IE Developers Toolbars) IE8 behavior in IE versions > 8. So to reproduce this bug, you need IE 8.

I think the problem is a timing problem. If you edit a cell in the first grid, and then click into a cell of the second grid (or create a new row in the second grid), the EditorTemplate for the second grid cell is not completly initialized and the binding does not work. See screenshot  #1 (IE8_MultipleGrids_Bug.png).

If you first leave the edit mode of the first grid (for example, by clicking outside the grid)  and then click into the cell of the second grid then it works without any errors. See screenshot  #2 (IE8_MultipleGrids_Working.png)

So I assume, the problem is, that the first grid is still in editing mode, when the second grid switches to editing mode. You can notice that wrong behavior only in IE 8.

One funny (or weird) thing I noticed while testing, if you have multiple grids, and you click from the most bottom grid in one of the top grids it works, but it does not work if you click from the top grid to grids below...

Can you please help me on that bug. It is a very critical bug for our clients. Any ideas or workarounds?

Thanks.

BigzampanoXXl
Top achievements
Rank 1
 answered on 26 Jan 2014
6 answers
132 views
Greetings.

The following worked in the previous release:
$('#update-downloads-chart').on('click', function (e) {
    e.preventDefault();
 
    $('#downloads-chart').data().kendoChart.dataSource.read(
        {
            minDate: $('#downloads-date-start').val(),
            maxDate: $('#downloads-date-end').val()
        });
});
with these helpers:
<div class="widget">
    <div class="widget-title">
        <h5><i class="fa fa-bar-chart-o fa-fw"></i> Downloads by Category</h5>
    </div>
    <div class="widget-content debug">
        @(Html.Kendo().Chart<Models.ChartDataItem>()
        .Name("downloads-chart")
        .HtmlAttributes(new { @class = "pie" })
        .Theme("bootstrap")
        .DataSource(ds => ds.Read(read => read.Action("getdownloadsbycategory", "admin")))
        .Legend(true)
        .Series(series => series
            .Donut("DataValue", "DataText")
            .Overlay(ChartPieSeriesOverlay.None)
            .Labels(labels => labels
                .Visible(true)
                .Align(ChartPieLabelsAlign.Circle)
                .Position(ChartPieLabelsPosition.Center)
                .Color("#fff"))
            .StartAngle(0)
            .Name("Download Type"))
        .Tooltip(tooltip => tooltip
            .Visible(true)
            .Template("#= dataItem.DataText # - #= dataItem.DataValue #"))
        )
    </div>
    <div class="widget-controls">
        <div class="date-label">
            Date range:
            @(Html.Kendo().DatePicker()
                  .Name("downloads-date-start")
                  .Value(today.AddDays(-6).ToShortDateString())
                  .HtmlAttributes(new { @class = "datepicker" })
            )
            to
            @(Html.Kendo().DatePicker()
                  .Name("downloads-date-end")
                  .Value(today.ToShortDateString())
                  .HtmlAttributes(new { @class = "datepicker" })
            )
            <button type="button" class="btn btn-small" id="update-downloads-chart">Update</button>
        </div>
    </div>
</div>
When updating the current release, the controller action is still being called, but it is not being passed the correct parameters. All I see in the console is
sort=&group=&filter=
I'm obviously not providing those values, nor did I have to before. Has the underlying dataSource object changed, and if so, what do I need to do to make this work?

UPDATE: Just to verify, I rolled the project back to the 2013.3.1119 version, and the code shown above works as expected, so I'd like to know why the updated package behaves differently. I still see the sort, group, and filter parameters, but my custom parameters are included (and are honestly all I care about).
Jan Olsmar
Top achievements
Rank 1
 answered on 25 Jan 2014
0 answers
323 views
Hi,
I think I have run into this problem and have been unable to find an answer:
http://www.telerik.com/community/forums/aspnet-mvc/tabstrip/tabstrip-in-grid-popup-window-and-passing-parameter-from-model.aspx

I have a custom partial view for the edit popup, within this partial view I have another which is dynamic based on a grid row value. E.g.

Grid:
.Editable(editable => editable
        .Mode(GridEditMode.PopUp)
        .TemplateName("AddEditPartial")
 )

AddEditPartial:
@* Drop Down *@
        <div id="dropdown">
            <div class="editor-label">
                @Html.Label("Dropdown")
            </div>
            <div class="editor-field">
                @Html.Partial("EditorTemplates/DropdownEditor", Model.ID)
                 // I can see this model value in the grid column
                 // but it passes in an empty Guid to the partial
            </div>
        </div>

Strangely if I do something like:
@Html.TextAreaFor(model => model.ID) // It shows the correct guid in the text area
but
@Html.DisplayFor(model => model.ID) // shows an empty guid 

DropdownEditor:
@model Guid <- is an empty guid so the read action fails
@using Kendo.Mvc.UI
@(Html.Kendo().DropDownList()
    .Name("DropDown") 
    .DataTextField("Text")
    .DataValueField("Value")
    .DataSource(source =>
    {
        source.Read(read =>
        {
            read.Action("Action", "Controller", new { ID= Model }); 
        });
    })
    .OptionLabel("Please Select")
    .SelectedIndex(0)
)

Any ideas? 

Thanks
Elliott
Top achievements
Rank 1
 asked on 24 Jan 2014
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
ComboBox
Upload
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
Dialog
MultiColumnComboBox
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
Security
ColorPicker
DateRangePicker
Wizard
Styling
Chat
DateInput
MediaPlayer
TileLayout
Drawer
SplitView
Template
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Licensing
Rating
ScrollView
ButtonGroup
CheckBoxGroup
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?