Telerik Forums
UI for ASP.NET MVC Forum
1 answer
176 views
Is there an edit mode InForm in the official release?

Regards,
Andy
Top achievements
Rank 1
 answered on 24 Jul 2012
4 answers
633 views
I'm using the KendoUI for MVC Autocomplete extension with a Telerik MVC Extensions Grid and the Autocomplete is not displaying the available suggestions in a drop down list, and it's not "suggesting" anything even though I have .Suggest(true).

I have this in the Head section of the _layout.cshtml view...

@{Html.Telerik().StyleSheetRegistrar().StyleSheets(group => group.AddSharedGroup("SharedStyleSheets")).Render();}


<script src="@Url.Content("~/Scripts/2012.2.423/jquery.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/2012.2.423/kendo.web.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/2012.2.423/kendo.aspnetmvc.min.js")" type="text/javascript"></script>

... and this in the Global.asax file for the Shared stylesheets.

SharedWebAssets.StyleSheets(group => group
    .AddGroup("SharedStyleSheets", styles => styles
        .Add("2012.1.419/telerik.common.min.css")
        .Add("2012.1.419/telerik.web20.min.css")
        .Add("2012.2.423/kendo.common.min.css")
        .Add("2012.2.423/kendo.blueopal.min.css")
        .Combined(true)
        .Compress(true)
        ));

Am I missing something?

This is the HTML of the view.

@using (Html.BeginForm(MVC.Ctaf.SelectItems(), FormMethod.Post))
{
    <fieldset>
        <legend>Filter</legend>
        <p class="colx2-left">
            Class Name: @(Html.Kendo().AutoComplete()
                .Name("classname")
                .DataTextField("Class")
                .DataSource(source =>
                {
                    source.Read(read =>
                    {
                        read.Action("_AutocompleteClasses", "Ctaf");
                    }).ServerFiltering(false);
                })
                .Suggest(true)
            )
 
        </p>
        <p class="colx2-left">
            Subclass Name: @Html.TextBox("subclassname")
        </p>
 
        <p style="clear:both;">
            <input type="submit" value="Filter" />
        </p>
    </fieldset>
     
}
<p> </p>
@{Html.Telerik().Grid(Model.CtafList).Name("CtafGrid")
      .Columns(column =>
      {
          column.Bound(c => c.Id)
              .ClientTemplate("<input type='checkbox' name='checkedRecords' value='<#= Id #>' />")
              .Title("")
              .Width(36)
              .HtmlAttributes(new { style = "text-align:center" });
          column.Bound(c => c.Class);
          column.Bound(c => c.Subclass);
          column.Bound(c => c.Title);
      })
      .DataBinding(dataBinding => dataBinding.Ajax()
    .Select("_CheckBoxesAjax", "Ctaf"))
    .Scrollable()
    .Pageable(pager => pager.PageSize(40))
      .Render();
      }

This is my controller action.

public virtual ActionResult _AutocompleteClasses()
{
      stringresult = _ctafService.Get().Select(c => c.Class).Distinct().ToList();
 
    return Json(result, JsonRequestBehavior.AllowGet);
}

Any ideas?

Thanks.
King Wilder
Top achievements
Rank 2
 answered on 24 Jul 2012
1 answer
317 views
I am a newbie to Kendo UI and currently porting from the telerik mvc to Kendo UI for MVC . I have come across a problem when porting my grid from telerik mvc to kendo ui for mvc. I used the detail template approach for nested grids without a problem with telerik mvc , but when trying to port to client templates within kendo I am getting "Invalid Template" error.
 Am I missing something in my initial file includes.

<link rel="stylesheet" href="@Url.Content("~/Content/kendo.common.min.css")">
<link rel="stylesheet" href="@Url.Content("~/Content/kendo.silver.min.css")">
<script src="@Url.Content("~/Scripts/jquery.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.all.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.aspnetmvc.min.js")"></script>

Here is a snippet of code that uses a client template
@( Html.Kendo().Grid<DetailCategoryListingGridView>()
.Name("DetailCategoryGrid").
Columns(columns =>{
 columns.Bound(a => a.Value).Title(
"CategoryValue").Width(200);
columns.Bound(a => a.Comments).Title("Description");
columns.Bound(a => a.ModifiedDate).Title("LastUpdated").Format("{0:MM/dd/yyyy}").Width(150);
columns.Bound(a => a.ModifiedBy).Title("UpdatedBy").Width(150);
columns.Bound(a => a.DetailCategoryID).Title("UpdatedBy").Width(150);
columns.Command(commands =>
{
commands.Destroy();
commands.Edit();})
.HtmlAttributes(
new {style = "text-align:center"});
})

 

 .ClientDetailTemplateId("udfTemplate")
.Pageable().DataSource(dataBinding => dataBinding.Ajax()
.Read(read=>read.Action("FilteredDetailCategoryBinding", "DetailCategoryAdmin"))
.Create(create=>create.Action("InsertDetailCategory", "DetailCategoryAdmin"))
 .Update(update=>update.Action("UpdateDetailCategory", "DetailCategoryAdmin"))
.Destroy(destroy=>destroy.Action("DeleteDetailCategory", "DetailCategoryAdmin"))
 .Model(model => model.Id(a => a.DetailCategoryID)) .PageSize(15)

 )
 .Sortable()
 .Pageable(page=>page.PageSizes(true))
 //.Events(events => events.DataBound("dataBound")
  )

 

 

<script id="udfTemplate" type="text/kendo-tmpl">

 @(Html.Kendo().Grid<UDFInventoryTemplate>()
.Name("UDFInventoryDetails_#=DetailCategoryID#")
 .Columns(columns =>
{
columns.Bound(o => o.LabelValue);
columns.Bound(o => o.Status);
columns.Bound(o => o.ControlType);
 columns.Bound(o => o.ControlDataValues);
 columns.Bound(o => o.DefaultValue); })
.DataSource(dataSource => dataSource.Ajax() .Read(read=>read
.Action(
"FilteredUDFDetails", "DetailCategoryAdmin"))

).ToClientTemplate()
)
</script>


Thanks,
Jean-Paul

 

 

 

Iliana Dyankova
Telerik team
 answered on 24 Jul 2012
1 answer
439 views
UPDATE: NEVERMIND, THIS FEATURE IS AVAILABLE IN FINAL RELEASE



Hello,

I'm evaluating if we can port all features (that we need) of our Telerik MVC Extensions Grid to the Kendo UI MVC Grid. I wasn't able to find an equivalent to the ForeignKeyfeature, which we use like this:

@(Html.Telerik().Grid<RowModel>()
.DataBinding(dataBinding => dataBinding.Ajax().Select("_GetData", "Data"))
.Columns(x =>
    {
        x.Bound(y => y.Id).Width(40);
        x.Bound(y => y.Description).Width("40%");
        x.ForeignKey(y => y.SomeForeignId, Model.ForeignIdResolveCollection, "ID", "Name").Width("80%");
    })
)

We don't use the Built in edit features but it's very useful for the column filtering feature, for example. Is there a replacement for this feature, if not, will there be one in future?

Best regards
Thomas
andrew
Top achievements
Rank 1
 answered on 24 Jul 2012
2 answers
264 views
Hey

There is some error when I try use ForeignKeywith with Guid column.
(int) all works fine
columns.ForeignKey(c => c.MenuID, (System.Collections.IEnumerable)ViewData["Menus"], "MenuID", "MenuNazwa");


(Guid) its a error
columns.ForeignKey(c => c.UserId, (System.Collections.IEnumerable)ViewData["Users"], "UserId", "UserName");

Błąd: ReferenceError: UserId is not defined
Plik źródłowy: http://localhost:53048/Scripts/kendo.web.js
Wiersz: 347

Any ideas how fix this (change Guid to int is not a option)

Tx for help

PS. Whith old MVC extensions all works fine ...
Andrzej
Top achievements
Rank 2
 answered on 24 Jul 2012
1 answer
613 views
How do you specify where the data is in the response? In js I would specify that the total property is the "count" property and the data is in "data". I don't see how to do this in the MVC extensions.

schema: {
                    total: "count",
                    data: "data",
                    model: {
                        id: "Id",
                        fields: {
                            Id: { editable: false, type: "number" },
                            StartDate: { type: "date" },
                            EndDate: { type: "date" }
                        
                        }
                    }
                }
Vesselin Obreshkov
Top achievements
Rank 2
 answered on 24 Jul 2012
9 answers
260 views
Is there anyway of splitting this file as we are only using a few controls and would like to reduce the size of our js files as much as possible.
Many thanks
Vesselin Obreshkov
Top achievements
Rank 2
 answered on 24 Jul 2012
0 answers
433 views
Sorry for being such a dope, but can anyone point me to the documentation showing what steps I need to perform to add Kendo UI Complete for ASP.NET MVC to an existing Telerik MVC project?  

Edit: Never mind - like I said, I'm a dope...
gm
Top achievements
Rank 1
 asked on 23 Jul 2012
2 answers
274 views
Seems like this should be possible, but I'm rendering a listview using the MVC helpers, but I just want to give it an existing Kendo datasource (created via javascript) that is already on my page.  Basically just give it the name of an existing datasource.  However I can't find a way to do that.  It looks like the MVC extensions only allow you to set up a new datasource to be used with the listview. 

Is there a way to do what I mentioned?

Thanks!
Eric
Eric
Top achievements
Rank 1
 answered on 23 Jul 2012
3 answers
237 views
When creating a new project from the template Telerik MVC 4 Web Application (Razor) Visual C# - I get the error in the title (screen grab attached). I do not get the error if I create a new MVC4 web project using a template other than the Telerik ones.

My software configuration is as follows:
  • Windows 7
  • Visual Studio 2010 Professional ENU with SP1
  • Kendo UI DataViz Q2 2012 - Version 12.2.710.0
  • Kendo UI for ASP.Net MVC Q2 2012 - Version 12.2.710.0
  • Kendo UI Mobile Q2 2012 - Version 12.2.710.0 
  • Kendo UI Web Q2 2012 - Version 12.2.710.0
  • Telerik Control Panel - Version 12.2.718.0
  • Telerik Extensions for ASP.Net MVC Q2 2012 - Version 12.2.607.0
  • Telerik JustCode Q2 2012 SP1 - Version 12.2.719.1
  • Telerik RadControls for ASP.Net AJAX Q2 2012 - Version 12.2.607.0

Greg
Top achievements
Rank 1
 answered on 23 Jul 2012
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?