Telerik Forums
UI for ASP.NET MVC Forum
6 answers
2.1K+ views
Hello,

I have a user grid (ajax binding), where users have a boolean status of active or not active. I would like to display a button that says 'Activate' if the user is non-active, and 'Deactivate' if the user is active.

When the button is clicked, it should trigger a server action (via ajax/post), and then refresh that row to update the new status. 

What is the easieast way to accomplish this? Is there a way to do this using CustomCommand column? Or do I have to use a client template for the button, then write my own javascript to call the action in the backend,and refresh the grid?

Thanks,
~S
Georgi
Telerik team
 answered on 17 Apr 2018
5 answers
358 views

Hello, I am trying to set the pagesize of my listview on the client side and I am unable to figure out how to do it. I bound the databound event to a javascript function and I am trying to set the pageSize using "listview.dataSource.pageSize(5)"  but when I call this function once it keeps getting called over and over in a  loop until the stack runs out of room. It does set the pagesize but it shouldn't keep getting called. What am I doing wrong?

Viktor Tachev
Telerik team
 answered on 17 Apr 2018
1 answer
438 views

Hi,

I have a TreeList with several columns. One of them is displaying an image. The others just some short text.
The image column contains the url in it's model and I use a custom template to show the image. This is gonna work as expected:

columns.Add().Field(i => i.ImageUrl).Template("<img src=\"#: ImageUrl #\">")

 

But no I wand to edit this row and have a custom editor for this image column. At the end I wand to embedd DropZone to upload a new image. How can I assign a custom editor (any kind) instead of the default textbox which appears for basically every kind of data type?

I've seen that the column builder has a method called "Editor(string value)". But the API documentation of Kendo is as useless as ever. I don't understand why a enterprise grade component provider can survive with such bad quality. Nevertheless, is this maybe the way to go? If yes, how should I use this method? Because it's not the name of a kendo-template, editor template, javascript function nor html id.

Thank you. Best regards.

Alex Hajigeorgieva
Telerik team
 answered on 17 Apr 2018
2 answers
436 views

Hi I have a set of 3 grids displaying financial data for a set of records - all with the same columns -

grid 1 holds the baseline monthly data,

grid 2 (editable) holds same records but the dollar amounts can be edited to what is needed in the new monthly cycle

grid 3 holds the same records but displays the variance between the values of grid 1 and 2 - currently have paging and scrolling synchronized

 

I am wondering now if there is a way to apply the grid column filter from one grid to another - i have not found this exact question answered anywhere

can someone help?

 

thanks

Jim

 

James
Top achievements
Rank 1
 answered on 13 Apr 2018
1 answer
84 views

Anyone know why when I change my grid's page it only seems to really change the page after my function completes? e.g. 

var g = $("#MyGrid").data("kendoGrid");
g.dataSource.page(2);

 

If I try to find a record on this new page by doing something like this: 

var dataItem = g.dataSource.get(MyRecordID);

DataItem is unknown

But if I wait until the function finishes it does change the grid's page.

If I set a breakpoint I can see the grid's datasource page is set to 2, but the data still has the old page one loaded...

Preslav
Telerik team
 answered on 13 Apr 2018
1 answer
100 views

Hello,

 I started to use dropdownlist Kendo but your documentation is confusing and I cannot find an info that I am looking for.

 I created 

@(Html.Kendo().DropDownListFor(d => d.AppraisalType)
                    .Name("optional")
                    .OptionLabel("Select Appraisal Type")
                    .HtmlAttributes(new { @class = "form-control", id = "typeAppraisal" })
                    .BindTo(new List<string>() {
        "60 Days Appraisal",
        "6 Months Appraisal",
        "Yearly Appraisal"
    })

When I submit the form it is not in database, saved as null. How I can save it?

And another thing how to set up dropdownlist as required field? 

Thank you!


Nencho
Telerik team
 answered on 13 Apr 2018
8 answers
461 views

Using the min and max values for the picker will prevent you from being able to select the dates/times via the UI, but you can still manually enter values outside of the min and max. I believe this is expected behavior, but there doesn't seem to e a way to inform the user that they just entered a datetime that is not in valid range. The onChange event does not fire, which makes sense, so there's no way for me to hook in and tell the user they just entered an invalid date.

 

My question: How can I disable dates in the UI AND still do min/max validation for the user so they know they netred a date/time out of the range and prevent a a form submission?

Viktor Tachev
Telerik team
 answered on 11 Apr 2018
1 answer
158 views

I need to call LoadSettings (via razor) as per a previous post; In short I need to call LoadSettings, but I also need to be able to set columns to be multi-select fitlerable.

 

How can I call LoadSettings and then do additional settings that are not yet implemented via LoadSettings? Can I overload LoadSettings in some way? Is the implementation of LoadSettings available? Is it likely to be re-implemented in the future?

 

 

 

Preslav
Telerik team
 answered on 11 Apr 2018
8 answers
93 views

Hi,

Is it possible to use 1 PivotGrid and have pre-defined columns, rows and measures etc, that change based on an onclick event?

For instance i would have two buttons, "View 1" and "View 2", when one of these buttons are clicked the PivotGrid would re-drawn using defined cols, rows etc?

Thanks,
Lee.

Lee
Top achievements
Rank 1
Veteran
 answered on 11 Apr 2018
2 answers
120 views

Im using the Kendo UI Editor and I'd like to be able to capture the print event - not the Print Execute command but the actual printing of the document (see attached image).

I realize that there is a onafterprint event (not supported by all browsers) - is this the only way to capture the printing of the Editor content?

Ruairi
Top achievements
Rank 1
 answered on 11 Apr 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?