Telerik Forums
UI for ASP.NET MVC Forum
1 answer
91 views
Buenas Tardes amigos del foro disculpen por escribir en español, pero necesito ayuda de como crear un TreeView a partir de una consulta LinqToXML. Si me pueden facilitar un ejemplo en Visual Basic, estaría muy agradecido.
Daniel
Telerik team
 answered on 11 Dec 2014
1 answer
101 views
Hi there,
I've a Scheduler and a Grid, i want to update the schedule when someone create or update the items in the grid.

I've subscribed the sync event with: .Events(events => events.Sync("sync"))

then I update the scheduler:

 function sync(args) {
        $("#scheduler").data("kendoScheduler").dataSource.read();
        $("#scheduler").data("kendoScheduler").refresh();
}

it works, but if there is a server validation error the editor popup quits and the user can't see the validation error.
How can I detect a successfully update?

Server validation is implemented as in the example provided:

<script type="text/kendo-template" id="message">
    <div class="k-widget k-tooltip k-tooltip-validation k-invalid-msg field-validation-error"
         style="margin: 0.5em; display: block; " data-for="#=field#" data-valmsg-for="#=field#" id="#=field#_validationMessage">
        <span class="k-icon k-warning"> </span>#=message#<div class="k-callout k-callout-n"></div>
    </div>
</script>


<script type="text/javascript">
    var validationMessageTmpl = kendo.template($("#message").html());

    function error(args) {
        if (args.errors) {
            var grid = $("#grid").data("kendoGrid");
            grid.one("dataBinding", function (e) {
                e.preventDefault();   // cancel grid rebind if error occurs

                for (var error in args.errors) {
                    alert(args.errors[error].errors);
                    showMessage(grid.editable.element, error, args.errors[error].errors);
                }
            });
        }
    }

    function showMessage(container, name, errors) {
        //add the validation message to the form
        container.find("[data-valmsg-for=" + name + "],[data-val-msg-for=" + name + "]")
                 .replaceWith(validationMessageTmpl({ field: name, message: errors[0] }))
    }

</script>



Daniel
Telerik team
 answered on 11 Dec 2014
1 answer
285 views
This is driving me crazy... I want to do some formatting on the cell that is housing the .k-event after the databound event is triggered.  However, it's triggered 3 times every time the page is loaded or I navigate to a new time.  Any idea why this is happening?

Rosen
Telerik team
 answered on 10 Dec 2014
1 answer
131 views
when I make a treelist as grid detail template  and click the create button 
I got  an error like   TypeError: parent is undefined  kendo.all.js--line:103021
any way to solve it?

Thanks!
Nikolay Rusev
Telerik team
 answered on 10 Dec 2014
1 answer
176 views
I've got a chart defined as:-

@(Html.Kendo().Chart<WT_Portal_PMS2.Models.OpenClockSummary>()
       .Name("chart")
       .Title("Open Clocks by Weeks Waiting")
       .Theme("bootstrap")
       .Legend(legend => legend
           .Position(ChartLegendPosition.Top)
           .Visible(false)
       )
                   .DataSource(ds => ds.Read(read => read.Action("_BarChartp", "Summary")
                              .Data("specFilter")
 
                   ))
       .Series(series =>
       {
           series.Column(model => model.Clocks, model => model.barColour);
 
 
 
       })
       .ChartArea(area => area
           .Height(350)
           .Background("transparent"))
       .CategoryAxis(axis => axis
           .Categories(model => model.CurrentWaitingBand)
           .Labels(labels => labels.Rotation(-90))
           .MajorGridLines(lines => lines.Visible(false))
       )
       .ValueAxis(axis => axis.Numeric()
           .Labels(labels => labels.Format("{0:N0}"))
           .Line(line => line.Visible(false))
       )
       .Tooltip(tooltip => tooltip
           .Visible(true)
           .Format("{0:N0}")
       )
 
                   )

What I need to do is add a boostrap badge to the chart title, so each one of the charts has an easily idfentifiable reference number.
E.g:-
<span>Open Clocks by Weeks Waiting</span>  <span class="pull-right badge">C1</span>

How can I put this markup into the title? Any attempt to add spans etc., result in javascript errors when the page is run.

Thanks
T. Tsonev
Telerik team
 answered on 10 Dec 2014
1 answer
654 views
Hello,

I am displaying  popup window from parent displaying a  partial view. When the partial view loads my parent window URL is already changing to Controller/Action for partialview. When i submit the partial view i do not want to refresh the parents window. Submitting partial view should just Close Pop up  window. How can i achieve this. parent window method to Show popup window code is like this
var direction = "ObjectDetail/Index";
var wnd = $("#ObjectDetail").data("kendoWindow");
if (wnd) {
wnd.refresh({
url: direction,
data: { id: item.id }

});
wnd.element.css("visibility", "");
wnd.center();
wnd.open();
}
At this Point when child window Pops up parent window URL is changing to this new URL.

The partial view has beginform
@using (Html.BeginForm("SubmitFormCollection", "ObjectDetail"))
{
and on submit the actionresult i have to Redirect to parent URL again and this refreshes parent view
      [AcceptVerbs(HttpVerbs.Post)]
         public ActionResult SubmitFormCollection(ControlsContext selModel, FormCollection formCollection)
         {
   //do something
              return RedirectToAction("Index", "ObjektActivity");         }

How can i submit the popup window and Close it without refreshing parent.

Anamika
Anamika
Top achievements
Rank 1
 answered on 09 Dec 2014
1 answer
223 views
I am trying to filter the Grid based on what the user types.  One of my fields is a drop down list and if the foreignKey ID is null the filter breaks because it cannot get the value.  

The field is Gender.  Is there a way to first check if Gender_Id is null before I check Gender_Types.Gender?  Because if Gender_Id is null then so is Gender_Types.

Here is my code:



// Filter the Grid as a user types
    $("#Search").on("keyup click input", function () {
        grid = $("#Grid").data("kendoGrid");
        var searchFilter = { logic: "and", filters: [] };

        if (this.value.length > 0) {
            var search = this.value.trim();
            var search_array = search.split(" ");
            for (var i = 0; i < search_array.length; i++) {
                var filter = { logic: "or", filters: [] };

                filter.filters.push({ field: "Full_Name", operator: "contains", value: search_array[i] });
                filter.filters.push({ field: "Gender_Types.Gender", operator: "contains", value: search_array[i] });

                searchFilter.filters.push(filter);
            }

            grid.dataSource.query({ filter: searchFilter });

            // When done filtering select page one otherwise no page is selected
            grid.dataSource.page(1);

        } else {
            grid.dataSource.query({ filter: searchFilter });

            // When done filtering select page one otherwise no page is selected
            grid.dataSource.page(1);
        }
    });











Petur Subev
Telerik team
 answered on 09 Dec 2014
1 answer
185 views
Hello,

I'm trying to show the redline you can see in timeline view at http://www.telerik.com/kendo-ui/ganttchart (also in attached file).
How I can do it? I don't see any option to enable it. I'm actually not using Dependencies between task or additional Resource.

Anyway, it's supposed to show the actual time (today) from the timeline? or what's his purpose?
Vladimir Iliev
Telerik team
 answered on 08 Dec 2014
1 answer
124 views
I have a script like this:

$.ajax(
    {
        url: '@Url.Action("GetThrowData", "UserConsoleViewModels")',
        type: 'POST',
        dataType: 'json',
        data:
        {
            throwId: _throwId
        }
    }
    ).done(
        function (response) {
            console.log(response);
            $("#direction").text(response.Data.Action);
            $("#lblRawData").text(response.Data.RawData);
        }
    ).error(
        function (xhr, status, error) {
            alert(xhr.responseText);
    }
);                       


Right now the RawData property (a comma delimited list of floats) is just being printed to a label.  What I would like to do is apply it as a series in a chart similar to this:

@(Html.Kendo().Chart()
  .Name("currentGraph")
  .Title("Switch Current Graph")
  .Legend(legend => legend
      .Position(ChartLegendPosition.Bottom)
  
  .ValueAxis(axis => axis.Numeric()
      .Labels(labels => labels.Format("{0}"))
      .Title("Current")
  ).HtmlAttributes(new { style = "height:300px" })
  .Tooltip(tooltip => tooltip
      .Visible(true)
      .Format("{0}")
  )
)


How would I do that?
Hristo Germanov
Telerik team
 answered on 08 Dec 2014
1 answer
173 views
Hi,

We are right now in the trial period of the Telerik MVC suite.
We tried binding Kendo Pivot Grid using MVC by referring examples available on 
http://demos.telerik.com/aspnet-mvc/pivotgrid/local-flat-data-binding (showing data binding using XML).
We need to bind list data to view. Please provide some examples which will bind List format data returned by model to view in ASP.NET MVC4. 

This would help us a lot in the evaluation process.

Thanks and regards,
Vaibhavi Shinde
Georgi Krustev
Telerik team
 answered on 08 Dec 2014
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?