Telerik Forums
UI for ASP.NET MVC Forum
1 answer
397 views
Hi,

I am using the KendoUI Razor grid in my application with the following Settings :

@model BMS_RDM_DTO.SnapshotGridData
    @(Html.Kendo().Grid(Model.NewRecordsGridData)
        .Name("NewRecordsGrid")
    .Columns(columns =>
    {        
        columns.AutoGenerate(true);
        columns.Command(command => command.Custom("Edit").Click("EditNewRecordGrid")).Title("Actions");

    })
    .Filterable()
            .HtmlAttributes(new { style = "height: 380px;" })
                              .Scrollable(scroll => scroll.Enabled(true))
                .Groupable()
                .Sortable()
                .Pageable(pageable => pageable
                    .Refresh(true)
                    .PageSizes(true)
                    .ButtonCount(5))
    .DataSource(dataSource => dataSource
        .Ajax()
        .PageSize(10)
        .ServerOperation(false)
     ).Resizable(resize => resize.Columns(true))
)

I have an issue with the dateTime format shown on the grid. Please refer the screenshot - I dont want the UTC component to be shown. I would like to see just the date and the time without the offset / timezone difference.

What settings/config are required to achieve this  ? Can I set the date time formatting for the grid itself in the CSHTML ? (I can't set it for individual columns because autobind=true) 


Rosen
Telerik team
 answered on 24 Oct 2014
1 answer
171 views
Hi All,

I am using kendo tabstrip in my mvc application and used knockout js to bind data. The tabstrip is inside a kendogrid detail template. and data for all tab loads on detailrow init function of grid.When expanding detail row, first tab is active and it shows data. But when I select a different tab, it is showing empty content area. This issue comes in IE8.

Anyone have idea on why this happens?

Regards
Dimiter Madjarov
Telerik team
 answered on 24 Oct 2014
1 answer
93 views
Hi Team,

I am using kendo file upload control, but the UI for select file button is not working in IE8.It is showing empty button, without any label
Is there any solution for that?

Regards
Dimiter Madjarov
Telerik team
 answered on 24 Oct 2014
3 answers
823 views
Dear KendoUI Team!
Is it possible to realize s.th. like this with KendoUI when using AJAX Binding?

            columns.Command(commands =>
            {
                commands.Edit().ButtonType(GridButtonType.Image);
                commands.Delete().ButtonType(GridButtonType.Image);
                commands.Custom("CopyItem")
                    .Action("CopyItem", "Le")
                    .Ajax(true)
                    .HtmlAttributes(new { id = "CopyItemDetails" })
                    .DataRouteValues(route => route.Add(i => i.Rid).RouteKey("ItemID"))
                    .ButtonType(GridButtonType.Image)
                    ;

            }).Title(Strings.Commands).Visible((bool)ViewData["Writable"]);
What I found is that the custom command should be replaced by a column template. But I want the copy command in the command column, not in a separate column. And I need the ItemID of the row, of course.
How can I realize this with KendoUI?

brgds
Malcolm Howlett
wortho
Top achievements
Rank 2
 answered on 23 Oct 2014
15 answers
5.0K+ views
Hello, I am not sure if I have this right, but I have a grid with multiple records in it. I have added a checkbox to the grid so that the user can select the records they want to update.  What I want to happen is for selected records to be updated with a value selected in a combobox from the form. I have the checkboxes displaying fine on the grid with this line of code.

 columns.Template(@<checked>@Html.CheckBox("selected", new { id = @item.ID })</checked>).Title("Select");

the problem is when the update button is clicked I do not know how to iterate through the rows in the kendo grid from the controller and grab those records that will be updated .

I tried something like this but cant get it to work "Cannot convert type char....

foreach (GridRow<Bin_BudgetView> row in fc["kendoGrid"])

Can someone please give me a simple solution to iterate through a kendo grid from the controller and update those records that are checked?

Also If I wanted to check or uncheck all of the records in the grid how would I go about that?

thanks for your help

Paul
Rosen
Telerik team
 answered on 23 Oct 2014
1 answer
112 views
I have put together a simple app which include a few or the "out-of-the-box" index views. I would like to swap the table in these views for the Telerik grid.

I have the following action in the controller:

// GET: Assets
public ActionResult Index()
{
     
    var assets = db.Assets.Include(a => a.Equipment).Include(a => a.Owner).Include(a => a.ServiceCompany).Include(a => a.Site);
     
    return View(assets.ToList());
}

I have swapped out the table code and copied the following from the demo

@(Html.Kendo().Grid(Model)
    .Name("Grid")
    .Columns(columns =>
    {
        columns.Bound(p => p.Site).Title("Site").Width(130);
        columns.Bound(p => p.Location).Title("Location").Width(130);
        columns.Bound(p => p.Description).Title("Decriptopn").Width(130);
        columns.Bound(p => p.InstallDate).Title("Install Date").Width(130);
        columns.Bound(p => p.SerialNo).Title("Serial Number").Width(130);
    })
    .Pageable()
    .Sortable()
    .Scrollable(scr => scr.Height(430))
    .Filterable()
    .DataSource(dataSource => dataSource
        .Ajax()
        .PageSize(20)
        .ServerOperation(false)
     )
)


When I try to view the 

System.InvalidOperationException was unhandled by user code
  HResult=-2146233079
  Message=A circular reference was detected while serializing an object of type 'System.Data.Entity.DynamicProxies.Asset_ED2530D1AC046011EB9F014D634FE570012E36DD19818476965A4BF61659B91A'.
  Source=System.Web.Extensions
 
I changed the HTML helper line to

@(Html.Kendo().Grid<AMScan.Models.Asset>()

which then rendered the grid on the page without the exception however there was no data.

Can you please tell me what I am doing wrong.
Dimiter Madjarov
Telerik team
 answered on 23 Oct 2014
3 answers
400 views
Given the following data model:

     Product
          Id (int)
          Name (string)
          VapourPressure (double)
          Components (IEnumerable<Component>)

      Component
          Id (int)
          Name (string)

I want to create a grid using these that displays the data. In this case Name, VapourPressure, Components. The components should be displayed in a HTML list. Of course I want to be able to filter on the presence of 'components' in the Components.

My current code is attached.

I have got displaying the components working, although I needed a workaround because any '+' characters are stripped from the template parameter. If there is another way to do this I would like to hear it.

What I don't have working is the filtering on components. First of all the drop down doesn't work correctly because the options loaded from AJAX are not shown. If the dropdown is instantiated outside the grid everything works fine.  How do I get the dropdown working?
Alexander Popov
Telerik team
 answered on 23 Oct 2014
2 answers
234 views
For anybody who finds this problem, the fix is to add the following line to the bundleconfig.cs file:

bundles.IgnoreList.Ignore("*.unobtrusive-ajax.min.js", OptimizationMode.WhenDisabled);


This will prevent the unobtrusive ajax script from loading twice (i.e. the minified and non-minified) in debug mode, which is what causes the double postback.

Alternatively, just remove the non minified script from the project (this obviously has implications for debugging, if you're inclined to debug the scripts included in the project template).

Telerik - this ought to be included in your how-to guide.
Sebastian
Telerik team
 answered on 23 Oct 2014
1 answer
98 views
Hi all. I am testing the menu kendo framework and I am having a issue. In IE 11, late Firefox version and Safari, does not happen, only happens in Google Chrome.

With normal zoom (100%) the menu options seems to be good. But when I set the zoom to 125%, only in some menu items, the lefthand border disappear, even the option top border. It appears again when I set the zoom to 130% or less (120% e.g.).

It also happens when I restore down the window. I send an image with the behaviour.

Anyone had the same problem?
Dimo
Telerik team
 answered on 23 Oct 2014
3 answers
134 views
I am using UI for ASP.NET MVC Q2 2014.
In the attached project, I am using editor template "EventEditor". In this, I have 2 dropdown and 1 multiselect.
The dropdown is working correctly, however multiselect is NOT working. I do NOT get values in the kendogrid Update/Create (Insert methof of Events Controller). I just get count and the values in the list are null. I tried using int (for Id) and also string but nothing worked correctly.
I also have used .Data("Serialize") but no help..
Please solve my request at the earliest.

Thanks

Vladimir Iliev
Telerik team
 answered on 23 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?