Telerik Forums
UI for ASP.NET MVC Forum
3 answers
1.1K+ views

Hi,

How can I achieve calling a custom javascript post call (jQuery) when a user enters the Enter key ? (actually independent of which field has the focus at that moment).
Just like with a classic button submit button, but instead calling a custom js function.

Martin

Neli
Telerik team
 answered on 22 Apr 2021
1 answer
537 views

Hi,

I get a error message 'The field StartDate must be a date.' when I try to set the DatePicker dateformat, like this:

It seems something goes wrong by validating the date value, because of the format.

My code snippet:

   items.Add()
                            .Field(propInfo.Name)
                            .Label(propInfo.Label)
                            .Editor(e =>
                            {
                                e.DatePicker().Format("dd-MM-yyyy");
                            });

How can I solve this easily, on the server side (preferably not jQuery / javascript fix).

Martin
Telerik team
 answered on 21 Apr 2021
1 answer
113 views

     Is there a way to detect when multiple files were uploaded(via upload dialog or drag/drop) vs when a single file is uploaded?  We are trying to run different logic on the files depending on if it was multiple files or a single file that was uploaded.

 

Thanks,

-Carlos

Martin
Telerik team
 answered on 21 Apr 2021
4 answers
494 views

Hi,

Im am working on a grid with some Integer data columns in it (like customer Id), including filtering in the top row of the grid (thus with.Filterable(ftb => ftb.Mode(GridFilterMode.Row)); )
By default, I see decimals in the filter textbox, like 16.00.

How can I remove those decimals (just plain int) ? So that I see just 16 instead of 16.00.

I tried a lot. Like setting format to "#", "N0", "n0", "0:N0", "0:n0", etc. Also a suggestion about a javascript function coupled. But nothing seems to work.

My code is now something like this:

columns.Bound(colInfo.Name)
                        .Title(colInfo.Title)
                        .Width(colInfo.PixelWidth)
                        .Format(colInfo.DataFormat)
                        ;

 

best regards,

Martin

 

Eyup
Telerik team
 answered on 21 Apr 2021
5 answers
966 views

Hi,

How can I get a vertical scrollbar in the Form component ?
I mean, the form area excl. the buttons.
I'd prefer to achieve this without having to add a css style on the page, but instead achieve this with a simple piece of (serverside) code.

In html/css I can see the following structure

  - html form
    - div formlayout
      - fieldset
      - fieldset

I would like to have a vertical scrollbar on the div formlayout I guess. Buttons shouldnt scroll, but stay visible.
In my scenario I have only 1 column of fields, but should work for any amount of columns in layout.

 

Martin

 

Stoyan
Telerik team
 answered on 21 Apr 2021
1 answer
135 views

Hi

I'm searching example to save data from Kendo grid in mode batch and Edit in GridEditMode.InCell

I need call a Controler MVC send data grid with other data for example textarea without grid and other information.

I only find examples save with grid events.

Thanks

Rose

Tsvetomir
Telerik team
 answered on 21 Apr 2021
1 answer
142 views

Hi.

I need display content in a ClientTemplate with contain two DropDownList and one input.

columns.Bound(m => m.ComposicioMix).ClientTemplate("#= prueba(ComposicioMix)#").EditorTemplateName("ComposicioMix").Width(300).Title("Composició/Mix");

In EditorTemplateName i've build the next Template ComposicioMix and this model

public class ComposicioMix_VM
    {
        //datos de 2 desplegables y numerico del porcentaje
        public PaisosListItem PaisMix { get; set; }
        public AgenteListItem AgenteMix { get; set; }
        public int Porcentaje { get; set; }
    }
    public class PaisosListItem
    {
        public int OBJECTID { get; set; }
        
        public string Nom { get; set; }
    }
    public class AgenteListItem
    {
        public int OBJECTID { get; set; }

        public string DESCRIPCIO { get; set; }
    }

@model DGMAS.Data.ViewModels.FluxosREN.ComposicioMix_VM
<table>
    <tr>
        <td>
            <label>Pais/Agent</label>
        </td>
        <td>
            @(Html.Kendo().DropDownListFor(m => m.PaisMix.OBJECTID)
                                     .Name("PAIS1")
                                     .DataValueField("OBJECTID")
                                     .DataTextField("Nom")
                                     .BindTo((System.Collections.IEnumerable)ViewData["PAIS"])
            )
        </td>
        <td>
            @(Html.Kendo().DropDownListFor(m => m.AgenteMix.OBJECTID)
                                     .Name("AGENTE1")
                                     .DataValueField("OBJECTID")
                                     .DataTextField("DESCRIPCIO")
                                     .BindTo((System.Collections.IEnumerable)ViewData["AGENTE"])
            )
        </td>
        <td>
            <input id="porcentaje1" type="text" size="2" />
            <span>%</span>
        </td>
    </tr>
    <tr></tr>
</table>

I have a problem with ClientTemplate I can't display it

<script id="responsive-column-template-ComposicioMix" type="text/x-kendo-template">
    <div class="responsiveGridCssAnchor">
        <div class="titleRowMobile">Pais/Agent</div>
        <p class="col-template-val textMobileCell">#= data.PaisMix.Nom #</p>
        <p class="col-template-val textMobileCell">#= data.AgenteMix.DESCRIPCIO #</p>
        <p class="col-template-val textMobileCell">#= data.Porcentaje #</p>
    </div>
</script>

var prueba = kendo.template($("#responsive-column-template-ComposicioMix").html());

I need help to get contain to display in kendo-template

Regards,
Rose

Tsvetomir
Telerik team
 answered on 21 Apr 2021
1 answer
259 views

Hi,

How can I get a textbox in the form fields with 0 decimals ?

There are always 2 decimals now.

Is teher a simple way to do it ? Preferably serverside.

 

Martin

 

Martin
Telerik team
 answered on 20 Apr 2021
2 answers
93 views

I was able to make the dropdownlist work in a plain asp.net mvc project. But when I attached the same code in Sharepoint Provider-Hosted Add-in, it only displays as a blank text box. Do I need to add anything? I attached the plain asp.net mvc project and screenshots.

 

Thanks!

Ivan Danchev
Telerik team
 answered on 20 Apr 2021
1 answer
417 views

    When one file is dragged and dropped onto the control the Upload endpoint is called twice.

My control is declared as follows:

@(Html.Kendo().FileManager().Name("documentExplorer")
    .DataSource(ds =>
    {
        ds.Read(operation => operation
        .Type(HttpVerbs.Post)
        .Action("Read", "DocumentExplorer", new { groupId = ViewBag.GroupId }));
        ds.Destroy(operation => operation
            .Type(HttpVerbs.Post)
            .Action("Delete", "DocumentExplorer", new { groupId = ViewBag.GroupId }));
        ds.Create(operation => operation
            .Type(HttpVerbs.Post)
            .Action("Create", "DocumentExplorer", new { groupId = ViewBag.GroupId }));
        ds.Update(operation => operation
            .Type(HttpVerbs.Post)
            .Action("Update", "DocumentExplorer", new { groupId = ViewBag.GroupId }));
    })
    .InitialView("grid")
    .UploadUrl("Upload", "DocumentExplorer", new { groupId = ViewBag.GroupId })
    .Draggable(true)
    .Toolbar(tb => tb.Items(items =>
    {
        items.Add().Type("button").Text("").Command("NavigateToRoot").HtmlAttributes(new { title = "Go to Root" }).Icon("home");
        
    }))
    .Events(e => {
        e.Open("downloadFile");
        e.Execute("onExecute");
        e.Navigate("onNavigate");
        e.DataBinding("onDataBinding");
        e.DataBound("onDataBound");

        e.Drop("onDrop");

    })
)

 

I'm using the events mostly for troubleshooting this issue, so they just output the received event/data.  That being said, the onDrop is not being called.  Any help with figuring out why this happens will be greatly appreciated.

 

Thanks,

-Carlos

Aleksandar
Telerik team
 answered on 20 Apr 2021
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
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
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?