Telerik Forums
UI for ASP.NET MVC Forum
5 answers
1.4K+ views

I changed data in the Processing Order column (and it shows the red triangle in upper left corner of the cell) and clicked the 'Save Changes' button but the controller doesn't get hit.  I've checked the controller name and method to make sure it matches.  Everything seems right.  I tried copying the .update statement from another working page in the same controller and it doesn't reach the controller/action method either.

The F12 console doesn't show errors.

VIEW

=======================================

@(Html.Kendo().Grid<Verdant.ViewModels.Manage.View_Remit_Config_Contract_PayeeVM>()
        .Name("grid")
        .Columns(columns =>
        {
            columns.Bound(o => o.EntityName).Width(70);
            columns.Bound(o => o.ProcessingOrder).Width(30);
            columns.Command(command => command.Destroy()).Width(15);
        })
        .ToolBar(toolbar =>
        {
            toolbar.Save();
            toolbar.Custom().Text("Add Payee").Action("RemitConfigurationPayeeAdd", "Manage", new { remitItemID = @Html.Raw(Model.RemitItemID) });
        })
        .Editable(editable => editable.Mode(GridEditMode.InCell))
        .DataSource(dataSource => dataSource
        .Ajax()
        .Batch(true)
        .Model(model =>
        {
            model.Id(e => e.RemitItemID);
            model.Field(e => e.RemitItemID).Editable(false);
            model.Field(e => e.EntityName).Editable(false);
            model.Field(e => e.ProcessingOrder).Editable(true);
        })
        .Read(read => read.Action("RemitConfigurationContract_Payee", "Manage", new { remitItemID = @Html.Raw(Model.RemitItemID) }))
        .Update(update => update.Action("RemitConfigurationPayee_Update", "Manage"))
        .Destroy(destroy => destroy.Action("RemitConfigurationPayee_Delete", "Manage"))
        .PageSize(20)
        .ServerOperation(false)
        .Events(events => events.Error("error_handler"))
        )
)

CONTROLLER

===============

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult RemitConfigurationPayee_Update([DataSourceRequest] DataSourceRequest request, [Bind(Prefix = "models")]IEnumerable<View_Remit_Config_Contract_PayeeVM> payees)
        {
            if (payees != null && ModelState.IsValid)
            {
                foreach (var p in payees)
                {
                    ManageFunctions.RemitConfigurationPayee_Update(p);
                }
            }

            return Json(payees.ToDataSourceResult(request, ModelState));
        }

 

Tsvetomir
Telerik team
 answered on 28 Jan 2019
1 answer
289 views

So lets say I have a set of entities

          ObjectModel1 - Id, Name, List<ObjectModel2> Children

          ObjectModel2 - Id, Name, Note, DateModified, ModifiedBy

So now my dataset might return

          ObjectModel1 om1a

                    ObjectModel2 om2a

                    ObjectModel2 om2b

          ObjectModel1 om1b
                    ObjectModel2 om2c
                    ObjectModel2 om2d

This would come down as a List<ObjectModel1> object with the ObjectModel1 objects in the list having the ObjectModel2 objects as children.

I would like to display this so that each of the ObjectModel1 objects are displayed as separate trees with all of the data from each ObjectModel2 object being displayed when the ObjectModel1 trees are expanded.

So, first of all, is this possible with the Kendo treeview, and if not, what would we use?  Second, even if it is possible, is there a better UI component to do the above?   

Ivan Danchev
Telerik team
 answered on 25 Jan 2019
1 answer
107 views

Hi,

I keep on runing into the fact that, when using the upgrade wizard in a project, all of my unused culture and messages files and theses that I so carefully removed, were being put back into place. Since my project is tied to a remote TFS server and the wizared talks to the server for each tiny file, the upgrade itself takes about 6 hours (!!!). I decided to use the wizared again since it was a long time ago I did an update and did not have the manual steps ready in my mind.

What I need to do to remove the files without severe delays (removing a file causes the same delay because of the chatter to TFS) is to manually go into the .csproj file to remove the entries. I don't recall if I have to manually have to go into TFS to do  This is very cumbersome and not a smooth experience.

I would like to request for improvement/enhancement in this and ask for an option to only update files that are actually in use/present in the solution.

Anyone else experiencing this and what are your thoughts and solutions? Would you also like to get the wizard improved at this point?

Thanks, Coen.

Vesko
Telerik team
 answered on 25 Jan 2019
1 answer
630 views

Hi,

I'm working for first time with telerik and there are things I can't achieve.

I'm working in a site with a lateral menu. When I click in an option I load data in the main screen. In this screen sometimes i have dialogs (I'm loading them correctly and they are doing what they does). When I've opened one of this dialogs I can click on the lateral menu. I would like know how to prevent the background clicks.

Thanks in advance.

Best regards.

Eyup
Telerik team
 answered on 23 Jan 2019
3 answers
712 views

Hi

Is it possible to disable the operators button for all cells (in row filter mode) without having to apply it to every column.

At the moment I have the code below but ideally just want this applied at a more global level

    columns.Bound(c => c.JobTitle).Width(400).Filterable(f => f.Cell(cell => cell.ShowOperators(false)));

Thanks

Andy

Georgi
Telerik team
 answered on 23 Jan 2019
3 answers
899 views
I'm working with a grid in asp.net mvc, where I have a model containing several properties. One of its properties (Id) is a Guid. Whenever I try to create a new row in my grid, entering all details (Id is automatically generated by a backend server when saved) and press "Update", I get an error saying "The Id field is required". Is there a way to get around this?
I suspect the Guid-type to be the one causing trouble here.
Here's my grid:
@(Html.Kendo().Grid<ToolModel>()
      .Name("grid")
      .Columns(columns =>
      {
          columns.Bound(p => p.Displace);
          columns.Bound(p => p.FishingNectOd);
          columns.Bound(p => p.Length);
          columns.Bound(p => p.Model);
          columns.Bound(p => p.Name);
          columns.Bound(p => p.Supplier).Width(150);
          columns.Bound(p => p.TagId);
          columns.Bound(p => p.ToolOd);
          columns.Bound(p => p.Type);
          columns.Bound(p => p.Weight);
          columns.Command(command => { command.Edit(); command.Destroy(); }).Width(180);
      })
      .ToolBar(toolbar => toolbar.Create())
      .Editable(editable => editable.Mode(GridEditMode.PopUp).TemplateName("ToolPopUpTemplate"))
      .Pageable()
      .Sortable()
      .Scrollable()
      .HtmlAttributes(new { style = "height:500px;" })
      .DataSource(dataSource => dataSource
          .Ajax()
          .PageSize(10)
          .Events(events => events.Error("error_handler"))
          .Model(model => model.Id(toolModel => toolModel.Weight))
          .Create(update => update.Action("EditingPopup_Create", "ToolManagement"))
          .Read(read => read.Action("EditingPopup_Read", "ToolManagement"))
          .Update(update => update.Action("EditingPopup_Update", "ToolManagement"))
          .Destroy(destroy => destroy.Action("EditingPopup_Destroy", "ToolManagement"))
      ))
Template:
@using Services.Models.Tool
@model ToolModel
 
<div class="editor-label">
    @(Html.LabelFor(model => model.Displace))
</div>
<div class="editor-field">
    @(Html.TextBoxFor(model => model.Displace))
</div>
<div class="editor-label">
    @(Html.LabelFor(model => model.FishingNectOd))
</div>
<div class="editor-field">
    @(Html.TextBoxFor(model => model.FishingNectOd))
</div>
<div class="editor-label">
    @(Html.LabelFor(model => model.Length))
</div>
<div class="editor-field">
    @(Html.TextBoxFor(model => model.Length))
</div>
<div class="editor-label">
    @(Html.LabelFor(model => model.Model))
</div>
<div class="editor-field">
    @(Html.TextBoxFor(model => model.Model))
</div>
<div class="editor-label">
    @(Html.LabelFor(model => model.Name))
</div>
<div class="editor-field">
    @(Html.TextBoxFor(model => model.Name))
</div>
<div class="editor-label">
    @(Html.LabelFor(model => model.Supplier))
</div>
<div class="editor-field">
    @(Html.TextBoxFor(model => model.Supplier))
</div>
<div class="editor-label">
    @(Html.LabelFor(model => model.TagId))
</div>
<div class="editor-field">
    @(Html.TextBoxFor(model => model.TagId))
</div>
<div class="editor-label">
    @(Html.LabelFor(model => model.ToolOd))
</div>
<div class="editor-field">
    @(Html.TextBoxFor(model => model.ToolOd))
</div>
<div class="editor-label">
    @(Html.LabelFor(model => model.Type))
</div>
<div class="editor-field">
    @(Html.TextBoxFor(model => model.Type))
</div>
<div class="editor-label">
    @(Html.LabelFor(model => model.Weight))
</div>
<div class="editor-field">
    @(Html.TextBoxFor(model => model.Weight))
</div>

Controller:
public class ToolManagementController : Controller
{
    private static readonly ILog Log = LogManager.GetLogger("ToolManagementController.class");
    public ToolServiceClient ToolService { get; set; }
 
    public ToolManagementController()
    {
        try
        {
            ToolService = new ToolServiceClient();
        }
        catch (Exception e)
        {
            Log.Error(e);
        }
    }
 
    // GET: ToolManagement
    public ActionResult Tools()
    {
        return View();
    }
 
    public ActionResult EditingPopup_Read([DataSourceRequest] DataSourceRequest request)
    {
        ToolContract[] list = ToolService.GetTools();
        return Json(list.ToDataSourceResult(request));
    }
 
    [AcceptVerbs(HttpVerbs.Post)]
    public ActionResult EditingPopup_Create([DataSourceRequest] DataSourceRequest request, ToolModel tool)
    {
        if (tool != null && ModelState.IsValid)
        {
            ToolService.CreateTool(new ToolContract
            {
                Displace = tool.Displace,
                FishingNectOD = tool.FishingNectOd,
                Length = tool.Length,
                Model = tool.Model,
                Name = tool.Name,
                Supplier = tool.Supplier,
                TagId = tool.TagId,
                ToolOD = tool.ToolOd,
                Type = tool.Type,
                Weight = tool.Weight
 
            });
        }
 
        return Json(new[] { tool }.ToDataSourceResult(request, ModelState));
    }
 
    [AcceptVerbs(HttpVerbs.Post)]
    public ActionResult EditingPopup_Update([DataSourceRequest] DataSourceRequest request, ToolModel tool)
    {
        if (tool != null && ModelState.IsValid)
        {
            ToolService.UpdateTool(new ToolContract
            {
                Displace = tool.Displace,
                FishingNectOD = tool.FishingNectOd,
                Length = tool.Length,
                Model = tool.Model,
                Name = tool.Name,
                Supplier = tool.Supplier,
                TagId = tool.TagId,
                ToolOD = tool.ToolOd,
                Type = tool.Type,
                Weight = tool.Weight,
                Id = tool.Id
            });
        }
 
        return Json(new[] { tool }.ToDataSourceResult(request, ModelState));
    }
 
    [AcceptVerbs(HttpVerbs.Post)]
    public ActionResult EditingPopup_Destroy([DataSourceRequest] DataSourceRequest request, ToolModel tool)
    {
        if (tool != null)
        {
            ToolService.DeleteTool(tool.Id);
        }
 
        return Json(new[] { tool }.ToDataSourceResult(request, ModelState));
    }
 
}

Finally, the model:
public ToolModel(ToolContract toolContract)
{
    ToolContract = toolContract;
}
 
public ToolModel()
{
}
 
private ToolContract ToolContract
{
    get { return _toolContract ?? (_toolContract = new ToolContract()); }
    set { _toolContract = value; }
}
 
 
public double? Displace
{
    get { return ToolContract.Displace; }
    set { ToolContract.Displace = value; }
}
 
 
public double? FishingNectOd
{
    get { return ToolContract.FishingNectOD; }
    set { ToolContract.FishingNectOD = value; }
}
 
[ScaffoldColumn(false)]
public Guid Id
{
    get { return ToolContract.Id; }
    set { ToolContract.Id = value; }
}
 
public double? Length
{
    get { return ToolContract.Length; }
    set { ToolContract.Length = value; }
}
 
public string Model
{
    get { return ToolContract.Model; }
    set { ToolContract.Model = value; }
}
 
public string Name
{
    get { return ToolContract.Name; }
    set { ToolContract.Name = value; }
}
 
public string Supplier
{
    get { return ToolContract.Supplier; }
    set { ToolContract.Supplier = value; }
}
 
public string TagId
{
    get { return ToolContract.TagId; }
    set { ToolContract.Supplier = value; }
}
 
[Display(Name = "Outer Diameter")]
public double? ToolOd
{
    get { return ToolContract.ToolOD; }
    set { ToolContract.ToolOD = value; }
}
 
public string Type
{
    get { return ToolContract.Type; }
    set { ToolContract.Type = value; }
}
 
public double? Weight
{
    get { return ToolContract.Weight; }
    set { ToolContract.Weight = value; }
}
}
Viktor Tachev
Telerik team
 answered on 23 Jan 2019
1 answer
172 views
Is there any way to add a template to a MenuButton? 
Eyup
Telerik team
 answered on 23 Jan 2019
1 answer
174 views

     Is it possible to make the PDF work in a way so every time a certain field changes, it starts on new page? For example if the field I want to determine this is "CarMakes" and when its value changes from BMW to Ferrari, Ferrari starts on a new page in the PDF document?

Viktor Tachev
Telerik team
 answered on 23 Jan 2019
6 answers
436 views

 Hello,

is it possible when using the built-in PDF export functionality to make it list each grouped section (created via Ajax().Group()) onto its own page?

I'm required to create two types of reports. One that exports all items combined into a single report and a second one that exports based on grouping of a specific column. I have the grid grouped correctly but when exporting, I need each group on it's own page rather than displayed all in one grid.

Is there built-in functionality for this or a known work-around?

Thank you.

Tsvetina
Telerik team
 answered on 22 Jan 2019
2 answers
149 views

Hi,

I have a Word document I use as template, the document contains multiple sections, page breaks and column breaks. When the PDF is exported, I got every section in a new page and all pages with multiple columns render as one column.

Am I missing some setting in the export?

Thanks for the help!

Eliel
Top achievements
Rank 1
 answered on 21 Jan 2019
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
DropDownButton
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
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
LLM Kit
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?