Telerik Forums
UI for ASP.NET MVC Forum
4 answers
305 views

Hi All,

I am using 6-10 kendo charts in my project to display data,now i am stuck with the minimize and maximize of the window.How can we acheive chart size should be resized with the window resizes.Kindly help me in achieving.

Please revert back if you any questions.

 

Thanks & Regards,

Sampath

.

 

 

 

Stefan
Telerik team
 answered on 25 Jun 2018
3 answers
171 views
I'm having a lot of difficulty getting the cascading comboboxes functionality to work. These work as expected when they are independent, but the Child box remains disabled when set up as a cascade (uncommenting the CascadeFrom line). Any help would be appreciated!
 
@(Html.Kendo().ComboBox()
             .Name("Parent")
             .DataTextField("Text")
             .DataValueField("Value")
             .DataSource(source =>
             {
                 source.Read(read =>
                 {
                     read.Action("Cascading_Get_Parents", "Home");
                 })
                     .ServerFiltering(true);
             })
)
 
@(Html.Kendo().ComboBox()
                  .Name("Child")
                  .DataTextField("Text")
                  .DataValueField("Value")
                  //.CascadeFrom("Parent")
                  .DataSource(source =>
                  {
                      source.Read(read =>
                      {
                          read.Action("Cascading_Get_Children", "Home");
                      })
                      .ServerFiltering(true);
                  })
)
Neli
Telerik team
 answered on 22 Jun 2018
3 answers
102 views

I found a related question and answer, 
https://www.telerik.com/forums/kendo-date-picker-selection-by-class-name-with-jquery

 

That solution indeed works for datepickers, put the nesting of the drop down is different and I am unable to figure out what class references are required.

 

-Corey

Eyup
Telerik team
 answered on 22 Jun 2018
1 answer
187 views

On this site:

https://demos.telerik.com/aspnet-mvc/map/remote-marker

...you get us a nice example of using remote data in a map.

In this provided method you return a json file. How is this structured? I connot find any example.

public ActionResult _StoreLocations()
        {
            return Json(MapDataRepository.StoreLocations());
        } 
Georgi
Telerik team
 answered on 22 Jun 2018
3 answers
2.0K+ views

Hi,

I'm experimenting with the following grid and want to know if its possible to change the editor assosiated with the UserInputString column when the Field column value changes.

 

That is the Field column consists of a drop down list for example containing "Job Number", "Client", "Product" and other items. When the user selects, for example, Job Number the UserInputString editor is to be a TextBox. If Product is selected, the input will be a product auto complete text box, if 'Is Invoiced' is selected it will be a check box etc.

 

Is this possbile?

 

 

 @(Html.Kendo().Grid<S3Web.Models.AdvancedSearchModel>()
        .Name("grid")
        .Columns(columns =>
        {
          columns.Bound(p => p.AndOrString);
          columns.Bound(p => p.StartBracketString);
          columns.Bound(p => p.Field).Width(180);
          columns.Bound(p => p.OperatorString);
          columns.Bound(p => p.UserInputString);
          columns.Bound(p => p.EndBrackerString);
          columns.Command(command => command.Destroy()).Width(150);
        })
          .ToolBar(toolBar =>
          {
            toolBar.Create();
            toolBar.Save();
          })
        .Editable(editable => editable.Mode(GridEditMode.InCell))
        .DataSource(dataSource => dataSource
            .Ajax()
            .Batch(true)
            .ServerOperation(false)
            .Events(events => events.Error("error_handler"))
            .PageSize(20)
            .Read(read => read.Action("AdvancedSearch_Read", "Jobs"))
            .Create(create => create.Action("AdvancedSearch_Create", "Jobs"))
            .Update(update => update.Action("AdvancedSearch_Update", "Jobs"))
            .Model(model =>
            {
              model.Id(p => p.Field);
            })
        )
  )

 

Preslav
Telerik team
 answered on 21 Jun 2018
15 answers
4.5K+ views
Hello. I am hoping to get some help here, I'm stuck. I am trying to get the value from my dropdown list to my controller to save back to the db but the value doesn't seem to come back with the post. 

My Model
namespace MDT.Models
{
    public class Vehicle
    {
        [Key]
        public int VehicleID { get; set; }
 
        public int UserID { get; set; }
 
        [Required]
        [StringLength(50)]
        public string Name { get; set; }
 
        public int MakeID { get; set; }
        public int ModelID { get; set; }
 
        [DisplayName("Color")]
        public int ColorID { get; set; }
 
        [Required]
        [StringLength(4)]
        public string StickerKey { get; set; }
 
        [DefaultValue(true)]
        public Boolean IsActive { get; set; }
 
        public virtual CarColor CarColor { get; set; }
    }
 
}

My Controller action for the udpate
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Edit(Vehicle vehicle)
{
    if (ModelState.IsValid)
    {
        db.Entry(vehicle).State = EntityState.Modified;
        db.SaveChanges();
        return RedirectToAction("Index");
    }
    return View(vehicle);
}
My Kendo drop down list definition in the cshtml
<div class="editor-label">
    @Html.LabelFor(model => model.ColorID)
</div>
<div class="editor-field">
    @*@Html.EditorFor(model => model.ColorID)*@
    @Html.ValidationMessageFor(model => model.ColorID)
 
    @(Html.Kendo().DropDownListFor(model => model.ColorID)
        .BindTo(ViewData["CarColors"] as SelectList)
        .Name("kendocarcolor")
        .Value(Model.ColorID.ToString()) 
        .OptionLabel("Select a Color")             
    )
</div>

When I perform the save for the above, the ColorID comes back at zero. Shouldn't it be getting passed back with the updated model for the post? I also have noticed that my validator for the ColorID is not working for the Kendo Dropdown list but if I uncomment the EditorFor, it does work on that control.

If you could please help me with the following it would be greatly appreciated:

1) Why doesn't the dropdownlist come back with my updated model value to my controller?
2) Any ideas why the validator doesn't work?
3) Did I populate the dropdownlist the most efficent way using ViewData? How would you do it?

THANK YOU very much in advance.

Ivan Danchev
Telerik team
 answered on 21 Jun 2018
1 answer
1.0K+ views

Hi,

I used Kendo dialog, everything work fine, except the position. it seems that it doesn't impact. I changed the values in Percentages or in pixels but this is not working and it always appears in the same place.

What is the problem?

this is my code:

myWindowConfirmTransaction = $("#ConfirmTransactionWindow");
            myWindowConfirmTransaction.kendoDialog({
                width: "40%",
                height: "65%",
                title: "",
                closable: true,
                modal: true,
                visible: false,
                content: formHtmlData,
                actions: [
                    { text: 'Edit', action: onCancel },
                    { text: 'Continue', primary: true, action: onContinue }
                ],
                position: {
                    top: 10,
                    left: "25%"
                },
                animation: {
                    open: {
                        effects: "slideIn:down fadeIn",
                        duration: 1000
                    },
                    onCancel: {
                        effects: "slide:down fadeOut"
                    }
                }
            });
        }
        myWindowConfirmTransaction.data("kendoDialog").open().center();

 

thanks!

 

 

 

 

Ivan Zhekov
Telerik team
 answered on 20 Jun 2018
4 answers
674 views

Accessing the Selected DataText and DataValue

Please help...

@(Html.Kendo().ListBox()
.HtmlAttributes(new { title = "Accounts"})
.Name("ListAccounts")
.DataTextField("AccountName")
.DataValueField("AccountID")
.BindTo(Model)
.Events(events => events.Change("onChange"))
)

<script>
function onChange(e) {
var value = $("#ListAccounts").data("kendoListBox").dataSource._data[$("#ListAccounts").data("kendoListBox").selectedIndex].value;
GetFleetAssets(value);
}
</script>

How can i get the DataValueField "AccountID" for the selected item within an Event Script? I can see that the data is loaded by viewing the source.

script above does not function

Stefan
Telerik team
 answered on 20 Jun 2018
1 answer
3.6K+ views

I'm putting together a grid which displays results for a document search.  In the grid itself, instead of showing the row Id, I have a checkbox.  What I'd like to do is twofold:

1. Add a check box column header that'll select all rows when checked (I've seen examples that use a specific boolean field, which my grid doesn't have nor use...  I just want to go through each row displayed and check the checkbox, but it is not dependent upon any other column.

2. Get all the selected row IDs to pass into a controller.  Not really pertinent, but what that controller will do is look for corresponding rows in the database, extract the document information in order to zip them all up together.

Any help would be greatly appreciated...

Dimo
Telerik team
 answered on 18 Jun 2018
2 answers
446 views
My users are wanting a way to enlarge or resize the window that pops up when they click the View HTML button in the Editor widget. Is there a way to do this or is beyond the developer's control? Thanks.
Bryan
Top achievements
Rank 1
 answered on 15 Jun 2018
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?