Telerik Forums
UI for ASP.NET MVC Forum
6 answers
339 views
Hi,

I have one multiselect in cshtml page. When I click on button in cshtml page, I am showing Kendo Window. In kendo window, there is one more multi select and OK, Cancel buttons.

If user clicks on OK, I am calling controller and passing values of multiselect and doing the required operation.

I want to display the same values in multiselect in cshtml page. How can I do this ? Here is my code.

$("#okay").kendoButton({
            click: function () {               
                var rowID = $("#selectedValues").val();
                data = { 'rows': rowID };               
                $.ajax({
                    type: "POST",
                    url: "Rows" + window.location.search,
                    data: data,
                    traditional: true,
                    dataType: "json",
                    success: function (result) {                       
                        $("#Dialog").data("kendoWindow").close();
                        return true;
                    },
                    error: function () {
                        alert("An Error Occured. Please Cancel and Try Again!");
                        return false;
                    }
                });
            }
        });
Vladimir Iliev
Telerik team
 answered on 23 Oct 2014
1 answer
134 views
How do I set the initial position of the Window to be centred?

I have hooked up a click event on a button which calls the following JavaScript:

function clickViewJobLogImage()
{
    var win = $("#viewJobLogWindow").data("kendoWindow");
 
    win.title("Testing 123");
    win.refresh();
    win.center();
    win.open();
}

But if the user then drags the window to a new position and then clicks the button to open the window (in effect refresh it) then it jumps back to the centre!

Ideally I want the window to open initially centered but if the user has moved it to open in it's last position on subsequent calls to open it.
Alex Gyoshev
Telerik team
 answered on 22 Oct 2014
3 answers
117 views
Hi,

I am getting intellisense for the kendo ui grid when using razor code but when accessing the grid through jquery, I am not
getting any intellisense.

Thanks,
Annie
Alexander Popov
Telerik team
 answered on 22 Oct 2014
1 answer
227 views
Hi, I have the following window:

@(Html.Kendo().Window()
    .Name("viewJobLogWindow")
    .Title("Quote: QXXXX")
    .LoadContentFrom("ViewJobLogWindowsContent", "Quotes")
    .Draggable()
    .Resizable()
    .Width(640)
    .Height(480)
    .Actions(actions => actions.Pin().Minimize().Maximize().Close())
    .Visible(false)
)

But I only want to show the window and call the "ViewJobLogWindowsContent" action upon some other event such as a button click (or in this case an image click).

I call the following JavaScript function when the user clicks an image (acting as a link):

function clickViewJobLogImage()
{
    var win = $("#viewJobLogWindow").data("kendoWindow");
     
    win.center();
    win.open();
}

The window is not visible when the page first loads but the "ViewJobLogWindowsContent" action is called and when the user clicks the image it correctly shows the window but it does not call the action again?

I need the window to just be defined but not loaded and then only call the action to load the content when the JavaScript function is called.


Alex Gyoshev
Telerik team
 answered on 21 Oct 2014
1 answer
221 views
Hi. I am trying to implement the Kendo grid using adaptive rendering as I have an MVC view dedicated to mobile. When it renders, it behaves strangely in that the columns extend past the viewport and you must swipe to the right in order to see the columns. I'd expect the user to have to scroll like the HTML5 example. From what I see, there is no example using MVC but I'm using .Mobile() which is supposed to work I think. Please guide me in what I might need to do/provide an example using MVC. Thanks.
Craig
Top achievements
Rank 1
 answered on 21 Oct 2014
3 answers
2.1K+ views
I just upgraded my kendo grid with filterable options to the new GrodFilterMode.Row. In one of the fields I had a custom monthpicker where the could select a month, and that worked fine before i upgraded to the filter row. Now it is just a normal datepicker. It is set in the colums like this

col.Bound(x => x.WriteOffTo).Filterable(f => f.UI("dateFilter"));

and the javascript is 

function dateFilter(control) {
    $(control).kendoDatePicker({
        depth: "year",
        start: "year",
        format: "01.MM.yyyy",
        parseFormat : "01.MM.yyyy",
        close: function () {
            var picker = $(control).data("kendoDatePicker");
            var currentDate = picker.value();
            currentDate.setDate(1);
            picker.value(currentDate);
        }
 
    });
}

why does this break after i just added the line .Mode(GridFilterMode.Row) to .Filterable() ?
Petur Subev
Telerik team
 answered on 21 Oct 2014
2 answers
448 views
Hello,

I am using the Kendo Menu (through a bound site map, although the issue is also present if used through the helper class directly) and have noticed an issue with the menu calling our AuthorizationRoles attribute multiple times per item in the list.

Example:
There are 3 items in an example site map:
<siteMap>
  <siteMapNode  title="" description="">
    <siteMapNode title="Home" controller="Home" action="Index"></siteMapNode>
    <siteMapNode title="Person" controller="People" action="Person" >
      <siteMapNode title="Manage Person" controller="People" action="ManagePerson"></siteMapNode>
    </siteMapNode>
  </siteMapNode>
</siteMap>

The People controller is quite large and contains 64 public Actions which all has our Authorize Attribute.  Home has 0 Actions with Authorize Attributes.
For each load of the page, the Authorize attribute gets called 128 times for the menu alone.  Playing around with it, it gets called x times y amount where x is the number of methods with an authorize attribute in a given controller and y is the number of sitemap nodes referencing that controller.

Does anyone know if there is something I'm doing incorrectly or some way to fix the trimming so it only hits the action it's pointing to and not the entire controller for each item on the list?  We cache this item to speed it up, but in production it's making over 1000 calls to this function per page load and is quite intensive.

Current Razor used to generate the menu:
@(Html.Kendo().Menu()
        .Name("Menu")
        .Direction(MenuDirection.Bottom)
        .SecurityTrimming(true)
        .BindTo("WebSiteMap", (item, siteMapNode) => { })
)


Thanks for your help!
Georgi Krustev
Telerik team
 answered on 21 Oct 2014
1 answer
64 views
Hi,

In this demo http://demos.telerik.com/kendo-ui/grid/filter-row. is there a way to get the filter that was applied when user clicks on the filter icon and
selects a filter

Thanks,
Annie
Alexander Popov
Telerik team
 answered on 21 Oct 2014
6 answers
329 views
Hi,

I were trying the following things in the kendo grid and facing some issues,

1. Grid Tabbing

       Tabbing is working when there is no calculations are done on text changes. For example, if there are two fixed rows and first row is editable. If we change the data in the first row that should do a calculation and get updated in the second row. So for that purpose I use onCellChange event and i do the following in that

var grid = $('#gridtest').data("kendoGrid");
            var Row0 = grid.dataSource.data()[0];
            var Row1 = grid.dataSource.data()[1];

Row1.set("Total",Math.round(Row0.get("Total")*100)); 

These statement works and sets the value to the cell, but it is not visible until I focus  to the cell. To rectify this problem i used

grid.refresh();

This solves the issue, but it raises an another problem that i am unable to navigate to the next cell when i press tab. Due to this refresh the focus goes to first column. I need a solution for either to navigate to next cell when using grid.refresh() in oncellchange event or to display the cell when the value is set using model.


2. Dropdown Column

I have a dropdown column in the same grid where the model for that column has integer and i am unable to show the name in the cell instead of value.


I have attached a sample project with this and i have removed the packages folder in the attached project due to huge size, so please help me in this issue.

Thanks
Senthil

Tiago
Top achievements
Rank 2
 answered on 20 Oct 2014
1 answer
71 views
Hello,
    I'm relatively new to Telerik and I'm getting a bit stumped about what the best way to proceed is.

I have a grid running InCell mode, however, for a particular cell:

1. I need to pop a list of selections the user can pull from. These selections would then be appended to the text in the cell.
2. The user needs to retain the ability to type in the cell. (which I believe rules out using a multiselect instead)

To that end, I have a grid  with a  command button set up that displays a list of choices in a modal Kendo window using a partial view. You can see this in the attachment. I am trying to append the list of items to the "Comment" column in the main grid.

However, I'm still having issues doing the following:
1. Getting the selected id from the main grid and feeding this into the partial view so that the list shows the correct items for the main grid row.
2. Iterating through the rows in the partial view, getting the checked items and passing the data back to the main grid.

I'm going in circles with javascript and not getting the data back to the main grid.

So, I'm wondering if there is a simpler way to do what I'm trying to accomplish?

The most obvious one is to use the Mutiselect, but I don't think that satisfies the criteria of the user being able to type whatever they would like in addition to making choices.

If anyone has a better notion of how to approach this, please let me know.

Thanks,
Dave 


Petur Subev
Telerik team
 answered on 20 Oct 2014
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
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
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
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?