Telerik Forums
UI for ASP.NET MVC Forum
4 answers
565 views
Would like to make popup editor window 100% height depending on the containing browser client window height..
Edward
Top achievements
Rank 1
 answered on 25 Feb 2019
7 answers
391 views

My organization is fairly new to Telerik and I have been tasked with two goals to start with.  The first is to use the theme builder to try to get the colors to match our existing desktop apps, easy enough for the most part.

Our app is going to be a Core MVC app, so I start by selecting 'UI for ASP.NET Core'.  From there I have tried playing with both Default and Bootstrap (though I am honestly not sure which of the two I should be using).  After I get everything mostly looking how I want I have no issues downloading the file, but I am unsure exactly where to place it.

In Visual Studio I am creating a new Telerik C# ASP.NET Core MVC Application, from there I am selecting Grid and Menu  in the project wizard.  From there I am not entirely sure where to place the all.css and variables.scss files to preview the changes to the basic app. 

 

My final question is, within the theme builder the color swatches has a nice side menu that pops out.  Which control in Telerik would this be?

 

Apologizes for all the questions, trying to wrap my head around all of this. Hopefully this all makes sense and I gave enough information.

Teya
Telerik team
 answered on 22 Feb 2019
1 answer
695 views

Hi! 

I ve been checking out the new DateRangePicker control, and i had some doubts about its usage

 

1) Is there a chance to make the end date optional? the demo published always focuses on the end date input after selecting a start date, and i want it to be optional, by that i mean to be able to select a start date and end date, o only one of them and the remaining date field to remain empty. Is that possible?

 

2) I havent seen any binding method like there is for the date picker control. In the latest, there is a DatePickerFor method, to bind the control to the viewmodel field. In the daterangepicker control i expected to be the same method (configuring the start date field and the end date field)... where my assumptions wrong? If thats the case i dont see too much use to this control :/

 

thanks!

Viktor Tachev
Telerik team
 answered on 21 Feb 2019
11 answers
848 views

Hello, I am currently evaluating the Telerik control sets for use in a large project to start soon.  I have a requirement where we will be building a treeview in our ASP.NET MVC controller code using TreeViewItemModel list and passing to the view.  In the view razor code and/or javascript, is there a way to access the TreeViewItemModel as a user is selecting different nodes in the tree?  Specifically, when building the TreeViewItemModel, I populate the .Text and .Id properties and I need to access these values to post back to my controller code to handle the selection changes.  Is this possible? I need to quickly mock something up to demonstrate this.

Controller code to build the treeview contents is here:

public List<TreeViewItemModel> BuildTreeContents()
{
List<TreeViewItemModel> tree = new List<TreeViewItemModel>();
IQueryable<SupplierModel> suppliers = GetSuppliers();
IQueryable<ManagedOrgModel> managedOrgs = null;
IQueryable<ManagedLocationModel> locations = null;
TreeViewItemModel node = null;
List<TreeViewItemModel> orgs = null;
List<TreeViewItemModel> locs = null;
foreach (SupplierModel supplier in suppliers)
{
node = new TreeViewItemModel();
node.Text = supplier.SupplierName;
node.Id = supplier.SupplierID;
managedOrgs = GetManagedOrgs(supplier.ClientID, supplier.SupplierID);
orgs = new List<TreeViewItemModel>();
foreach (ManagedOrgModel managedOrg in managedOrgs)
{
TreeViewItemModel orgNode = new TreeViewItemModel();
orgNode.Text = managedOrg.ManagedOrgName;
orgNode.Id = managedOrg.ManagedOrgID;
locations = GetLocations(managedOrg.ClientID, managedOrg.SupplierID, managedOrg.ManagedOrgID);
locs = new List<TreeViewItemModel>();
foreach (ManagedLocationModel location in locations)
{
TreeViewItemModel locationNode = new TreeViewItemModel();
locationNode.Text = location.ManagedLocationName;
locationNode.Id = location.ManagedLocationID;
locs.Add(locationNode);
}
orgNode.Items = locs;
orgNode.HasChildren = true;
orgs.Add(orgNode);
}
node.Items = orgs;
node.HasChildren = true;
tree.Add(node);
}
return tree;

 

Thanks,

Doug Matulis

Dimitar
Telerik team
 answered on 21 Feb 2019
1 answer
968 views

Hello support,

I am using a MultiColumnComboBox widget in this way

 

01.@(Html.Kendo().MultiColumnComboBoxFor(x => x.PostBack.Expediente.IdCliente)
02.    .DataValueField("ID")
03.    .DataTextField("Nombre")
04.    .Columns(columns =>
05.    {
06.        columns.Add().Field("Nombre").Title("Cliente").Width("200px");
07.        columns.Add().Field("Mercado").Width("200px");
08.        columns.Add().Field("Subgrupo").Width("200px");
09.    })
10.    .Filter(FilterType.StartsWith)
11.    .BindTo(Model.Clientes)
12.    .HtmlAttributes(new { data_bind = "value: Expediente.Cliente" })
13.)

 

So far so good.

The question is: How can I specify the width of the whole dropdown list and in case the sum of the width of each column is greater than the width of the whole dropdown list then show a horizontal scroll bar (like the grid widget does) ?

Attached is a screenshot of the current widget rendered and below it the scrollbar I want to show (if necessary)

Thank you.

PD: I’ve tried with this post but it didn’t work https://www.telerik.com/forums/dropdownlist-should-take-size-of-biggest-option

Marin Bratanov
Telerik team
 answered on 20 Feb 2019
3 answers
526 views

I need to display a confirmation dialog on the screen using kendo.confirm. Everything work as expected until I resized the browser to see if the message displays correctly on the mobile. However the confirmation dialog text did not wrap on the screen. I tried to reproduce this in a dojo but can not. After further investigation I found that my site is missing the "display: block" or "display: inline-block" from the window wrapper.

Could you tell me who adds this so I can try to debug and see why the "display" property is not added.

Dimitar
Telerik team
 answered on 18 Feb 2019
4 answers
6.0K+ views

Would someone be able to provide a code snippet of how to programmatically select a row in the Kendo MVC Grid? 

We have the value for the ID (a column in the Grid) in a javascript variable.  We want to display the matching row in our grid and mark it as selected.  I saw the Kendo demos on how to select the row using grid.select(n), where n is the index into the row on the page.  But the demo example doesn't solve this problem.

Note, my data contains several thousand rows and my pageSize is limited to 10 rows per page.

@(Html.Kendo().Grid<ReportViewer.Models.EntityModels.tblTreeView>()
   .Name("grid")
   .Columns(columns =>
   {
     columns.Bound(c => c.Name).Title("Report Name");
     columns.Bound(c => c.Path).Title("Path");
     columns.Bound(c => c.Id).Title(string.Empty).Width("200px");
   })
   .Pageable(pageable => pageable.Refresh(true).PageSizes(true).ButtonCount(3))
   .Selectable()
   .Events(e => e.Change("showInTree"))
   .Sortable(sortable => { sortable.SortMode(GridSortMode.SingleColumn); })
   .DataSource(dataSource => dataSource
   .Ajax()
   .Model(model => model.Id(p => p.Id))
   .Sort(sort => sort.Add("Name").Ascending())
   .PageSize(10)
   .Read(read => read.Action("ReportsGridRead", "Home"))
)
)

 

Any help is greatly appreciated.

Viktor Tachev
Telerik team
 answered on 18 Feb 2019
1 answer
2.2K+ views

As the title states, is it possible to submit multiple partial views with a single button? Open to using javascript, jquery, ajax. 

I have them coming from the same model, but there are two partial views with separate forms, I am wondering if there is anyway to submit it with just using a single click?

Thanks

Marin Bratanov
Telerik team
 answered on 18 Feb 2019
2 answers
2.4K+ views

Hi All,

I have a grid inside a partialview of index view in a MVC project. I add a context menu to the grid. This menu has 4 items.  Which item(s) will show up depends on how many rows of grid are selected. I assign id to each menu item and tried to use hide() and show() to show certain menu item(s) but it doesn't work.  Anyone know how to do that?

Thanks.

Daochuen
Top achievements
Rank 1
Iron
Veteran
Iron
 answered on 15 Feb 2019
3 answers
1.2K+ views

 

I use a gridview with inline editing, when i Update a double value with 

This is the grid :

@(Html.Kendo().Grid<Ubaldi.BoB2B.Web.Models.FraisDePort.FraisDePortViewModel>()
         .Name("FraisGrid")
         .Columns(columns =>
         {
             columns.Bound(e => e.Id).Hidden(true);
             columns.Bound(e => e.Article);
             columns.Bound(e => e.PoidsMin).ClientTemplate("#= PoidsMin # kg");
             columns.Bound(e => e.PoidsMax).ClientTemplate("#= PoidsMax # kg");
             columns.Bound(e => e.MontantHT).ClientTemplate("#= MontantHT # €");
             columns.Command(command => { command.Edit().UpdateText("Enregistrer").CancelText("Annuler").Text(" ");}).Width(100);
             columns.Command(command =>
             {
                 command.Custom("Logs").Click("FraisLogs")
                     .Text("<span class='fa fa-list-alt'></span>")
                     .HtmlAttributes(new { @class = "btn btn-info", title = "Voir les modifications effectuées sur l'Article de Transport" });
             }).Width(50);
         })
         .Editable(editable => editable.Mode(GridEditMode.InLine))
         .DataSource(dataSource => dataSource
             .Ajax()
             .Events(events => events.Error("error_handler"))
             .Read(read => read.Action("GetAll", "FraisDePort"))
             .Update(update => update.Action("Update", "FraisDePort").Data("addUser"))
             .Model(model =>
             {
                 model.Id(p => p.Id);
             })
             .PageSize(20)
         )
         .Pageable(pageable => pageable.ButtonCount(5)))

 

This is my View Model:

public class FraisDePortViewModel : IValidatableObject
   {
 
       public int Id { get; set; }
 
       [Required, StringLength(100, MinimumLength = 3, ErrorMessage = "Le Nom de l'Article de Transport doit faire entre 3 et 100 charactères")]
       [DisplayName("Article de Transport")]
       public string Article { get; set; }
 
       [Required]
       [UIHint("Poids")]
       public double? PoidsMin { get; set; }
 
       [Required]
       [UIHint("Poids")]
       public double? PoidsMax { get; set; }
 
       [UIHint("Currency")]
       [Required, Range(1, 9999, ErrorMessage = "Le Montant HT doit être supérieur à 0 €")]
       public decimal? MontantHT { get; set; }
 
       [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy HH:mm}", ApplyFormatInEditMode = true)]
       [DisplayName("Créé le")]
       public DateTime? DateCreation { get; set; }
 
       [DisplayName("Créé par")]
       public string UserCreation { get; set; }
 
       [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy HH:mm}", ApplyFormatInEditMode = true)]
       [DisplayName("Modifié le")]
       public DateTime? DateModification { get; set; }
 
       [DisplayName("Modifié par")]
       public string UserModification { get; set; }
 
       public List<FraisDePortLog> Modifications { get; set; }
 
       public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
       {
           if (PoidsMin > PoidsMax)
           {
               yield return new ValidationResult("Le Poids Minimum doit être supérieur au Poids Maximum ", new List<string> { "Poids" });
           }
       }
   }

 

This is my EditorTemplate "Poids"

@model double?
 
@(Html.Kendo().NumericTextBoxFor(m => m)
      .Culture("fr-FR")
      .Min(0)
      .Max(15)
      .Step(0.50))
      

 

This is what i receive when I post modification with decimals (see Attachement).

Additionnals info :

  • Kendo 2018.3.911.545 
  • Culture is set to fr-FR in web.config solution

Do you have an idea to fix this issue of null value ?

Thank you, 

Julien

 

UBALDI SI
Top achievements
Rank 1
 answered on 15 Feb 2019
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
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?