Telerik Forums
UI for ASP.NET MVC Forum
1 answer
314 views
 I am using the ASP.NET MVC server side wrappers to create a page with a splitter control with 3 horizontal panes.  Each pane includes a single <div> with header text, and a Kendo Grid.

How do I get the grid to resize appropriately within each pane?
I have tried the following, but the splitterPane.scrollHeight value does not seem correct when the pane gets smaller.  For example, when the page starts all panes report a scrollHeight of 278, but if I move the top splitter up, the scrollheight of the top pane goes to up to 280 instead of being reduced..
I have tried to find another property/method other than scrollHeight and have been unsuccessful..
Any help is greatly appreciated!!!
function LayoutChange() {
    UpdateGridSize("#PendingVessels", 0);
    UpdateGridSize("#DueToSellVessels", 1);
    UpdateGridSize("#DueToShiftVessele", 2);
}
 
function UpdateGridSize(gridName, indexPane) {
    var splitter = $("#Main");
    var splitterPane = splitter.find(".k-pane")[indexPane];
    var splitterHeight = splitterPane.scrollHeight;
 
    var gridElement = $(gridName),
        dataArea = gridElement.find(".k-grid-content"),
        //gridHeight = gridElement.innerHeight(),
        otherElements = gridElement.children().not(".k-grid-content"),
        otherElementsHeight = 0;
    otherElements.each(function () {
        otherElementsHeight += $(this).outerHeight();
    });
 
    gridElement.height(splitterHeight - 25);  //-25 for the header item
    dataArea.height(gridElement.innerHeight() - otherElementsHeight);
}
Dimo
Telerik team
 answered on 27 May 2013
1 answer
228 views
When Adding a model to my grid via a controller action, it is possible that there may be more than one model created as a result of the process.

Normally, when only one item is added, we are sending the created or updated Model back to the View by calling:            
return this.Json((new Model[] { singleModelRecord }).ToDataSourceResult(request, this.ModelState));
Where "singleModelRecord" is a single model.

However, in this case, I would like to be able to send a List of Models back to the client, and have all the rows added to the grid, instead of having just one of them added, and needing to refresh the grid to see the rest.  This is what I was trying, but only one new model was being shown in the grid:

return this.Json(arrayOfModels.ToDataSourceResult(request, this.ModelState));
where "arrayOfModels" is the array of Models that have just been created.

Is this functionality supported?
Vladimir Iliev
Telerik team
 answered on 24 May 2013
1 answer
309 views
Hello Telerik Team,
I am a licensed user for Telerik ASP.NET MVC, we are planning to upgrade to Kendo UI. Please let me know where can i download for Kendo UI ASP.NET MVC controls.

Thanks,
Sundar.
Dyanko
Telerik team
 answered on 24 May 2013
2 answers
105 views
Good morning!

I'm having some issues creating a simple treeview in my project. Maybe some reference problem, I don't know. I'm attaching a print from my screen.

Regards,
Davi Rodrigues
Davi Rodrigues
Top achievements
Rank 1
 answered on 24 May 2013
6 answers
333 views
Hi,

I'm using the latest Kendo (v2013.1.319), and I have hit a snag.  In Firefox ONLY, I cannot open the file browse window (accessed through the "Select..." button).

I am experiencing the same issue on the demos.
My version of Firefox is latest at v22.0.

I had another person test the demo on their machine in Firefox.  It worked at first when they were using v21.0, but when they updated to the latest Firefox version, the Select button stopped opening the file browse window.

Hopefully, this is an easy workaround/fix, but I did find that when tinkering around in Firebug, if I remove the k-upload-button class from the div element surrounding the input element, then it would revert to a Browse button and became clickable.

Here's my code, but it's virtually identical to that in the demo.  Please let me know if I can provide any more useful info.

@(Html.Kendo().Upload()
    .Name("ImageUpload")
    .Multiple(false)
    .Async(a => a
        .Save("UploadImage", "Home")
        .AutoUpload(false)
    )
    .Events(e =>
    {
        e.Error("UploadError");
        e.Success("GetImagePreviews");
    })
)
best,
-mark
Atanas Korchev
Telerik team
 answered on 24 May 2013
3 answers
347 views
Please reply to: v-daughw-oxf@ae.com

I cannot get the requestEnd event to fire at all with Kendo MVC build 2013.1.319.340 . WHY???????

< script>

//can't get this to fire to display success/fail msg
function onRequestEnd(e) {

debugger

//Check request type
if (e.type == "create" || e.type == "update") {
//check for errors in the response
if (e.response == null || e.response.Errors == null) {
$('#PivotGrid').data().kendoGrid.dataSource.read();
alert("Update Successful");
}
else {
alert("Update Failed");
}
}
}






< /script>


< div align="center">

@(Html.Kendo().Grid<PivotRow>()
.Name("PivotGrid")
.HtmlAttributes(new { align = "center", style = "height:600px; width:75%" })
.Scrollable()
.Sortable()
.Navigatable()
.Columns(columns =>
{
columns.Bound(c => c.us_price).Width(90).Title("US Price");
columns.Bound(c => c.us_base_pricepoint).Width(90).Title("US Base Price").Hidden();
columns.Bound(c => c.canada_price).Width(90).Title("Canada Price");
columns.Bound(c => c.mexico_price).Width(90).Title("Mexico Price");
columns.Bound(c => c.what_system).Width(100).Title("What System").Hidden();
//columns.Bound(c => c.what_system).Width(90).EditorTemplateName("_DDL_BM");
columns.Command(command => command.Destroy()).Width(50);

})
.Editable(editing => editing.Mode(GridEditMode.InCell))
// Command configuration
.ToolBar(toolbar =>
{
toolbar.Create();
toolbar.Save();
})
.Events(e => e.SaveChanges("saveChanges"))
.DataSource(dataSource => dataSource
.Ajax()
.Batch(true)
// Specify property that is the unique identifier of the model
.Model(model => model.Id(c => c.us_base_pricepoint))
.Model(model =>
{
model.Field(c => c.what_system).DefaultValue("BM");
})
.Events(events =>
{
events.RequestEnd("onRequestEnd"); //can't get this to fire!
events.Error("error");
})
.Create(create => create.Action("PricePoint_Create", "AE_IB_LOOKUP_VAL"))
.Read(read => read.Action("PricePoint_Read", "AE_IB_LOOKUP_VAL"))
.Update(update => update.Action("PricePoint_Update", "AE_IB_LOOKUP_VAL"))
.Destroy(destroy => destroy.Action("PricePoint_Destroy", "AE_IB_LOOKUP_VAL"))
)
)
Vladimir Iliev
Telerik team
 answered on 24 May 2013
1 answer
161 views
How can I set the height of a RadialGauge using the server-side wrapper if it's not exposed?
@(
    Html.Kendo().RadialGauge()
        .Name("patientDocumentMatchThresholdGauge")
        .Pointer(pointer => pointer.Value((double)Model.PatientDocumentMatchThreshold * 100))
        .Scale(scale => scale
            .EndAngle(180)
            .MajorUnit(10)
            .Max(100)
            .Min(0)
            .MinorUnit(1)
            .StartAngle(0)
            .Ranges(ranges => {
                ranges.Add().From(0).To(90).Color("#f00");
                ranges.Add().From(90).To(95).Color("#ffa500");
                ranges.Add().From(95).To(100).Color("#0c0");
            }
        )
    )
)
Petur Subev
Telerik team
 answered on 23 May 2013
2 answers
124 views
I have a couple of dropdowns that are setup to cascade:
01.@(Html.Kendo().DropDownListFor(model => model.FixedMovementType)
02.                      .OptionLabel("* Not Selected")
03.                      .DataTextField("Name")
04.                      .DataValueField("Id")
05.                      .BindTo(Model.FixedMovementTypes))
06.                @Html.ValidationMessageFor(model => model.FixedMovementType, "", new {@class = "alert-error"})
07.                @(Html.Kendo().DropDownListFor(model => model.Location)
08.                    .OptionLabel("* Not Selected")
09.                    .DataTextField("Name")
10.                    .DataValueField("Id")
11.                    .DataSource(source => source.Read(read => read.Action("GetLocationsRead", "FixedMovement").Data("FilterLocation")).ServerFiltering(true))
12.                    .AutoBind(false)
13.                    .CascadeFrom("FixedMovementType"))

Example data for the first dropdown (being cascaded from):
1.{
2.Id = 0,
3.Name = "Employment"
4.},
5.{
6.Id = 1,
7.Name = "Store"
8.}
Everything is working just fine except when Employment is selected in the first dropdown this does not fire cascading.  Is it intended when the value of the dropdown is = 0 that cascading won't fire?  This seems quite silly to me because when there is nothing selected .value() returns an empty string.
Georgi Krustev
Telerik team
 answered on 23 May 2013
5 answers
434 views
Hi,

I'm new to HTML 5.  I started with the cascading dropdownlist with ASP.NET MVC example and the .cshtml and .cs files.  However, the first dropdownlist is not populating.  I watched the steps in the debugger but it is not hitting the script.  What am I missing?  How do I associate the .cs file with the .cshtml.  I made some minor change in the .cs file to display hard coded data but the methods are not being called.

Any help would be greatly appreciated.
Dimiter Madjarov
Telerik team
 answered on 23 May 2013
1 answer
84 views
When i create a window the the below code it assigns the "error" handler to the "refresh" handler in JS. I'm guessing this is a bug.

Html.Kendo().Window()
        .Name("createDocWin")
        .Modal(true)
        .Draggable(false)
        .Height(300)
        .Resizable(r => r.Enabled(false))
        .Events(e => e.Error("errorCreatingDoc"))
<script>
    jQuery(function(){jQuery("#createDocWin").kendoWindow({"refresh":errorCreatingDoc,"modal":true,"iframe":false,"draggable":false,"title":"Created Document","resizable":false,"content":null,"width":300,"height":300,"actions":["Close"]});});
</script>
Dimiter Madjarov
Telerik team
 answered on 23 May 2013
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
ColorPicker
DateRangePicker
Security
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
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?