Telerik Forums
UI for ASP.NET MVC Forum
2 answers
314 views
Hi

I am using the Render event on a chart to add a subtitle with the code is based on the Kendo example "Display the Chart Title on Multiple Lines and Use Different Fonts". The problem i am having is that my subtitle is not centered and I assumed that because the chart title is centered by default then the subtitle would be as well. If you look at the dojo for the above mentioned example the subtitle is centered, however if you change the text of the second line to that shown below, you will see that is is no longer centerred. How can I ensure that my sub title is always centered. 

Thanks

<script>
    $("#chart").kendoChart({
        title: {
            text: "Total account value (USD):\ntextplaceholder\nClick a bar to drill down",
            position: "bottom"
        },
        series: [{
            data: [1, 2, 3]
        }],
        render: function(e) {
            var tph = e.sender.element.find("text:contains(textplaceholder)");
            tph.hide();
            var secondLine = e.sender.element.find("text:contains(Click)");
            $(secondLine).css({
                "font-size": "10px"
            });
        }
    });
</script>

Derek
Top achievements
Rank 1
 answered on 13 Jun 2019
1 answer
123 views

Having a simple issue with binding data to a dropdown.  Trying to follow from the demo code.  The code for RemoteDataSource_GetFirms never gets called.  Missing some basic concept I think.

Here is the controller:

public class ImpersonationController : Controller
    {
        public ActionResult Impersonation()
        {
            return View();
        }
            // GET: Impersonation
        public ActionResult RemoteDataSource()    //RemoteDataSource()
        {
            return View();
        }
        public JsonResult RemoteDataSource_GetFirms(string text)
        {
            var fo = new FirmObject();
            var firms = fo.GetFirms();
             
            if (!string.IsNullOrEmpty(text))
            {
                firms = firms.Where(p => p.SourceDataset.Contains(text));
            }
 
            return Json(firms, JsonRequestBehavior.AllowGet);
        }
    }

 

View:

@{
    Layout = null;
}
 
<!DOCTYPE html>
 
<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Impersonate</title>
</head>
<body>
    <div class="demo-section k-content">
        <h4>Select a Firm</h4>
        @(Html.Kendo().DropDownList()
              .Name("ddFirms")
              .DataTextField("SourceDataset")
              .DataValueField("FirmID")
              .DataSource(source =>
                      {
                  source.Read(read =>
                  {
                      read.Action("RemoteDataSource_GetFirms", "Impersonation");
                  });
              })
              .HtmlAttributes(new { style = "width: 100%" })
        )
    </div>
</body>
</html>

 

Robert
Top achievements
Rank 1
 answered on 12 Jun 2019
1 answer
181 views

Starting out with the tool, was looking at the tutorials.  Tried to use the ".Deferred" property on the grid as described in the tutorial, but and the records do not show when I use this features-as suggested.  Reviewing the Kendo examples, I don't really see the use of ".Differed."  Is this an outdated property. 

Georgi
Telerik team
 answered on 12 Jun 2019
7 answers
901 views
Hi,

The horizontal scrollbar in the grid goes missing when I filter a column which is not shown initially. Once the scrollbar is not shown anymore, there is no way for me to reset the filter.

Has this issue been raised by someone? When are you planning to fix this? Thanks.
Viktor Tachev
Telerik team
 answered on 11 Jun 2019
3 answers
1.8K+ views

I am using a Kendo Editor for MVC and I would like to add either a custom button or image button in the Editor's Tools.

For example, I would like to add this line so the image can appear in the Tools:

<img id="btnCopy" name="btnCopy" src="~/Images/Copy.png" onclick='doSomething(document.getElementById("myText").value)' />

Is it possible to customize the Editor's Tools? if yes, what do I need to do? An example would be helpful.

Petar
Telerik team
 answered on 11 Jun 2019
1 answer
170 views

Hello I was wondering if there is a similar kendo mvc function to the RadTabstrip of IsBreak=true to allow for stacked tabs instead of scrolling tabs?

or if anyone has accomplished the stacked tabs.

basically our system has about 15 tabs that need to be a in a single tab strip control and the scrolling makes this basically un-usable for clients and they are used to our old application with stacked tabs on the top of the tab strip.

 

Thomas
Top achievements
Rank 1
 answered on 07 Jun 2019
1 answer
219 views

Hello,

I am using a Grid Custom Editor for ASP.NET MVC.  When updating, the CohortAttributes_Update method is called (verified by breakpoint in Visual Studio), however IEnumerable<ContractMultiselectXrefModel>  contractMultiSelectXrefs is set to a null value.  I have followed this guide for implementation: https://demos.telerik.com/aspnet-mvc/grid/editing-custom

ContractMultiselectXrefsController
        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult CohortAttributes_Update([DataSourceRequest] DataSourceRequest request, [Bind(Prefix = "models")]IEnumerable<ContractMultiselectXrefModel> contractMultiSelectXrefs)
        {
            db.Configuration.ProxyCreationEnabled = false;
            if (contractMultiSelectXrefs != null && ModelState.IsValid)
            {
                foreach (var contractMultiSelectXref in contractMultiSelectXrefs)
                {
                    contractMultiselectService.Update(contractMultiSelectXref);
                }
            }
            return Json(contractMultiSelectXrefs.ToDataSourceResult(request, ModelState));
        }

Index.cshtml
    @(Html.Kendo().Grid<HI_ACO_Tool.Models.RAD.ContractFeeXrefModel>
        ()
        .Name("CohortFees")
        .Columns(columns =>
        {
            columns.Bound(contract => contract.ContractFeeModel).ClientTemplate("#=ContractFeeModel.FeeNM#").Title("Fee");
            columns.Bound(contract => contract.Amount);
            columns.Bound(contract => contract.BeginDT).Title("Attribute start date").Format("{0: MM/dd/yyyy}");
            columns.Bound(contract => contract.EndDT).Title("Attribute end date").Format("{0: MM/dd/yyyy}");
            columns.Command(command => { command.Destroy(); }).Width(100);
        })
        .ToolBar(toolBar =>
        {
            toolBar.Create().Text("Add Fee");
            toolBar.Save();
        })
        .Editable(editable => editable.Mode(GridEditMode.InCell))
        .DataSource(dataSource => dataSource // Configure the grid data source
        .Ajax()
        .ServerOperation(false)
        .Model(model =>
        {
            model.Id(p => p.FeeXrefKey);
            model.Field(p => p.ContractCohortKey);
            model.Field(p => p.FeeKey);
            model.Field(p => p.ContractFee);
            model.Field(p => p.Amount);
            model.Field(p => p.BeginDT);
            model.Field(p => p.EndDT);
        })
        .Read(read => read.Action("ContractFeeGrid_Read", "ContractFee").Data("cohortInfo()"))
        .Update(update => update.Action("ContractFeeGrid_Update", "ContractFee"))
        )
)

Christopher
Top achievements
Rank 1
 answered on 07 Jun 2019
2 answers
346 views

Hi,

how can I toggle the drawer mini mode / expanded mode from within the drawer itself.

The samle code I found has the toggle button in some other control, for example the toolbar.

I would like to have the drawer in mini mode and one item  in the drawer to expand / collapse it.

When I expand the drawer from a handler function for itemClick, it expands but collapses at the end of the handler.

 

Regards

Erwin

erwin
Top achievements
Rank 1
Veteran
Iron
 answered on 07 Jun 2019
1 answer
1.0K+ views

telerik mvc window: change the url of window when iframe is set to true

My goal is to have a set of windows for a page and for the content to not be loaded until the first time the window is opened.

Each window has a maximize, minimize, and refresh button.

Here is the script to load a window.

var w = $(id).data('kendoWindow');
var url = $(id).data('url');

            var loaded = $(id).data('load');
            if (loaded == null) {
                w.refresh({
                    url: url
                });
                w.setOptions({
                    contentUrl: url,
                });
                $(id).data('load', 'false');
            }

However, with this approach, the "refresh" button on the window seems to have no effect after the content loads.
How can I maintain the URL so the window'scontent can be loaded programmatically and the refresh button reload the content?

Marin Bratanov
Telerik team
 answered on 07 Jun 2019
14 answers
462 views
The Kendo UI® ♥ Bootstrap sample application (http://demos.telerik.com/kendo-ui/bootstrap/) and its source code (https://github.com/telerik/kendo-bootstrap-demo) is two years old.  A lot has changed since then.  Any chance you could update it to 2017 please?  If you could, and if switching to Sass is possible, that would be really great, but not required, just desired.  Thank you!
Ianko
Telerik team
 answered on 07 Jun 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?