Telerik Forums
UI for ASP.NET MVC Forum
7 answers
301 views
I have been looking for awhile on how to export a chart to a JPG on a button click. I have found some documentation on the matter and most of the links are broken or the solution doesn't work. Is there an current examples of a chart being exported to jpg or png?

One of links I have found is http://www.telerik.com/support/code-library/kendo-ui-chart-export and the project doesn't seem to want to pull up for me.
T. Tsonev
Telerik team
 answered on 12 Aug 2014
5 answers
255 views
I haven't seen any documentation on razor syntax for the Gantt control. Is this somewhere? I am trying to do the following:

@(Html.Kendo().Gantt(Model) // Bind the grid to the Model property of the view
        .Name("Gannt")
        .Columns(columns => columns.Bound(o=>o.Title).Title("Title"))
        )

And I'm receiving the following error: CS1501: No overload for method 'Gantt' takes 1 arguments

In looking at the ASPX example here: http://docs.telerik.com/kendo-ui/api/wrappers/aspnet-mvc/Kendo.Mvc.UI.Fluent/GanttColumnBuilderBase

<%= Html.Kendo().Gantt(Model)
.Name("Gantt")
.Columns(columns => columns.Bound(o => o.OrderID).Title("ID"))
%>

It looks like the only parameter is the Model itself. This is probably something silly that I'm missing. Any help is greatly appreciated.






Jason
Top achievements
Rank 1
 answered on 11 Aug 2014
11 answers
342 views
I am currently using a data grid which has a pop up grid editor and Kendo Editor. I am able to modify the fields in the pop up windows the first time its loads but on any other attempts there after I am not able to edit the fields. But if the Kendo Editor is removed everything works fine.
Dimiter Madjarov
Telerik team
 answered on 11 Aug 2014
5 answers
1.2K+ views
Hi
I have this issue with KendoUI window control. I will add some code as well.

My view with window opening logic.

@(Html.Kendo().Window()
    .Name("window")
    .LoadContentFrom("FirstAction", "Controller", new { area = ""})
    .Modal(true)
    .Visible(false)
      )
<script type="text/javascript" language="javascript">
    function openModalForm(e) {
        e.preventDefault();
        var windowElement = $('#window').data("kendoWindow");
        windowElement.refresh();
        windowElement.center();
        windowElement.open();
    }
</script>
                <span>@Html.ActionLink("Link to open window", "Action", Controller", new { area = "" }, new { onclick = "javascript:openModalForm(event);" })</span>

FirstAction in Controller returns this:
public ActionResult FirstAction()
{
   return PartialView("_MainWindowContent", new MyModel());
}

_MainWindowContent contains:
@model MyWeb.Models.MyModel
<div class="popup" id="popupDiv">
    @{
        Html.RenderPartial("_FirstStep", Model);
    }
</div>

_FirstStep contains:
@model MyWeb.Models.MyModel
    <div class="form">
        <h1 class="step-1">Form field title</h1>
        <div class="form-list">
            @using (Ajax.BeginForm("FirstStep", "Controller", null, new AjaxOptions { HttpMethod = "POST", UpdateTargetId = "popupDiv", InsertionMode = InsertionMode.Replace }, new { id = "mainForm" }))
            {
                <ul>
                    <li class="form-field" id="firstField">
                        @Html.LabelFor(m => m.FirstField, "First field")
                        <div class="input-box">
                            @Html.TextBoxFor(m => m.FirstField)
                        </div>
                    </li>
                 
                    <li class="form-field" id="secondField">
                        @Html.LabelFor(m => m.SecondField)
                        <div class="input-box">
                            @Html.TextBoxFor(m => m.SecondField)
                        </div>
                    </li>
                    <li class="form-field" id="thirdField">
                        @Html.LabelFor(m => m.ThirdField)
                        <div class="input-box">
                            @Html.TextBoxFor(m => m.ThirdField)
                        </div>
                    </li>
                    <li class="form-field" id="fourthDate">
                        @Html.LabelFor(m => m.FourthDate)
                        <div class="password-box">
                            @Html.Kendo().DatePickerFor(m => m.FourthDate)
                        </div>
                    </li>
                </ul>
                @Html.HiddenFor(m => m.HiddenValue)
            }
        </div>
        <div class="popup-navigation">
            <button id="nextButton"> Go to next step </button>
        </div>
    </div>
        <script type="text/javascript" language="javascript">
             
            $("#nextButton").click(function () {
                $("#HiddenValue").val("true");
                $("#mainForm").submit();
            });
    </script>
    </div>

FirstStep contains some logic and then return partial view "SecondStep" with some more new fields. I thought it should update the div with the id of "popupDiv". This is at least how it worked in telerik window control, which I also used a bit. But what it does on my machine is that, it just goes straight to {site}/Controller/FirstStep, that is what I see on the browser address. The whole page contains only elements from SecondStep partial view. The controller FirstStep gets all the data correctly. Is there any way to post data or update window or am I missing some attributes or something?
Daniel
Telerik team
 answered on 08 Aug 2014
2 answers
664 views
I need to add a tolltip to the Edit Button. I've tried this approach but it fails display the values for the column.
This approach displays the Following tooltip: Edit #= UserFirstName # #=UserLastName#, #=RoleDescription#
Should display: Edit MIKE JOHNSON, Adminstrator

com.Edit().HtmlAttributes(new { title = string.Format("Edit {0} {1}, {2}", "#= UserFirstName # ", "#=UserLastName#", "#=RoleDescription#") });

I was not able to find any post that shows a solution to this.
What I'm doing wrong.

Current Version: 2014.2.716

The complete code is below.

@(Html.Kendo().Grid<FDolUser>()
.Name("grid")
.Columns(col =>
{
col.Command(com =>
{
com.Edit().HtmlAttributes(new { title = string.Format("Edit {0} {1}, {2}", "#= UserFirstName # ", "#=UserLastName#", "#=RoleDescription#") });
com.Destroy();
});
col.Bound(c => c.RacfId).ClientTemplate("#=UserTypeDescription#").Title("User Type");
col.Bound(c => c.RacfId).ClientTemplate("#=VendId#").Title("Vendor Id");
col.Bound(c => c.RacfId);
col.Bound(c => c.RacfId).ClientTemplate("#=StaffMemberSequence#").Title("Staff Id");
col.Bound(c => c.RoleCode).ClientTemplate("#=RoleDescription#");
col.Bound(c => c.RacfId).ClientTemplate("#=SubScrabAcctId#").Title("ISA Id");
col.Bound(c => c.UserFirstName);
col.Bound(c => c.UserLastName);
})
.Filterable()
.Sortable()
.Pageable()
.ToolBar(t => t.Create())
.Editable(e => e.Mode(GridEditMode.PopUp))
.Events(e => e.Edit("onEdit").DataBound("onDataBound"))
.DataSource(ds => ds
.Ajax()
.Model(model => model.Id(p => p.UsrSq))
.Events(events => events.Error("onError"))
.Read(r => r.Action("GetUser", "Admin"))
.Update(u => u.Action("UserUpdate", "Admin").Data("additionalInfo"))
.Destroy(d => d.Action("userDestroy", "Admin"))
.Create(c => c.Action("UserUpdate", "Admin").Data("additionalInfo"))
.ServerOperation(true)
))
Mike
Top achievements
Rank 1
 answered on 08 Aug 2014
1 answer
232 views
We inherited a mission critical codebase that we are upgrading from .NET 1.1 to .NET 3.5.  This codebase uses RadGrid 5.1 for .NET 1.1.  This old library will not work in .NET 3.5.  We are willing to purchase whatever suite is necessary for us to acquire RadGrid.Net2.dll v. 5.1. 

Thanks,
Robert Ryan
Viktor Tachev
Telerik team
 answered on 08 Aug 2014
1 answer
144 views
For my purposes, the typical case will be 100 to 10,000 rows of data in 1 to 16 groups.  What I would like to do is for the grid to first load the applicable groups, all collapsed, and then to begin loading the data for each of these groups in the background after the page has come up.  Is this possible with out-of-the-box functionality?
Nikolay Rusev
Telerik team
 answered on 08 Aug 2014
2 answers
847 views
I have the following line in my grid:

.ToolBar(toolbar => toolbar.Create().Text("Add"))


How do I align the button to the right, which is otherwise defaulted to left?
Russ
Top achievements
Rank 2
 answered on 07 Aug 2014
3 answers
114 views
When I upgraded to 2014.2.716, a visual error started occurring in my grid controls with child controls in the grid's toolbar.

01.@(Html.Kendo().Grid<TestRowClass>()
02.    .Name("TestGrid")
03.    .ToolBar(toolbar => toolbar.Template(@<text>
04.            @(Html.Kendo().AutoComplete()
05.                .Name("TestAutoComplete")
06.            )
07.        </text>)
08.    )
09.)


I tested that in a brand new project using the CDN to make sure i eliminated all other code. The "TestRowClass" can contain any properties, i only use it to help render the grid itself.

When I use the razor scripting above, all of the <script> tag content shows up in the toolbar along side the control. The control works just fine, but the content of the script tag should not be visible.

I tried adding a simple style like "script { display:none; }" to the page, but that didn't fix the issue.

Any advice or fix would be appreciated. Thanks.
Mike
Top achievements
Rank 1
 answered on 07 Aug 2014
1 answer
116 views
Is it possible to specify a different ViewModel for  Create/Edit to what's specified in @Html.Grid<ViewModel>

I have separate ViewModels for Edit and Create as the validation rules are different.

Thanks
Steve
Nikolay Rusev
Telerik team
 answered on 07 Aug 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?