Telerik Forums
Kendo UI for jQuery Forum
0 answers
137 views
I can't seem to get any data from the server in the request.parts after specifying method="Post"  and
contenttype="multipart/form-data"

<html>
    <head>
        <title></title>
        <script src="js/lib/jquery/jquery-1.8.1.min.js"></script>
        <script src="js/lib/kendoui/kendo.web.min.js"></script>
        <link href="css/KendoUI/kendo.common.css" rel="stylesheet" />
        <link href="css/KendoUI/kendo.blueopal.css" rel="stylesheet" />
    </head>
    <body>
        <div id="example" class="k-content">
            <div id="grid"></div>
 
            <script>
                $(document).ready(function() {
                    var crudServiceBaseUrl = "http://127.0.0.1:8081/cors", dataSource = new kendo.data.DataSource({
                        transport : {
                            read : {
                                url : crudServiceBaseUrl + "/People",
                                dataType : "json"
                            },
                            update : {
                                contentType: "multipart/form-data",
                                type: "POST",
                                url : crudServiceBaseUrl + "/People/?$method=update",
                                dataType : "json",
                                 data: {
                                        __KEY: 26,
                                        __STAMP: 23,
                                        ID: 26,
                                        firstName: "fgsdf44",
                                        lastName: "dsdfgdfg"
                                        }
                            },
                            destroy : {
                                url : crudServiceBaseUrl + "/People(28)/?$method=delete",
                                dataType : "json"
                            },
                            create : {
                                url : crudServiceBaseUrl + "/People/Create",
                                dataType : "json"
                            },
                            parameterMap : function(options, operation) {
                                if (operation !== "read" && options.models) {
                                    return {
                                        models : kendo.stringify(options.models)
                                    };
                                }
                            }
                        },
                        schema : {
                            data : "__ENTITIES",
                            model : {
                                id : "ID",
                                fields : {
                                    __KEY : {
                                        editable : false,
                                        nullable : true
                                    },
                                    __STAMP : {
                                        editable : false,
                                        nullable : true
                                    },
                                    ID : {
                                        editable : false,
                                        nullable : true
                                    },
                                    firstName : {
                                        validation : {
                                            required : true
                                        }
                                    },
                                    lastName : {
                                        validation : {
                                            required : true
                                        }
                                    }
                                }
                            }
                        }
                    });
 
                    $("#grid").kendoGrid({
                        dataSource : dataSource,
                        pageable : true,
                        height : 400,
                        toolbar : ["create"],
                        columns : ["__KEY", "__STAMP", "ID", "firstName", "lastName", {
                            command : ["edit", "destroy"],
                            title : " ",
                            width : "210px"
                        }],
                        editable : "inline"
                    });
                });
            </script>
        </div>
 
    </body>
</html>

Daniel
Top achievements
Rank 2
 asked on 20 Sep 2012
0 answers
76 views
columns.Bound(p => p.StartDate).Format("{0: yyyy-MM-dd}").Title("Datum");
columns.Bound(p => p.StartDate).Format("{0:hh:mm}").Title("Tid");

Is there some way that i can name 2 colums that are the same? Like this

columns.Bound(p => p.StartDate).Format("{0: yyyy-MM-dd}").Title("Datum").ID("Date");
columns.Bound(p => p.StartDate).Format("{0:hh:mm}").Title("Tid").ID("Time");

and then use them in a template file like:

#= Time #
#= Date #
Stefan
Top achievements
Rank 2
 asked on 20 Sep 2012
0 answers
153 views
Here is my dropdown:

@(Html.Kendo().DropDownList()
        .Name(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))
        .DataValueField("TaxImpsnId")
        .DataTextField("TaxImpsnName")
        .DataSource(source =>
        {
            source.Read(read =>
            {
                read.Action("_AjaxMethod", "MyController", new { lookupId= 1 });
            }).ServerFiltering(true);
        })
)

My dropdown is actually a column in a Kendo grid.  Instead of hard coding the lookupId =1 that is passed into the Ajax method in the controller, I want to take it from another field on the grid of the currently selected row.

So when the user changes the row of the grid, the drop down should reload passing in the lookupId of the currently selected grid row to the controller.

Thanks for the help.

carlg
Top achievements
Rank 1
 asked on 20 Sep 2012
2 answers
240 views
I've attached a test project and the grid/dataSource is hitting my MVC controller but not data is returned or showing in the grid.  Can someone please help me understand the problem?  See attached.
Amol G
Top achievements
Rank 2
 answered on 20 Sep 2012
5 answers
84 views
Hi 
I have a project that could use your Kendo UI.
Your examples, on Crome everything work as it should.
On IE - nothing work at all. If I purchase this UI - the IE issues are expected or what?

I want my page to work on mobile and web as well.

Is something wrong with My IE or Kendo not fully support IE?

Best,
Kamen Bundev
Telerik team
 answered on 20 Sep 2012
4 answers
483 views
Hello, 

I'm working with an autocomplete control with a datasource colection of objects with a "name" and "code" propertie. I'm displaying the name in the autocomplete.

I'm wondering how to get the Index of the item that i'm showing in the input in the change event to get the dataitem of that element without accessing to the datasource. Must be the change event, beacuse the select event is not what i need... because is fiered only when you select the element in the list and not when you type in the input.

Thanks a lot.
Guillermo Polit
Georgi Krustev
Telerik team
 answered on 20 Sep 2012
1 answer
95 views

Hi,
trying to port an Telerik MVC Grid.
But there is no option to change the button type.

.Columns(cols =>
{
    ....
    cols.Command(commands =>
    {
     commands.Edit().ButtonType(GridButtonType.Image);
     commands.Delete().ButtonType(GridButtonType.Image);                                   
    })
})
.ToolBar(tb =>
{
    tb.Insert().ButtonType(GridButtonType.Image);
})

Please tell me how to do this...
Mario
Top achievements
Rank 1
 answered on 20 Sep 2012
2 answers
141 views
Hi,
how can i do multi column header like:
asp net ajax multi colum demo
Mario
Top achievements
Rank 1
 answered on 20 Sep 2012
2 answers
453 views
Good morning everyone,


I am currently using the licensed version of Kendo UI Complete for ASP.NET MVC (Q2 2012) and trying to figure out how to change the ButtonType for the Grid Commands.


Before this, I was using the licensed version of Telerik Extensions for ASP.NET MVC.  Below is the code I had for it:

@{Html.Telerik().Grid(Model)
    .Name("grdAllUsers")
    .DataKeys(keys => keys.Add(k =>
        k.Id)
    )
    .Columns(columns =>
    {
        columns.Bound(o => o.FirstName)
            .Width(150);
        columns.Bound(o => o.LastName)
            .Width(150);
        columns.Bound(o => o.EmailAddress)
            .Width(200);
 
        columns.Command(commands =>
        {
            commands.Edit().ButtonType(GridButtonType.Image);
            commands.Delete().ButtonType(GridButtonType.Image);
        })
        .Width(70)
        .HtmlAttributes(new { style = "text-align:center" });
    })
    .NoRecordsTemplate(@<text>No User records to display.</text>)
    .Pageable(paging =>
        paging.PageSize(15)
    )
    .Sortable()
    .Filterable()
    .Render();
}


The below is the current Kendo UI code:

@{Html.Kendo().Grid(Model)
    .Name("grdAllUsers")
    .Columns(columns =>
    {
        columns.Bound(o => o.FirstName)
            .Width(150);
        columns.Bound(o => o.LastName)
            .Width(150);
        columns.Bound(o => o.EmailAddress)
            .Width(200);
 
        columns.Command(commands =>
        {
            commands.Edit().ButtonType(???);
            commands.Delete().ButtonType(???);
        })
        .Width(70)
        .HtmlAttributes(new { style = "text-align:center" });
    })
 
    .Pageable(paging =>
        paging.PageSize(15)
    )
    .Sortable()
    .Filterable()
    .Render();
}

When I am using the "Edit" and "Delete" command for the Kendo UI Grid, I need to only use image button type.  How do i change it from ImageAndText (which seems to be the default), to Image button type only?  How can i make only the images show for these Grid command buttons like "delete", "edit", etc.  ??

Thank you very much for your help
Mario
Top achievements
Rank 1
 answered on 20 Sep 2012
2 answers
385 views
good morning everyone,

i just read and found out that :
"Buttons related to editing now utilize both images and text. There are no text-only or image-only buttons available" at the below URL

http://docs.kendoui.com/getting-started/using-kendo-with/aspnet-mvc/migration/widgets/grid#editing

Since it has been implemented like that, is there some sort of work around or way to not have both images and text but only the images for the "Edit" and "Delete" grid buttons when doing Grid editing?????

I know that the Telerik Extensions for ASP.NET MVC Grid allowed for "Images and Text", "TExt" only, and "Image" only:

columns.Command(commands =>
        {
            commands.Edit().ButtonType(GridButtonType.Image);
            commands.Delete().ButtonType(GridButtonType.Image);
        })

For my purposes, I really need only the images for the delete and edit button.

Thank you very much for your help

Mario
Top achievements
Rank 1
 answered on 20 Sep 2012
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
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
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
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?