Telerik Forums
UI for ASP.NET MVC Forum
4 answers
224 views
if i have this code
@(Html.Kendo().Grid(Model)    
    .Name("Grid")
    .Columns(columns =>
    {
        columns.Bound(p => p.emplmark).Groupable(false);
        columns.Bound(p => p.firstname);
        columns.Bound(p => p.lastname);
        columns.Bound(p => p.location);
        columns.Bound(p => p.county);
    })
    .Groupable()
    .Pageable()
    .Sortable()
    .Scrollable()
    .Filterable()
    .DataSource(dataSource => dataSource
        .Ajax()
        .Read(read => read.Action("GetWork", "Company"))
    )
)

The source return around 2000 records,but after i press next page(page 2),the data disapear.why?it isn't enough to put Pageable,to work the paging?
Daniel
Top achievements
Rank 1
 answered on 06 Feb 2013
3 answers
996 views
I have a question about filtering on the Kendo Grid.  I have looked all over the API docs, these forums, and SO and haven't come up with anything, so I figured I'd ask here.

Is there a straightforward way to set the filtering type to a different type other than the underlying type of the bound column?  

E.g.
I have a column called "ActivityID" bound to an int property in my ViewModel.  In the ClientTemplate of the bound column, I'm showing a property from my ViewModel called "ActivityNumber", which is a string.  When the user hits the filter drop down in the column header, I want them to be able to filter based on the string operators I have set up in the grid, not the number operators.

Does anyone know if there a straightforward way in the Kendo().Grid() configuration to achieve this?  I'm sure there's  a way to do it on the client side, but I was hoping that I was missing something really obvious before going down that path.
Dimiter Madjarov
Telerik team
 answered on 06 Feb 2013
5 answers
621 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
245 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
404 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
162 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
129 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
201 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
84 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
148 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
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
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?