Telerik Forums
UI for ASP.NET MVC Forum
2 answers
2.1K+ views

Hello,

I'm trying to trigger the Create operation using the custom button (created by using custom header template of the custom column, as shown on the screenshot) - in order to avoid use of the grid toolbar. Is there a way to bind the Create operation to the custom control, on the grid?

Regards

Edin
Top achievements
Rank 2
 answered on 29 Jul 2016
2 answers
203 views

When using a datetime picker in a custom editor from a grid that has lot of columns that need to scroll for accessing the edit button,

The calendar display outside the editor window. Attached is a screenshot.

Any turnaround ?

MyView

@(Html.Kendo().Grid(Model)
.Name("myGrid")
.ToolBar(tools => tools.Excel()).Name("idsName")
.Columns(columns =>
{
columns.Bound(model => model.Genre).Title("Genre");
columns.Bound(model => model.Price).Title("Price");
columns.Bound(model => model.ReleaseDate).Title("ReleaseDate");
columns.Bound(model => model.Title).Title("Title");
columns.Bound(model => model.isAvailable).Title("Availability").ClientTemplate("<input type='checkbox' #= isAvailable ? checked='checked':'' # class='chkbx' disabled='disabled'/>");
columns.Bound(model => model.isAvailable).Title("Availability").ClientTemplate("<input type='checkbox' #= isAvailable ? checked='checked':'' # class='chkbx' />");
columns.Bound(model => model.isAvailable).Title("Availability").ClientTemplate("<input type='checkbox' #= isAvailable ? checked='checked':'' # class='chkbx' />");
columns.Bound(model => model.isAvailable).Title("Availability").ClientTemplate("<input type='checkbox' #= isAvailable ? checked='checked':'' # class='chkbx' />");
columns.Bound(model => model.isAvailable).Title("Availability").ClientTemplate("<input type='checkbox' #= isAvailable ? checked='checked':'' # class='chkbx' />");
columns.Bound(model => model.isAvailable).Title("Availability").ClientTemplate("<input type='checkbox' #= isAvailable ? checked='checked':'' # class='chkbx' />");
columns.Bound(model => model.isAvailable).Title("Availability").ClientTemplate("<input type='checkbox' #= isAvailable ? checked='checked':'' # class='chkbx' />");
columns.Bound(model => model.isAvailable).Title("Availability").ClientTemplate("<input type='checkbox' #= isAvailable ? checked='checked':'' # class='chkbx' />");
columns.Bound(model => model.isAvailable).Title("Availability").ClientTemplate("<input type='checkbox' #= isAvailable ? checked='checked':'' # class='chkbx' />");
columns.Bound(model => model.isAvailable).Title("Availability").ClientTemplate("<input type='checkbox' #= isAvailable ? checked='checked':'' # class='chkbx' />");
columns.Bound(model => model.isAvailable).Title("Availability").ClientTemplate("<input type='checkbox' #= isAvailable ? checked='checked':'' # class='chkbx' />");
columns.Bound(model => model.isAvailable).Title("Availability").ClientTemplate("<input type='checkbox' #= isAvailable ? checked='checked':'' # class='chkbx' />");
columns.Bound(model => model.isAvailable).Title("Availability").ClientTemplate("<input type='checkbox' #= isAvailable ? checked='checked':'' # class='chkbx' />");
columns.Bound(model => model.isAvailable).Title("Availability").ClientTemplate("<input type='checkbox' #= isAvailable ? checked='checked':'' # class='chkbx' />");
columns.Bound(model => model.isAvailable).Title("Availability").ClientTemplate("<input type='checkbox' #= isAvailable ? checked='checked':'' # class='chkbx' />");
columns.Bound(model => model.isAvailable).Title("Availability").ClientTemplate("<input type='checkbox' #= isAvailable ? checked='checked':'' # class='chkbx' />");
columns.Bound(model => model.isAvailable).Title("Availability").ClientTemplate("<input type='checkbox' #= isAvailable ? checked='checked':'' # class='chkbx' />");
//columns.Bound(model => model.isAvailable).Title("Availability").ClientTemplate("@Html.Kendo().CheckBox()");
columns.Command(commands =>
{
commands.Edit().Text(@Localizer["idsEdit"].Value); // The "edit" command will edit and update data items.
commands.Destroy(); // The "destroy" command removes data items.
}).Title("Commands").Width(200);
})
.Editable(editable => { editable.Mode(GridEditMode.PopUp);
editable.TemplateName("MovieEditor");
editable.Window(w=>w.Title("MonTitre").
Width(450));}) // Use inline editing mode.
.DataSource(dataSource => dataSource
.Ajax())
)

MyEditor

@model MvcMovieCore.Models.Movie
@{
ViewData["Title"] = "Edit";
}
<div class="form-horizontal">
<h4>Movie</h4>
<hr />
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="ID" />
<div class="form-group">
<label asp-for="Genre" class="col-md-3 control-label"></label>
<div class="col-md-7">
<input asp-for="Genre" class="form-control" />
<span asp-validation-for="Genre" class="text-danger" />
</div>
</div>
<div class="form-group">
@(Html.Kendo().DateTimePicker()
.Name("MyPick")
.HtmlAttributes(new { style = "left:50px;" })
)
</div>
<div class="form-group">
<label asp-for="Price" class="col-md-3 control-label"></label>
<div class="col-md-7">
<input asp-for="Price" class="form-control" />
<span asp-validation-for="Price" type="number" class="text-danger"></span>
</div>
</div>
<div class="form-group">
<label asp-for="ReleaseDate" class="col-md-3 control-label"></label>
<div class="col-md-7">
<input asp-for="ReleaseDate" asp-format="{0:D}" class="form-control" />
<span asp-validation-for="ReleaseDate" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="Title" class="col-md-3 control-label"></label>
<div class="col-md-7">
<input asp-for="Title" class="form-control" />
<span asp-validation-for="Title" class="text-danger" />
</div>
</div>
</div>

 

Michel
Top achievements
Rank 1
 answered on 28 Jul 2016
1 answer
115 views
Hello!

I'd like to know if it's possible to load Marker that are only visible on screen or within a specified range from Map center Using Server side filtering?

The Demo for Load Marker from Remote Source does not specify if it's possible.

If it's Not possible I'll post it as a feature suggestion.
T. Tsonev
Telerik team
 answered on 28 Jul 2016
3 answers
556 views

HI Team,

 

I have downloaded the new version of Kendo Dll with version 2016.2.714  after that kendo dropdown list not working as expected

when I click first time noting is showing just flickering second  time  click it is opening the values  .need to click first time any where in the form then if we click dropdown it will open.

  if my  cshtml page contain multiple dropdown list for first dropdown list only we are facing the issue

Please find the attached sample code could you please help me out to resolve the issue.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Nencho
Telerik team
 answered on 28 Jul 2016
1 answer
130 views
Hello I'm trying to load a load-on-demand treeview on document.ready and trigger the select event of a child node according to a path like shows this jsbin:
http://jsbin.com/ESOjAmi/8/edit?html,css,output
The problem in my case is that exist child nodes that have the same id as parents, because are two different entities, so in those cases the parent is expanded but the children that I want to select and trigger the select event is not selected. I guess because the method get in the datasource returns the first node that match the id.
The problem is in this part of the code in the jsbin example because in the case of the path [1,1] for example it expands the parent node but not the children with id 1 and i want to trigger the select event of the children node. In the other cases for example with path [1,2] the treeview is expanded and the select event of the child node with id = 2 is triggered correctly
 else {
        // otherwise select
        node = treeview.findByUid(ds.get(path[0]).uid);
        treeview.select(node);
        treeview.trigger("select", { node: node });
      }
Maybe someone can modify the JSbin example to reflect my case please?
Thank you
Peter Milchev
Telerik team
 answered on 27 Jul 2016
1 answer
97 views

Hello I'm trying to load a load on demand tree on document.ready according to a path like shows this jsbin:

http://jsbin.com/ESOjAmi/8/edit?html,css,output

The problem in my case is that exist child nodes that have the same id as parents, because are two different entities, so in those cases the parent is expanded but the children that i want to select and trigger the select event is not selected i guess because the method get in the datasource returns the first node that match the id.

The problem is in this part of the code because in the case of the path [1,1] for example it expands the parent node but not the children with id 1 and i want to trigger the select event of the children node.

 else {
        // otherwise select
        node = treeview.findByUid(ds.get(path[0]).uid);
        treeview.select(node);
        treeview.trigger("select", { node: node });
      }

Maybe you can modify the example to reflect my case please?

Thank you

Ivan Danchev
Telerik team
 answered on 27 Jul 2016
4 answers
255 views

I found following problem:

I have one main view MainView with two different partial views ViewOne and ViewTwo returned to the main view by separate @HTML.RenderAction(Action, controller) methods from different controllers . The partial views renders Ajax form with model fields in the first view and  KendoDataGrid in the second partial view.Both views uses different data models but  one field in each model has the same name. eg ForeignKey_ID.

When I try to edit a row in the second view (data grid) the row goes to edit state but instead of a dropdown with names/labels for ForeignKey_ID a text box with default id numerical value appears. In the same time missing dropdown shows up just by the dropdown for  ForeignKey_ID field in the first partial view (Ajax form)

I tried to use different field in the second view (datagrid) so there was no the same field name in the whole page and then expected dropdown with dictionary values shown up properly.

It can be solved by changing affected field name in the model.

Is there any other solution for this ?

 

 

ForeignKey_ID
Konstantin Dikov
Telerik team
 answered on 27 Jul 2016
4 answers
1.4K+ views

I have a grid, I want to fire the event edit like I'm clicking the edit button to fire the popup edit template, but without clicking it with the mouse but programatically. I this posible?

I tried trigger it on the databound event like this:

 

for (var i = 0; i < rows.length; i++) {

if(Myid == theIdOntheRow)

{

 $(rows[i]).addClass('k-state-selected');
                        var btnEdit = $(rows[i]).find(".k-grid-edit");                        
                        btnEdit.trigger('click');

 

...

 

I hope there are a clenear way to do this. Thanks

Dimiter Madjarov
Telerik team
 answered on 27 Jul 2016
1 answer
94 views

So, I've been spending roughly a day extra coding javascript and testing my code only to find that the date in data-value of the td elements are one month behind.

I'm posting a screenshot. now my question is, is this considered a bug? it's not hard for me to compensate for this, but I'd hate to change it again after a brief bug fix patch. please get back to me on this.

Viktor Tachev
Telerik team
 answered on 27 Jul 2016
2 answers
248 views

public class FavoritesController : Controller
    {
        public IActionResult Favorites_Read([DataSourceRequest] DataSourceRequest request)
        {
            ...

            return Json(listings.ToDataSourceResult(request));
        }
    }

 

@(Html.Kendo().ListView<ListingDetails>()
    .Name("listView")
    .TagName("div")
    .ClientTemplateId("listingTemplate")
    .Pageable()
    .DataSource(dataSource => dataSource
        .Ajax()
        .PageSize(5)
        .Model(model => model.Id(p => p.ID))
        .Create(update => update.Action("Favorites_Create", "Favorites"))
        .Read(read => read.Action("Favorites_Read", "Favorites"))
        .Update(update => update.Action("Favorites_Update", "Favorites"))
        .Destroy(update => update.Action("Favorites_Delete", "Favorites"))
    )
    .Deferred()
    )

 

I've set a breakpoint at the beginning of Favorites_Read, but the action is not being hit. Any help would be greatly appreciated.

Konstantin Dikov
Telerik team
 answered on 27 Jul 2016
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
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
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?