Telerik Forums
UI for ASP.NET MVC Forum
2 answers
126 views

I'd like to create a product filtering mechanism like Bestbuy, Amazon, etc. use, where the user can check various filter nodes (on the left side of the screen) and click Apply to have the resulting products (in a grid) filtered.  Since I will need different levels of nested filtering, I thought that a TreeView would be the way to go.  I have my filters loaded into the TreeView, but now I want to implement a limit for how many filter criteria under a given node can be seen at one time...essentially listing the first 5, then having a "more..." or "see all..." button that the user can click in order to see all the filter nodes.  

Any suggestions as to how to go about implementing that?  Or, perhaps the TreeView is not the way to go for this kind of thing?

Thanks!

 

 

Peter Milchev
Telerik team
 answered on 26 Oct 2016
4 answers
1.4K+ views
Hello,

we try to add custom Buttons with Icons and no Text. Does anyone know how to solve this Problem?

By now, we use the following Code to show the Buttons:
<!--
columns.Command(commands =>
{
commands.Custom("CustomEdit").Text(“Edit”).Click("edit");
commands.Custom("CustomCopy").Text("Copy")).Click("copy");
commands.Destroy().Text("Delete");
}).HtmlAttributes(new { style = "text-align: center;" }).HeaderTemplate("<div style='text-align: center;'>" + "Options" + "</div>").Width(240);
-->
Dimiter Madjarov
Telerik team
 answered on 26 Oct 2016
7 answers
1.0K+ views
Hi,

I've got the next problem:  'Sorts' parameter of DataSourceRequest is null.
I've found a few threads here with similar issues but the only difference is that i'm not using MVC wrapper for Kendo Grid. Also I can confirm that MVC wrapper works perfectly in my case, but I need to manage grid without it.

Here is the simple sample of what i've got now. What I'm doing wrong?

My scripts bundle:
- jquery.min.js 
- kendo.all.min.js 
- kendo.aspnetmvc.min.js

Kendo Grid declaration:
 $('#cars').kendoGrid({
            pageable: true,
            sortable: true,
            dataSource: new kendo.data.DataSource({
                serverPaging: true,
                serverSorting: true,
                schema: { data: "Data",  total: "Total" },
                transport: {
                    read: {
                        url: '@Url.Action("GetCars")',
                        contentType: "application/json; charset=utf-8",
                        type: "POST"
                    },
                    parameterMap: function (data) {
                        return JSON.stringify({ request: data }); 
                    }
                }
            })
        });

Action:
public DataSourceResult GetCars([DataSourceRequest]DataSourceRequest request)
{
    ............................
}

HTTP request parameters:
{"request":{"sort":[{"field":"Name","dir":"desc"}]}}

Thanks!
Kostadin
Telerik team
 answered on 26 Oct 2016
3 answers
886 views

Hi,

I have a requirement where i want to show filters in headers.

scenario : i have kendo grid with 10 columns.

first column header should appear as a dropdown in header. user can use this dropdown for filter.

second column header should appear as text box in header. user will use textbox for filter.

remaining 8 header columns should be with no filters.

please see attachment. that is exactly my header columns should look like. i.e. first two with dropdown and textbox filter and rest normal.

i have seen this example http://demos.telerik.com/kendo-ui/grid/filter-row . however in this example filter rows appear as a seperate row and not in header.

 

please guide

 

 

 

 

 

Vessy
Telerik team
 answered on 25 Oct 2016
4 answers
277 views

In the demo (http://demos.telerik.com/kendo-ui/editor/immutable-elements) or the preview in the api reference (http://docs.telerik.com/kendo-ui/api/javascript/ui/editor#configuration-immutables) the immutable elements (html elements that have the contenteditable="false" attribute) can be deleted.

They can be selected by double clicking and deleted by pressing Delete. Or just selecting everything in the editor and pressing Delete. Tested with Chrome 53 and Internet Explorer 11.

I am confused as the description for Immutable Elements states:

"The Kendo UI Editor widget and its Immutable Elements feature enables you to predefine elements in the content area that cannot be edited by the end user."

I assumed that edited also meant deleted. Is this the intended behaviour?

Ianko
Telerik team
 answered on 25 Oct 2016
1 answer
269 views

i am building an asp.net MVC application. Requirement is to have kendo grid's header column titles coming from server and not hard coded. 

how to achieve this using asp.net MVC. please guide.

 

 

Konstantin Dikov
Telerik team
 answered on 25 Oct 2016
1 answer
157 views

Hello,

I'm using version 2016.3.914.545, which I believe is the latest version, and the "ClearButton" method is not available as described by the Telerik docs: http://docs.telerik.com/kendo-ui/api/aspnet-mvc/Kendo.Mvc.UI.Fluent/AutoCompleteBuilder#methods-ClearButton(System.Boolean)

Please advise.

In addition, is there a default way to have this control set focus to itself when the 'ClearButton' is pressed or do I have to do something custom in the 'Change' event?

Thanks,
Mike

 

Rumen
Telerik team
 answered on 24 Oct 2016
2 answers
147 views

Can anyone help me with this issue.

I only can upload image in PNG format, but when i uplaod an image in JPG or GIF format the grid doesn't show me anything.

I try to convert JPG to PNG but is the same and don't show anything.

Any suggest of how can i do this.

This is my code example:

This is my grid in view:

@(Html.Kendo().Grid<TelerikMvcApp4.Models.PublicacionImagenModel>()
    .Name("grid")
    .HtmlAttributes(new { style = "height:335px;" })
    .Columns(columns =>
    {
        columns.Template(e => { }).ClientTemplate(" ").Width(140).Title("Imagen").HtmlAttributes(new { style = "height:40px" });
        columns.Command(command => command.Destroy()).Width(110);
    })
    //.AutoBind(false)
    .ClientRowTemplate(
        "<tr id='a' data-uid='#: uid #'>" +
            "<td class='photo'>" +
            "<img src='data:image/png;base64,#: imagen64 #' alt='#: data.Puim_clave_pub #' style='width: 180px; height:100px;'/>" +
            "</td>" +
         "<td style='width:80px'>" +
             "<a class='k-button k-button-icontext k-grid-delete'" +
         "<span class='k-icon k-delete'></span>Eliminar</a>" +
         "</td>" +
         "</tr>"
    )
    .DataSource(dataSource => dataSource
        .Ajax()
        .Batch(true)
        .PageSize(10)
        .ServerOperation(false)
        .Model(model =>
        {
            model.Id(p => p.Puim_clave);
        })
        .Read(read => read.Action("RowTemplate_Read", "Gestion"))
        .Destroy(destroy => destroy.Action("Editing_Destroy_Img", "Gestion"))

    )
    .Scrollable()
                )

And this is the controller action:

[AcceptVerbs(HttpVerbs.Post)]
        public ActionResult Editing_Destroy_Img([DataSourceRequest] DataSourceRequest request, [Bind(Prefix = "models")]IEnumerable<TelerikMvcApp4.Models.PublicacionImagenModel> expedientes)
        {
            string sqlDelete = "delete from gmc_publicacion_imagen where puim_clave = :deletePub";

            HttpCookie authCookie = Request.Cookies[FormsAuthentication.FormsCookieName];
            FormsAuthenticationTicket authTicket = FormsAuthentication.Decrypt(authCookie.Value);

            OracleConnection con = new OracleConnection(authTicket.UserData.ToString());
            OracleCommand cmd = new OracleCommand(sqlDelete, con);
            cmd.Parameters.Add(new OracleParameter("deletePub", OracleDbType.NVarchar2));

            try
            {
                con.Open();
                Permisos.OtorgarPermisos(con);
                //if (expedientes != null && ModelState.IsValid)
                //{
                foreach (var exp in expedientes)
                {
                    cmd.Parameters["deletePub"].Value = exp.Puim_clave;
                    cmd.ExecuteNonQuery();

                }
                //}
            }
            catch (Exception ex)
            {
                Session["excepcionGestion"] = ex;
            }
            finally
            {
                con.Close();
                con.Dispose();
                cmd.Dispose();
            }

            return Json(expedientes.ToDataSourceResult(request, ModelState));
        }

 

I'll wait for your answers. Thanks

Konstantin Dikov
Telerik team
 answered on 24 Oct 2016
1 answer
312 views

Hello there,

I've a parent/child grid and I need to edit some columns in the child grids.

When the page load the server send all the parent and children data needed to work in the client side, I mean, the user will be able to expand any child grid without the need of reading the data from the server when expanding a grid because the data is already in the client.

I've attached a screenshot.

Currently I've populated the child grids and I'm able to edit the rows but every time I edit one row in any child grid and the editor lose the focus the parent grid collapse all expanded children keeping the edited values.

I've been working around that but I've no idea how to fix it and I've never used the Telerik controls.

Here I attached a clean project reproducing the issue https://www.dropbox.com/s/9g76yrbccwh11r3/TelerikMvcApp1.7z?dl=0

I really need to be able to edit the child grids without READING data from the server every time the user expand a child because the data in the child grid is built using heavy calculations and it takes a lot of time to finish.

Can anyone help me fix the problem?

Thank you.

Konstantin Dikov
Telerik team
 answered on 24 Oct 2016
0 answers
476 views

https://github.com/ftamminga/KendoUISignalRApp

This is a working example of a C# Asp.Net MVC5 application with a Telerik Kendo Grid that uses SignalR for data transport and synchronization. The examples from Telerik fail when using server side filtering and sorting out of the box. This example shows how to address the issues without too much problems. It only takes a small amount of work server side and a bit of javascript client side to make it work flawlessly.

Just open the application in two or more browser screens and play with some sorting, filtering. Add some entries, change them.
A short video of the basics can be seen here: https://goo.gl/m0hfmJ
It shows two synchronised browser screens. What's changing in one screen will reflect in the other.

The example uses the same database as the Telerik examples, to be found at https://github.com/telerik/ui-for-aspnet-mvc-examples/tree/master/grid/signalR-bound-grid You only have to change the connection string to a working database with the product samples.

Facturen
Top achievements
Rank 1
 asked on 24 Oct 2016
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
Upload
ComboBox
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
ListView (Mobile)
Pager
Accessibility
ColorPicker
DateRangePicker
Wizard
Security
Styling
Chat
MediaPlayer
TileLayout
DateInput
Drawer
SplitView
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Template
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
DateTimePicker
AppBar
BottomNavigation
Card
FloatingActionButton
Licensing
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
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?