Telerik Forums
UI for ASP.NET MVC Forum
1 answer
289 views

My ClientFooterTemplate / Aggregate data is not updating when I press the Edit / Update buttons. The row is successfully updated though.

How do I trigger this update OR what setting do I enable to get this automatically?

Bruce
Top achievements
Rank 1
 answered on 18 Jan 2017
3 answers
370 views

Hello,

I am using a date picker and have some code in the change event that I would like to fire when a date is entered into the input box.  I have found that the change event is not fired when a date is typed into the input box with a 2 digit year (17 vs 2017).  Your DatePicker/Events demo (http://demos.telerik.com/aspnet-mvc/datepicker/events) shows this behavior also.  Type in "1/1/2017" and the change event fires, clear out the box and the change event fires, type in "1/1/17" and the change event does not fire. 

Is there something I can do to make the change event fire when a date with a 2 digit year is entered?

Thanks,

Bryan Smouse

 

 

Angel Petrov
Telerik team
 answered on 17 Jan 2017
7 answers
255 views

Hi,

In one scenario, I used a javascript Ajax call to get data and then I constructed my sheet like this:

var sheet = spreadsheet.insertSheet({ rows: total });

sheet.setDataSource(data);

This way, the columns and rows are constructed by following the format defined in the JSON in data.

Now ... see the attached screenshot. Is it even remotely possible to get a following excel layout using the approach above? I can re-construct the layout without loading data, but in an ideal world, the user would get a spreadsheet without data (but containing the columns layout), and then using some filters outside the spreadsheet, x-number of columns (with the salmon background) would be added. Customers, etc (with green background) would be added.

Is there an alternative to setDataSource to bind data to a starting cell/row, etc.

Thanks,

Nicolas

Veselin Tsvetanov
Telerik team
 answered on 17 Jan 2017
8 answers
450 views

I am not sure if this is a KendoWindow problem or a KendoDropDownList problem, so I will post in both forums.
My Problem:
I have 2 DropDownLists; 'Code' and 'Rule'. 'Rule' cascades from 'Code'. These are both located in a modal KendoWindow.
If I have my controller return a PartialView, the second DropDownList does not even appear as a DropDownList, but as a textbox (Image1.jpg).
If I return a regular view, then both of the DropDownLists appear as they should (Image2.jpg), but then I get all of the stuff on the top of the popup that I do not want or need.

Code for my first DropDownList:

@(Html.Kendo().DropDownListFor(model => model.IncidentCategoryCode)                 //DropDownList for CODE
.HtmlAttributes(new { id = "incidentCategoryCode", style = "width: 99%;", @class = "large-links" })
.DataTextField("IncidentCategoryCode")
.DataValueField("IncidentCategoryCode")
.DataSource(source =>
{
    source.Read(read =>
    {
        read.Action("GetIncidentCategories", "IncidentCategory");
    });
})
)

Code for my second DropDownList:

@(Html.Kendo().DropDownListFor(model => model.ViolationCategoryNumber)                 //DropDownList for RULE
.HtmlAttributes(new { id = "violationCategoryNumber", style = "width: 99%;", @class = "large-links" })
.DataTextField("ViolationCategoryNumber")
.DataValueField("ViolationCategoryNumber")
.DataSource(source =>
{
    source.Read(read =>
    {
        read.Action("GetIncidentViolations", "IncidentViolation").Data("filterCreateIncidentViolation");
    })
    .ServerFiltering(true);
})
.CascadeFrom("incidentCategoryCode")
.CascadeFromField("IncidentCategoryCode")
)

Code for my filter:

function filterCreateIncidentViolation() {
    return {
        code: $("#incidentCategoryCode").val(),
        incidentViolationCodeFilter: $("#violationCategoryNumber").data("kendoDropDownList").value()
    };
}

 

Any ideas on this would be greatly appreciated,

Bob Mathis

Bob
Top achievements
Rank 2
 answered on 17 Jan 2017
1 answer
192 views

Hello...

When trying open or install the VS2015 extension for ASP.NET MVC scaffolding, I get the error 'The manifest extension is invalid'... has this been fixed or addressed?

Konstantin Dikov
Telerik team
 answered on 17 Jan 2017
1 answer
828 views

Hi,

I have a requirement where for first time, kendo grid should be opened in in-line editing mode with 5 columns containing dropdowns. When i click on button specifying number of rows, for example 5 then 5  new rows should be created with inline editing.

Can you please help me how can i achieve this scenario.

 

Below is how grid looks like. 

 

----------------------------------------------------------------------------------

# |  Product type| Product Name | Product Range | Quantity |   ==> this header

----------------------------------------------------------------------------------

1     dropdown |      dropdown     |    dropdown       |  dropdown - 1st row   

----------------------------------------------------------------------------------

2     dropdown |      dropdown     |    dropdown       |  dropdown - 2 nd row

 

   Button => to specify number of rows.

 

Konstantin Dikov
Telerik team
 answered on 17 Jan 2017
10 answers
4.0K+ views

Hi,

 

I have a Kendo.Grid being loaded into a Kendo.Window.  The Grid is showing up with the correct data, but the boolean column 'Printed' is displayed as a checkbox (see screenshot), when I want it to be either 'Y' or 'N'.  Ideally, I want to to be a green TICK or nothing, but I'm just trying to get anything to display other than the checkbox. I have found many examples on using the .ClientTemplate and have added this to the 'Printed' column according to the examples from Telerik, but it just is not working.

Below is the Grid definition.

@{ Layout = null; }
 
@model IEnumerable<CBECloudBO2.ViewModels.LabelTypeForChangesViewModel>
@(Html.Kendo().Grid(Model)
    .Name("plulabelsgrid")
    .HtmlAttributes(new { style = "height: 230px;" })
    .Columns(columns =>
    {
        columns.Bound(p => p.Id).Hidden();
        columns.Bound(p => p.ReportTemplate).Hidden();
        columns.Bound(p => p.Description).Title("Label");
        columns.Bound(p => p.LabelsCount).Title("Count").Width(70);
        columns.Bound(p => p.NumberLabelsOnPage).Title("Labels per Page").Width(120);
        columns.Bound(p => p.Printed).Title("Printed").Width(80).ClientTemplate("#= Printed ? 'Y' : 'N' #");
        columns.Command(command => command.Custom("Print").Click("printLabel")).Width(85);
    })
    .Scrollable()
    .DataSource(datasource => datasource
        .Ajax()
         )
)

 

Can anyone spot anything in the above code or offer me suggestions?

Regards,

Shawn

Shawn
Top achievements
Rank 1
 answered on 16 Jan 2017
3 answers
246 views

By specification one should be able to create dialog without title. So if you are using javascript there is no problem. You can set title to false and it works. But there is problem when you try to do it in MVC helper. Title in DialogBuilder accept only string. You are missing bool overload. 

And additional request. Can you please update http://docs.telerik.com/kendo-ui/intro/supporting/scripts-layout with dependencies for dialog.

Rumen
Telerik team
 answered on 16 Jan 2017
1 answer
215 views

We have a WSDL service which SOAP output looks like below : 

How can we bind this service to Telerik MVC Grid? 

Regards

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <PROJE_SOZLESME_KALEM_FAT_PLANOutput xmlns="http://xmlns.oracle.com/orawsv/NDD_ANALITIK_PROD/NDD_PROD">
         <OUT_RESULT_XML>
            <data>
               <rows>
                  <row>
                     <SOZLESME_NO>11</SOZLESME_NO>
                     <KALEM_NO>4314</KALEM_NO>
                     <TANIM>I&amp;C</TANIM>
                     <FATURA_TARIHI>2009-03-31</FATURA_TARIHI>
                     <FATURA_DEGERI>3360</FATURA_DEGERI>
                     <FATURA_PARA_BIRIMI>USD</FATURA_PARA_BIRIMI>
                     <FATURA_TURU>ZF1</FATURA_TURU>
                     <FATURALAMA_TURU_ACIKLAMASI>Trial</FATURALAMA_TURU_ACIKLAMASI>
                     <FATURA_ODEME_KOSULU></FATURA_ODEME_KOSULU>
                  </row>
                  <row>
                     <SOZLESME_NO>0045000115</SOZLESME_NO>
                     <KALEM_NO>343</KALEM_NO>
                     <TANIM>Qwert</TANIM>
                     <FATURA_TARIHI>2009-03-31</FATURA_TARIHI>
                     <FATURA_DEGERI>43234</FATURA_DEGERI>
                     <FATURA_PARA_BIRIMI>USD</FATURA_PARA_BIRIMI>
                     <FATURA_TURU>ZF1</FATURA_TURU>
                     <FATURALAMA_TURU_ACIKLAMASI>Tial12</FATURALAMA_TURU_ACIKLAMASI>
                     <FATURA_ODEME_KOSULU></FATURA_ODEME_KOSULU>
                  </row>
      </rows>
            </data>
         </OUT_RESULT_XML>
      </PROJE_SOZLESME_KALEM_FAT_PLANOutput>
   </soap:Body>
</soap:Envelope>

Marin Bratanov
Telerik team
 answered on 16 Jan 2017
1 answer
392 views

With some help from the forums and some trial and error I have created an editor that works just fine for complex objects when they are in a kendo grid.

i.e. when I have a complex object as a column in a grid this editor will edit the object and populate the complex object on the post back to the controller

 

However, when I am trying to use this editor in a web form ("Ajax.BeignForm") and do my post back I get an error along the lines of "The parameter conversion from type 'System.String' to type 'X' failed because no type converter can convert between these types".

 

  1. Why does this work just fine for grids, but not forms? (I'm guessing grids do some "magic" that handles the casting)
  2. Are there any options for having a DropDownList or similar control update a complex object instead of just a hidden string field?

 

 

 

@using System.Text.RegularExpressions;
 
@model object
 
@{       
    Dictionary<string, object> metaData = ViewData.ModelMetadata.AdditionalValues;
    ListType? ListType_DataAnnotation = (ListType?)(metaData.ContainsKey("ListType") ? metaData["ListType"] : null);
    string Param1_DataAnnotation = (string)(metaData.ContainsKey("Param1") ? metaData["Param1"].ToString() : null);
    string Param2_DataAnnotation = (string)(metaData.ContainsKey("Param2") ? metaData["Param2"].ToString() : null);
    string Param3_DataAnnotation = (string)(metaData.ContainsKey("Param3") ? metaData["Param3"].ToString() : null);
    bool? ShowLabel_DataAnnotation = (bool)(metaData.ContainsKey("ShowLabel") ? metaData["ShowLabel"] : false);
    string ParamFunction_DataAnnotation = (string)(metaData.ContainsKey("ParamFunction") ? metaData["ParamFunction"].ToString() : null);
 
    ListType? ListType_VD = (ListType?)ViewData["ListType"];
    string Param1_VD = (string)ViewData["Param1"];// ?? Param1_DataAnnotation;
    string Param2_VD = (string)ViewData["Param2"];// ?? Param2_DataAnnotation;
    string Param3_VD = (string)ViewData["Param3"];// ?? Param3_DataAnnotation;
    bool? ShowLabel_VD = (bool?)ViewData["ShowLabel"];
    string ParamFunction_VD = (string)ViewData["ParamFunction"];// ?? ParamFunction_DataAnnotation;
         
    ListType ListType = (ListType)(ListType_VD ?? ListType_DataAnnotation); //one of these will always have a value in them
    string Param1 = Param1_VD ?? Param1_DataAnnotation;
    string Param2 = Param2_VD ?? Param2_DataAnnotation;
    string Param3 = Param3_VD ?? Param3_DataAnnotation;
    bool ShowLabel = (ShowLabel_VD ?? false) || (ShowLabel_DataAnnotation ?? false);
    string ParamFunction = ParamFunction_VD ?? ParamFunction_DataAnnotation;
 
    string uniqueName = Regex.Replace(Guid.NewGuid().ToString(), "[^A-Za-z]+", "");
 
    string ID = (string)ViewData["ID"];
    ID = ID ?? uniqueName;
    string DataTextField = ListService.GetDataTextField(ListType);
    string DataValueField = ListService.GetDataValueField(ListType);       
}
 
@if(ShowLabel)
{
    @Html.LabelFor(x => x)
}
@(Html.Kendo().DropDownListFor(x => x)
    .DataTextField(DataTextField)
    .DataValueField(DataValueField)
    .Filter(FilterType.Contains)
    .DataSource(source =>
    {
        source.Read(read =>
        {
            if (ParamFunction == null || ParamFunction.Length == 0)
            {
                read.Action("Read", "List", new { ListType = ListType, Param1 = Param1, Param2 = Param2, Param3 = Param3 });
            }
            else
            {
                read.Action("Read", "List").Data(ParamFunction);
            }
        });
    })   
)
Ivan Danchev
Telerik team
 answered on 13 Jan 2017
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
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?