Telerik Forums
UI for ASP.NET MVC Forum
5 answers
611 views
Hi,

i'm a bit surprised, because i Just moved from Telerik MVC extensions to Kendo UI Complete for MVC, and i noticed that the load event of the grid disappeared.

And if i try to do what i want in the document load event ($(document).ready(......)), the grid is not yet constructed or available if i call it like this :

var

grid = $("#Grid").data("kendoGrid"); => error

Did I miss something ?

 

Atanu
Top achievements
Rank 1
 answered on 06 Feb 2013
2 answers
244 views
Hi , can you point me to some samples , documentation to go about a keyword search implementation.
We have a textbox and search button which is supposed to filter the data on the grid. 
On the button click, we pass the keyword but how do I pass it to the grid controller? 
The grid by default calls the controller to fill all the values but if they enter a keyword search,
how do I pass that value to the grid by default lists all the values. 
It's a simple keyword filter on the grid but I haven't found any help. RIght now , we use class level variables 
to make it work but there is probably a better way. 
DAR
Top achievements
Rank 1
 answered on 05 Feb 2013
2 answers
396 views
Hi

I'm struggling to get a tabstrip to get it's content from a partial view when it's in a details template of a grid view as I get an invalid template error.

If I take the tabstrip out of the grid details view it works fine.

The code:

<script id="expscenDetail" type="text/kendo-tmpl">
    @(Html.Kendo().TabStrip()
           .Name("TabStrip")
           .SelectedIndex(0)
           .Items(items =>
            {
                items.Add().Text("Chart")
                    .LoadContentFrom("_eDetail", "Tray")
                    .Selected(true);
                items.Add().Text("Text")
                    .LoadContentFrom("_eDetail", "Tray");
            }))
</script>

_eDetail - partial view
<div >
    <ul>
        <li><label>Code:</label></li>
    </ul>
</div>
Controller
public ActionResult _eDetail()
 {
            return PartialView();
 }

If I put a break point on the controller it doesn't even get hit, so I believe it's a problem with how the loadcontent() part is parsed.

The error:
<div class="k-widget k-tabstrip k-header" id="TabStrip"><ul class="k-reset k-tabstrip-items"><li class="k-item k-state-default k-state-active"><a class="k-link">Chart</a></li><li class="k-item k-state-default"><a class="k-link">Text</a></li></ul><div class="k-content k-state-active" id="TabStrip-1" style="display:block"></div><div class="k-content" id="TabStrip-2"></div></div><script>
    jQuery(function(){jQuery("#TabStrip").kendoTabStrip({"contentUrls":["/Tray/_eDetail","/Tray/_eDetail"]});});
' Generated code:'var o,e=kendo.htmlEncode;with(data){o='\n    <div class="k-widget k-tabstrip k-header" id="TabStrip"><ul class="k-reset k-tabstrip-items"><li class="k-item k-state-default k-state-active"><a class="k-link">Chart</a></li><li class="k-item k-state-default"><a class="k-link">Text</a></li></ul><div class="k-content k-state-active" id="TabStrip-1" style="display:block"></div><div class="k-content" id="TabStrip-2"></div></div><script>\n\tjQuery(function(){jQuery("';TabStrip").kendoTabStrip({"contentUrls":["/Tray/_eDetail","/Tray/_eDetail"]});});
;o+=;}return o;'
Is there anyway around this? Or am I just trying to take it a step too far?

Thanks
Daniel
Telerik team
 answered on 05 Feb 2013
1 answer
156 views
Just don't see what I'm doing wrong here.

The data is returned perfectly when viewing in Firebug - The progress spinner on the dropdown runs and then turns into an arrow.....just nothing when I click on the dropdown.

@(Html.Kendo().DropDownListFor(model=>model.UserId)
.Name("UserId")
.DataTextField("Name")
.DataValueField("Id")
.OptionLabel("Select User")
.DataSource(source => {
source.Read(read =>
{
read.Type(HttpVerbs.Post);
read.Action("GetUserDropDown", "Admin");
});
}))
Daniel
Telerik team
 answered on 05 Feb 2013
1 answer
123 views
From the documentation about autocomplete 
.
Filter("contains") //Define the type of the filter, which autocomplete will use.

I noticed that the Filter method has some hard-coded values.What are the other filter types?
if other controls also have this kind of hard-coded values,where can i find them?also,they are case-sensitive?

Regards,
Daniel
Dimiter Madjarov
Telerik team
 answered on 05 Feb 2013
2 answers
198 views
How can I invoke an edit controller from a grid?  I have tried adding a custom command with an Action("Edit","Customers") but there does not seem to be a way to pass the CustomerID to the action.  I got the javascript code from the sample custom command grom the grid demo, but I don't seem to be able to make it work.  This is what I have, but it doesn't seem to execute the click.

@model IEnumerable<LightRouteDB.Customer>
 
@{
    ViewBag.Title = "Customer List";
}
 
@(
 Html.Kendo().Grid(Model)
    .Name("CustomerGrid")
    .Pageable()
    .Sortable()
    .Filterable()
    .Columns(cols =>
    {
        cols.Bound(c => c.CustomerNum).Width(100).Groupable(false);
        cols.Bound(c => c.CustomerName).Width(200);
        cols.Bound(c => c.BillAddr1).Width(200).Title("Address");
        cols.Bound(c => c.BillCity).Width(100).Title("City");
        cols.Bound(c => c.TotalDue).Format("{0:c}").Title("Balance");
        cols.Command(cmd => cmd.Custom("Edit").Text("Edit").Click("editCustomer"));
    })
)
 
<script type="text/javascript">
    function editCustomer(e) {
        e.preventDefault();
                 
        var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
        window.nav("/customers/edit/" + dataItem.CustomerID);
    }
</script>
Deon
Top achievements
Rank 1
 answered on 05 Feb 2013
2 answers
82 views
I was wondering if there was a way to specify a particular tab animation as the default across my entire MVC project without having to explicitly specify it on each tabstrip.  Or would I have to put the same fluent markup in all my tabstrips?

Thanks for your assistance.

Regards,
Brian
Brian Roth
Top achievements
Rank 1
 answered on 04 Feb 2013
3 answers
144 views
Hi,
When closing the edit popup in grid, you should just close it, not cause a postback. Or is there a reason why it causes a postback?

Regards,
Mattias
Daniel
Telerik team
 answered on 04 Feb 2013
3 answers
101 views
I want the user to be able to make a selection in my grid and then when they close the grid I want the selection passed back to a text box on my page.  My grid is actually in a window.  So the user clicks a button, it opens my grid and shows a table.  I have all of this code working, but now I need to have the selected item passed back to the text box.  I have tried this function on the close event of the window.
function onClose() {
    var selected = $.map(this.select(), function(item) {
        return $(item).text();
    });
    $("#safekeep").text = selected.toString;
}

Any suggestions? Or is there a tutorial somewhere for this?

 

 

 

Daniel
Telerik team
 answered on 04 Feb 2013
1 answer
100 views
It is possible to hit the Add New button 3 times to get the blank lines and then let the user enter all the values?  Currently you have to hit add new, then add one, hit add new again then add one..

Thanks
Chris
Petur Subev
Telerik team
 answered on 01 Feb 2013
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
Security
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
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
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?