Telerik Forums
UI for ASP.NET MVC Forum
0 answers
205 views
Hi,
Is there any way to wrap request parateters as JSON while using MVC notation for dataSource?

For example, this grid will send parameters as contentType:application/x-www-form-urlencoded, but I'd like to send them as contentType: application/json.

In js notation I can use 'parameterMap' and stringify parameters there, but how I may handle this here:

@(Html.Kendo().Grid(Model).Name("Grid")
          .Columns(columns =>
              {
                  columns.Bound(p => p.Id);
                  columns.Bound(p => p.Name);
              })
          .Groupable()
          .Pageable()
          .Sortable()
          .Scrollable()
          .Filterable()
          .DataSource(dataSource => dataSource.Ajax().Read(read => read.Url("Services/DataService.asmx/GetData"))
          ))

Thanks!
Dima
Top achievements
Rank 1
 asked on 29 Oct 2012
1 answer
973 views
I have a KendoUI Grid.


        @(Html.Kendo().Grid<EntityVM>()
            .Name("EntitesGrid")
                        .HtmlAttributes(new { style = "height:750px;width:100%;scrollbar-face-color: #eff7fc;" })
            .Columns(columns =>
            {
                columns.Bound(e => e.Id).Hidden().IncludeInMenu(false);
                columns.Bound(e => e.EntityVersionId).Hidden().IncludeInMenu(false);
                columns.Bound(e => e.Name).Width("70%").Title("Entity Name");
                columns.Bound(e => e.EIN).Width("30%");
            })
.ToolBar(toolBar => toolBar.Template("<a class='k-button k-button-icontext k-grid-add' id='addEntity'><span class='k-icon k-add'></span>Entity</a>" +
     "<a class='k-button k-button-icontext' id='editEntity'><span class='k-icon k-edit'></span>Edit</a>"))
            .DataSource(dataSource => dataSource
            .Ajax().ServerOperation(false)
            .Model(model => model.Id(e => e.Id))
            .Read(read => read.Action("GetEntities", "Entity", new { projectId = Request.QueryString[DataKeyNameConstants.ProjectId] })))
            .Sortable()
            .Scrollable()
            .Filterable()
            .Resizable(resize => resize.Columns(true))
            .Reorderable(reorder => reorder.Columns(true))
            .ColumnMenu()
            .Selectable(s => s.Mode(GridSelectionMode.Multiple))
            .Events(events => events.Change("entSelChange"))
    )

now, I need to get the value of EntityVersionId from the selected Row. but not sure how to do it.

here's my javascript function

$("#editEntity").click(function () {
 
    var entityGrid = $("#EntitesGrid").data("kendoGrid");
 
    // what should I do from here
});


Eric J at FADV
Top achievements
Rank 1
 answered on 27 Oct 2012
0 answers
122 views
hi,
i have an issue about uploading file using kendoWindow.
The content is loaded from a partial view, and since the form contains an input[type=file] element, its 'enctype' attribute should be 'multipart/form-data', so it can't be an ajax form, just be a basic html form. The issue is that when i submit the form, the whole page is replaced with returned content from the handler function in related controller code. How to make the page stayed not replaced & refreshed partly?
thanks for replying.
jimbung
Top achievements
Rank 1
 asked on 27 Oct 2012
1 answer
243 views
I am looking for the clarification for the below questions for Web version on KendoUI. 

1.> Drag and drop of Image is supported in the Web Kendo UI Editor control? 

2.> Web Kendo UI Editor control support for inserting Image and Videos. 

3.> Web Kendo UI Editor control  support on PAD browser? 

help us to clarify above questions. 

Dustin
Top achievements
Rank 1
 answered on 26 Oct 2012
3 answers
2.6K+ views
Hi,

I am using the kendo ui ASP.NET MVC Razor helper. Everything works great, except the progress spinner doesn't show during the initial grid load or during a refresh. This leads to a pretty poor user experience if it takes a few seconds for data to load.

Can I force the progress spinner to display during initial load / refresh somehow to provide a better user experience?

Here is how I have things setup:

@(Html.Kendo().Grid<Models.IndividualModel>()   
                .Name("IndividualsGrid")
                .Columns(columns =>
                {
                    columns.Bound(c => c.Id)
                            .ClientTemplate("<a href='/viewMember.aspx?MemberID=#=Id#'>View</a>")
                            .Width(45)
                            .Filterable(false)
                            .Groupable(false)
                            .Sortable(false)
                            .Title("");
                    columns.Bound(c => c.Id)
                            .ClientTemplate("<a href='/editMember.aspx?MemberID=#=Id#'>Edit</a>")
                            .Width(40)
                            .Filterable(false)
                            .Groupable(false)
                            .Sortable(false)
                            .Title("");
                    columns.Bound(c => c.FirstName);
                    columns.Bound(c => c.LastName);
                    columns.Bound(c => c.StreetAddress);
                    columns.Bound(c => c.City);
                    columns.Bound(c => c.Phone);
                })
                .Sortable()
                .Scrollable()
                .Filterable()
                .Groupable()
                .HtmlAttributes(new { style = "height: 600px" })
                .ClientDetailTemplateId("HouseholdDetailTemplate")
                .DataSource(dataSource => dataSource
                    .Ajax()
                    .Read(read => read.Action("IndividualSearchResults_AjaxBinding", "Church")
                    .Data("GetIndividualsSearchParameters"))
                    )
            )

function GetIndividualsSearchParameters() {
    var memberTypeFilters = $("#ddlMemberTypes").multiselect("getChecked").map(function () {
        return this.value;
    }).get();
    var ageCategoryFilters = $("#ddlAgeCategories").multiselect("getChecked").map(function () {
        return this.value;
    }).get();
    var genderFilters = $("#ddlGenders").multiselect("getChecked").map(function () {
        return this.value;
    }).get();
 
    var nameToSearch = $('#txtbxSearchByName').val();
 
    return {
        nameToSearch: nameToSearch,
        memberTypes: memberTypeFilters,
        ageCategories: ageCategoryFilters,
        genders: genderFilters
    };
}
 
function BindGrid() {
    grid = $("#IndividualsGrid").data("kendoGrid");
    grid.dataSource.read();
    grid.refresh();
Vladimir Iliev
Telerik team
 answered on 26 Oct 2012
0 answers
131 views
 if you look at the attached image i have a problem with the size of the input boxes compared to the grid. they are soo big they cause stuff not to fit on the page. How can i change thier size?
mike
Top achievements
Rank 1
 asked on 26 Oct 2012
1 answer
156 views
is there a way to add a row?
mike
Top achievements
Rank 1
 answered on 26 Oct 2012
1 answer
98 views
I was wondering if it was possible to have a grid that was empty that i could add multiple records on and then save those to the correct database table but not display what is already saved. I essentially want to be able to do a bulk add.

thanks.
mike
Top achievements
Rank 1
 answered on 26 Oct 2012
2 answers
204 views

How to perform read action in inCell editing grid after Save Changes button is pressed. After data is saved to database I would like to perform Read action.

Is that possible & how? Where do I put the code? 

I have the newest version of Kendo UI, note that I use helpers (MVC wrappers).

Goran
Top achievements
Rank 1
 answered on 26 Oct 2012
1 answer
527 views
Hi

I have a requirement where a command column (delete) needs to be visible for a row only if a column value in the row meets certain criteria.
.Columns(columns =>
{
columns.Bound(o => o.PitID).Visible(false);
columns.Bound(o => o.VersionID).Width(50);
columns.Bound(o => o.VersionNote);
columns.Bound(o => o.ReleasedBy);
columns.Bound(o => o.ReleasedDateDisplay);
columns.Bound(o => o.Deletable).Visible(false);
columns.Command(command => command.Custom("Select").Click("showIssue")).Width(100).Title("Select");
columns.Command(command => command.Custom("Delete").Click("Delete")).Width(100).Title("Delete");
}).

The delete command needs to visible only if  Deleteable is true.

thanks
Petur Subev
Telerik team
 answered on 26 Oct 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
Dialog
MultiColumnComboBox
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
Security
ColorPicker
DateRangePicker
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
SmartPasteButton
PromptBox
SegmentedControl
LLM Kit
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?