Telerik Forums
UI for ASP.NET MVC Forum
2 answers
277 views

I have an editable grid using InCell as the Edit Mode.  I have one field that is editable.  When that cell gets focus I want it to select the contents of the cell.  So for instance if the cell contains "100" and it gets focus I want the "100" to be selected so that the user can type over it with out having to backspace.   I have tried putting a this.select();  in the onEdit Code when that column is being edited but it isn't working.

Thx for help

Lee

Lee
Top achievements
Rank 1
 answered on 24 May 2017
5 answers
694 views

I am trying to capture the filter event in my Kendo grid as we are saving grid state in Local storage using Angularjs.  Server-side filter works, but the "filter event" on the grid does not fire.  Is there something more I need to do? Here is a code snippet

              pageSize: 25,
              serverPaging: true,
              serverFiltering: true,
              serverSorting: true
          }),
          width: "100%",
          sortable: true,
          reorderable: true,
          pageable: true,
          columnMenu: false,
          resizable: true,
          filterable: true,
          filter: function(e) {
              if (e.filter == null) {
                  console.log   ("filter has been cleared");
              } else {
                  console.log(e.filter.logic);
                  alert(e.filter.filters[0].field);
                  console.log(e.filter.filters[0].operator);
                  console.log(e.filter.filters[0].value);
              }
          },

Boyan Dimitrov
Telerik team
 answered on 24 May 2017
1 answer
314 views

you can set save / cancel buttons text buy UpdateText and CancelText of command.Edit()

columns.Command(command => { command.Destroy().Text(" "); command.Edit().HtmlAttributes(new { style = " " }).Text(" ").UpdateText("Сохранить").CancelText("Отмена"); }).Width(100);

 

what if I need only delete button present in grid? (so user can add or delete items)?

if I remove edit command I will get default button names. If I set command.Edit(). HTMLAttributes display to none I will get no edit button but also I get NO save update buttons in popup

Preslav
Telerik team
 answered on 23 May 2017
3 answers
464 views

I am using Kendo Spreadsheet for ASP.Net MVC and using it inside the Kendo window.

I need to customize the spreadsheet toolbar to add a custom button (Save) option for the users to save the spreadsheet.

I could see the reference for toolbar customization using Kendo UIJavascript , but not with MVC. Please suggest how to add a custom button in spreadsheet toolbar using MVC.

 

Nencho
Telerik team
 answered on 23 May 2017
1 answer
1.2K+ views

This seems like it should be fairly simple and yet here I am.

I have a grid with inline editing.  I have set an editor template for a column to have a dropdown list.  This column is bound to a property that is set according to an enum.  All of that works great, and I get a dropdown with the names.

However, it always posts to the database as null.  All I want is the dropdown to show names when editing, post the value when creating or editing, then display the name when just viewing.

I have scoured forums but continue to come up empty.

Model

public class Issue
{
    public int Id { get; set; }
    ...
    ...
    public Urgency? Urgency { get; set; }
    ...
    ...
}

 

Enum

public enum Urgency
{
    Low = 1,
    Medium = 2,
    High = 3,
    Critical = 4
}

 

EditorTemplate View

@(Html.Kendo().DropDownList()
        .Name("Urgency")
        .BindTo(Enum.GetNames(typeof(Urgency)).ToList())
)

I have tried many other things but this is where my code is at the moment.

 

What am I missing?

Georgi
Telerik team
 answered on 22 May 2017
1 answer
391 views

I'm trying to implement filter checkboxes with my dynamic column grid. I return a List<string> of options that I retrieve based on the PropertyName that I pass to the read action of the Filterable property.

I keep getting the following javascript error, where X33 is the generic column name that is mapped to the actual data column. Any advice would be great.

VM2049:3 Uncaught ReferenceError: X33 is not defined
    at eval (eval at compile (kendo.all.min.js:25), <anonymous>:3:209)
    at Object.render (kendo.all.min.js:25)
    at Object.d [as render] (jquery.min.js:2)
    at init.createCheckBoxes (kendo.all.min.js:43)
    at init.refresh (kendo.all.min.js:43)
    at init.options.forceUnique.checkChangeHandler (kendo.all.min.js:43)
    at init.trigger (kendo.all.min.js:25)
    at init._process (kendo.all.min.js:28)
    at init.success (kendo.all.min.js:27)
    at success (kendo.all.min.js:27)
 

Here is the relevant code for setting up the columns.

foreach (ColumnSettings col in Model.GridColumns)
{
     columns.Bound(col.PropertyName).Title(col.Title).Width(col.Width).Filterable(ftb => ftb.Multi(true)
         .DataSource(ds => ds.Read(r => r.Action("Unique", "Data").Data("{ field: '" + col.PropertyName + "' }"))));
}

 

Preslav
Telerik team
 answered on 22 May 2017
16 answers
2.9K+ views
Hello,

I've added a custom command, "Details", to the rows in my grid so a user can view the details about the row.  When clicked, I want it to access the Details action in my HomeController.  However, when I build my solution, I receive the following error message:

"Custom command routes is available only for server binding."

Can someone please tell me how I can correct this issue?  My ulitimate goal is to create custom command buttons for Add, Edit, Delete, and Details, so my existing Views will be presented, rather than using the inline editing.  I need to create these custom buttons because the default command buttons don't seem to permit routing to my Views.  Anyway, I would appreciate your help.

Thanks,
Mike

      .Columns(columns =>
      {
          columns.Command(p => { p.Custom("ViewDetails").Action("Details", "Home").Text("Details"); }).Width(160);
          columns.Bound(p => p.CustomerId)
      })
Boyan Dimitrov
Telerik team
 answered on 22 May 2017
1 answer
212 views
Anyone know how I can get my grid to auto expand it's width when the browser width changes? I have two grids left and right of each other. I would like the left grid to auto size it's width and the right grid to be 400px. I can't seem to do this. I tried setting the right grid to float:right and it's always wrapping down to the bottom. The ultimate goal is to have the right grid disappear if the browser width is less than 768px. For that I was going to use the responsive web control, but first I think I need the left grid to auto size properly. Then if the right grid disappears the left grid will fill the remaining space. Any ideas would be greatly appreciated!
Stefan
Telerik team
 answered on 22 May 2017
2 answers
150 views

Hello, as the title says, I'm trying to add a vertical splitter to the right side of a grid - there's a functionality on the right of the grid which allows users to show listed details, and I want to allow them to decrease the size of the grid.

Unfortunately, that's the second day I'm battling this issue and it doesn't seem anyone was facing this problem on MVC - only I saw a similar AJAX problem.

I attached a schematic view of what I'm trying to achieve. Thanks in advance for any help.

 

 

Alex Hajigeorgieva
Telerik team
 answered on 22 May 2017
4 answers
165 views

Hello

I'm almost ending a project development that includes MVC 2017.1.233 ( Feb 23 2017)
If I just update to 2017.2.504 (May 4 2017) will I need to update the source code to make the application work with this new version ?
Only the DLL should be updated?  js and css too?
Best regards and tank you.

Stefan
Telerik team
 answered on 22 May 2017
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?