Telerik Forums
UI for ASP.NET MVC Forum
1 answer
91 views
I copied the ListView example - and each time I edit a record, the save and cancel buttons are somehow obscured from view so I can never save.


However I define my EditorTemplate, whenever I edit my record, the same thing happens...

How can you 'control' your controls to stay nicely in the 'record box' like when you're just viewing the records?
Eric
Top achievements
Rank 2
 answered on 30 Jul 2014
1 answer
146 views
Hi,
I'm following the example "binding markers to remote data"
My question is: is it possible to center the map programmatically after the Datasource.read is being called? My datasource contains a list of possible stores. However, I would like to center the map (add a marker) with the initial longitude/latitude of my search request?

Next question : would it be possible (after datasource.read) to center/zoom the map around that layer?

So my code looks more or less as follow:
 @(Html.Kendo().Map()
    .Name("map")
    .Zoom(3)
    .Layers(layers =>
    {
        layers.Add()
            .Type(MapLayerType.Tile)
            .UrlTemplateId("http://#= subdomain #.tile.openstreetmap.org/#= zoom #/#= x #/#= y #.png")
            .Subdomains("a", "b", "c")
            .Attribution("&copy; <a href='http://osm.org/copyright'>OpenStreetMap contributors</a>");

        layers.Add()
            .Type(MapLayerType.Marker)
            .DataSource(dataSource => dataSource
                  .Read(read => read.Action("_StoreLocations", "Order", new { OrderId = Request.QueryString["OrderId"] }))
                  )
            .LocationField("LatLng")

            .TitleField("Name");

    })
Hristo Germanov
Telerik team
 answered on 30 Jul 2014
1 answer
111 views
Is it possible to show inline editable grid in popup editor of parent grid?
There is no success so far - popup window is not showing up but it is showed inline and parent table layout is broken.

Similar question can be found here: 
http://www.telerik.com/forums/editable-grid-in-a-grid-s-popup-editor
http://stackoverflow.com/questions/13402092/editable-grid-in-a-grids-popup-editor
Nikolay Rusev
Telerik team
 answered on 30 Jul 2014
2 answers
187 views
I'm using the MVC TreeView and I'm binding to a datasource as below:

@(Html.Kendo().TreeView()
        .Name("tvDocumentDirs")
        .DataTextField("Name")
        .DataSource(dataSource => dataSource
            .Model(m => m.Id("Path").HasChildren("HasChildren"))
            .Read("ReadDirectoryGetDirs", "Documents").Events(e=>e.RequestEnd("tvDocumentDirs_onRequestEnd").Error("tvDocumentDirs_onError"))
        )
        .Events(events => events
          .Select("tvDocumentDirs_onSelect")
          .Change("tvDocumentDirs_onChange")
        )
    )


The .Read("ReadDirectoryGetDirs", "Documents") - everything works fine. However in the controller action if any error occurs the TreeView hangs (waits indefinitely) what I want to do is handle any errors in the controller action return the error to page, handle the error and then cancel the databind on the treeview. Is it possible to cancel the databind for the treeview?
Petur Subev
Telerik team
 answered on 30 Jul 2014
1 answer
99 views
We use Kendo menu to create main menu items. Some of the menu items have a text box for user to enter search data. The menu is working on IE (version 9.0.8112.16421) but not in Chrome (version 36.0.1985.125). We are using version 2014.1.415.340 of the Kendo.Mvc.dll assembly.

Here is the code for creating the menu:

@(Html.Kendo().Menu()
        .Name("MainMenu2")
        .Items(mainMenu =>
        {
            mainMenu.Add()
                .Text("Order Maintenance");
            mainMenu.Add()
                .Text("Admin")
                .Items(menuItem =>
                {
                    menuItem.Add()
                       .Text("Branch");
                    menuItem.Add()
                        .Text("Container");
                    menuItem.Add()
                        .Text("Employee");
                    menuItem.Add()
                        .Text("Event");
                    menuItem.Add()
                        .Text("Product");
                });
            mainMenu.Add()
                .Text("Invoicing");
            mainMenu.Add()
                .Text("Go To Order")
                .Content(@<text>
                            <table>
                                <tr>
                                    <td>
                                        <input id="DirectOrderNumber" type="text" />
                                        <br />
                                        <span>Order Number</span>
                                    </td>
                                    <td>
                                        <input id="DirectOrderNumberGoButton" type="button" value="Go" />
                                    </td>
                                </tr>
                            </table>
                          </text>
                        );
                        
            mainMenu.Add()
                .Text("Go To Container")
                .Content(@<text>
                            <table>
                                <tr>
                                    <td>
                                        <input id="DirectContainerNumber" type="text" />
                                        <br />
                                        <span>Container Number</span>
                                    </td>
                                    <td>
                                        <input id="DirectContainerNumberGoButton" type="button" value="Go" />
                                    </td>
                                </tr>
                            </table>
                          </text>
                        );
                
            mainMenu.Add()
                .Text("Go To Invoice")
                .Content(@<text>
                            <table>
                                <tr>
                                    <td>
                                       <input id="DirectInvoiceNumber" type="text" />
                                        <br />
                                        <span>Invoice Number</span>
                                    </td>
                                    <td>
                                        <input id="DirectInvoiceNumberGoButton" type="button" value="Go" />
                                    </td>
                                </tr>
                            </table>
                          </text>
                        );
        }))


Please advise how it can be fixed.

Thanks
Iliana Dyankova
Telerik team
 answered on 30 Jul 2014
3 answers
473 views
We are using kendo ui mvc grids for our development.. We have a requirement for importing and exporting excel data to/from kendo ui mvc grid... I search with the help of google regarding this alot..but unfortunately could not able to find enough references for this... Can you please give me a support to complete this task...
Alexander Popov
Telerik team
 answered on 30 Jul 2014
18 answers
595 views
Yours Bootstrap theme works fine side by side with Twitter Bootstrap 2. There were a few problems, but I quickly resolve them with very little css code. Bootstrap 3 contains many breaking changes and of course Kendo UI Bootstrap theme does not work now at all.
Dimo
Telerik team
 answered on 30 Jul 2014
1 answer
167 views
Hello everybody,

I'm new to Telerik and SignalR. Right now we are working on a project for a customer who wants to rewrite his app that was using old Telerik. There is one element that I really need help with. They want to have universal grid that will accept all kind of data, so every user can define their own grid for example for ShopItems, so they will choose for example: which columns to display, in what kind of order etc. How grid should look like is supposed to be defined in xml profile file, so we will have section, which columns to display, from which table. On top of that they want to have SignalR or WebSockets, so the user knows about updates. My question is how can I accomplished all of that? How should I get the data, so it will be optimal ? Is there a way to use Linq with that? I studied examples and got to the moment when I can use dynamic columns, and bind it by ajax, but I still don’t know how to get only data that I need based on list of tables and columns. I will be glad for any help. If you have any questions, please ask
Vladimir Iliev
Telerik team
 answered on 30 Jul 2014
2 answers
103 views
Hi, I've created a Grid within a TabStrip and I load the data using
Ajax. This works when I use a view but when I place the grid in a
partial view the browser asks if I want to save the json file being
returned. Obviously I've missed something simple but I can't see what?


Simon
Top achievements
Rank 1
 answered on 30 Jul 2014
1 answer
453 views
I have a kendo grid in  a partial View bound to Ajax data source.
When the partial view is rendered, it only displays an empty grid without data in it.
Can't i do an server side Ajax binding (json) for the grid in a partial View ?

This only works when the grid is on a view associated with Home controller and not in a partial view.
How do i get it to work in a partial view ? 


Below is what i have in the Partial View.

@using Kendo.Mvc.UI

<div id="Main">
    Kendo Grid Partial View Demo
</div>
<br />
<div id="Grid">

    @(Html.Kendo().Grid<Mvc4SampleApplication.Models.Product>()
      .Name("grid")
      .Pageable(pager => pager
            .Messages(messages => messages.Empty("No data")))
      .DataSource(dataSource => dataSource // Configure the grid data source
          .Ajax()// Specify that ajax binding is used
          .Read(read => read.Action("Products_Read", "Home")) // Set the action method which will return the data in JSON format
          //.Model(model => model.Id(product => product.ProductID))
               .Model(model =>
               {
                   //The unique identifier (primary key) of the model is the ProductID property
                   model.Id(product => product.ProductID);
                   // Declare a model field and optionally specify its default value (used when a new model instance is created)
                   model.Field(product => product.ProductName).DefaultValue("N/A");
                   // Declare a model field and make it readonly
                   model.Field(product => product.UnitsInStock).Editable(false);
               }
              )
       )
      .Columns(columns =>
      {
          // Create a column bound to the ProductID property
          columns.Bound(product => product.ProductID);
          // Create a column bound to the ProductName property
          columns.Bound(product => product.ProductName).ClientTemplate("<strong>#: ProductName #</strong>");
          // Create a column bound to the UnitsInStock property
          columns.Bound(product => product.UnitsInStock);

          // Define a template column - it needs a templated razor delegate
          columns.Template(@<text>  @Html.ActionLink("About", "Home", new { id = item.ProductID }) </text>);
      })
      .Pageable() // Enable paging
      .Sortable() // Enable sorting                           
    )
</div>

 

And below is the code to get Json Data for kendo grid in the Home Controller in my MVC app.

public ActionResult Products_Read([DataSourceRequest]DataSourceRequest request)
        {
            List<Product> ProductList = new List<Product>();

            for (int i = 1; i <= 10; i++)
            {
                Product p = new Product();
                p.ProductID = i;
                p.ProductName = "Product_" + i;
                p.UnitsInStock = 5;

                ProductList.Add(p);
            }
            {
                IEnumerable<Product> products = ProductList;
                DataSourceResult result = products.ToDataSourceResult(request);
                return Json(result);
            }
        }

Any Help will be greatly appreciated.
Thanks in Advance!

Vladimir Iliev
Telerik team
 answered on 30 Jul 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
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
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?