Telerik Forums
UI for ASP.NET MVC Forum
5 answers
978 views
Hi, 
I'm having trouble managing the inline edit mode in my TreeList.
I would like to enable the inline edit mode (.Editable(e => e.Mode("inline"))) only on nodes without children, so I tought that, fired the "edit" event and checked for the presence of children, I could cancel it using preventDefault() but it's doing nothing.

I searched a lot but couldn't find anything helping me whit this issue.

Bonus question: is it possible, in inline mode, to enable the edit function only for one column?


Thanks a lot! 
Alessandro
Top achievements
Rank 1
 answered on 13 Jun 2018
4 answers
828 views

I have disabled few Dates in kendo Calendar . How to do Next/Prev button link to jump to the only Enabled dates? Right now it jumps to disabled dates even though those are not available to click on. 

 

Thanks in advance

Amita

Jeff
Top achievements
Rank 1
 answered on 13 Jun 2018
1 answer
99 views

Hello, i need create 1.000 task after create 1 task.

1) How i can can scroll the all records? Any way when scroll the gantt fill 10/20 or 30 task at a time? Because i use the event Read beside server, but when i scoll is very slow.

I am using last package.

 

Thanks,

Camilo

 

Ivan Danchev
Telerik team
 answered on 11 Jun 2018
2 answers
368 views

Hi,

I have a model holding a string property:

public class TicketDto
{
    public string Status { get; set; }
}

Is there a way for a view with a model of IEnumerable<TicketDto> to display a pie chart with the category being Status and the value being the percentage that particular status appears in the collection?

For example, if my IEnumerable<TicketDto> contains the following properties:

Active
Closed
Closed
Closed

... then the pie chart would show two categories: 25% active, and 75% closed.

Thanks!
Brian

Brian
Top achievements
Rank 2
Iron
 answered on 08 Jun 2018
3 answers
1.3K+ views
How might I make it so only the dropdowntree's leaves are selectable; and clicking parent nodes will either do nothing or expand the nodes?
Plamen
Telerik team
 answered on 08 Jun 2018
3 answers
252 views

Hi Folks,

i would like to update the markers of a map through signalR. i got it right for a grid control. but in map control, i just get a stack space error and nothing more.

Is it possible, that the map control has no implementation for this scenario, or am i missing something else?

 

Binding is done as follows:

 @(Html.Kendo().Map()
                .Name("mapVessels")
                .Layers(layers =>
                {
                    layers.Add()
                        .Type(MapLayerType.Tile)
                        .UrlTemplate("https://#= subdomain #.tile.openstreetmap.org/#= zoom #/#= x #/#= y #.png")
                        .Subdomains("a", "b", "c")
                        .Attribution("&copy; <a href='http://osm.org/copyright'>OpenStreetMap contributors</a>");

                    layers.Add()
                        .Type(MapLayerType.Marker)
                        .DataSource(dataSource => dataSource
                            .SignalR()
                            .AutoSync(true)
                            .Schema(schema => schema
                                .Model(model =>
                                {
                                    model.Id("ID");
                                    model.Field("ID", typeof(Guid)).Editable(false);
                                }))
                            .Events(events => events.Push("onPush"))
                            .Transport(tr => tr
                                .Promise("hubStart")
                                .Hub("hub")
                                .Client(c => c
                                    .Read("read"))
                                .Server(s => s
                                    .Read("read")))
                        )
                        .LocationField("LatLng")
                        .TitleField("Title")
                        .ValueField("Value")

                        //.Tooltip(tooltip=>tooltip
                        //    .Content())
                        ;
                })
                .Center(54.623, 13.2248)
                .Zoom(8)
                .Events(events => events.MarkerClick("onMarckerClick"))
    .Deferred()
    )

Stefan
Telerik team
 answered on 08 Jun 2018
3 answers
1.0K+ views

Hi,

I am using the file upload template to customize the file upload. Currently Async is set to false, so on select event I am displaying the template. But I want to use the in built function which displays the file size. I am using the below template but I don't want to display the file size in bytes. Is there a way I can achieve this? I created a custom function called formatFileSize() but I want to utilize the inbuilt function if available.

 

<script id="uploadFileTemplate" type="text/x-kendo-template">
        <div>
            <span class="k-file-extension-wrapper">
                <span class="k-file-extension">#=files[0].extension#</span>
                <span class="k-file-state"></span>
            </span>
            <span class="k-file-name-size-wrapper">
                <span class="k-file-name" title="#=name#">#=name#</span>
                <span class="k-file-size">#=formatFileSize(size,2)#</span>
            </span>
            <button id='btnFileDelete' type='button' class='k-upload-action' style='position: absolute; right: 0;' title="Delete">
                <span title="Remove" class="k-icon k-i-close k-i-x" aria-label="Remove"></span>
            </button>
        </div>
    </script>

<script type="text/javascript">

        function OnSelectUploadFile(e) {
            setTimeout(function () {
                $('#btnFileDelete > span').addClass('btnFileOverwrite');
                $('#btnFileDelete > span').attr('title', 'Delete the file');
                $('#btnFileDelete > span').text('Delete');
                $('#btnFileDelete').prepend('<i class="fas fa-times"></i>');
            });
            return true;
        }        
        function formatFileSize(bytes,decimalPoint) {
            if(bytes == 0) return '0 KB';
            var k = 1000,
                dm = decimalPoint || 2,
                sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
                i = Math.floor(Math.log(bytes) / Math.log(k));
            return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
        }

    </script>

I am using the below version of Kendo Mvc
2017.3.1018.545

 

 

Sriram
Top achievements
Rank 1
 answered on 07 Jun 2018
4 answers
918 views

HI

I have define a model with a [ScaffoldColumn(false)] column : 

  [ScaffoldColumn(false)]
  public string Column1 { get; set; }

but when I want to show this column in grid but that column not shown : 
 
  columns.Bound(column => column.Column1).Width(100);

After remove the [ScaffoldColumn(false)] from that column,
the column shown correctly.

[ScaffoldColumn(false)] column ignored by Grid internally even if Bound explicitly ? 

How could I show the [ScaffoldColumn(false)] column using Bound column ?

Best regards

Chris

 

 

Preslav
Telerik team
 answered on 07 Jun 2018
1 answer
698 views
Is it possible to disable/hide a specific button within the ButtonGroup?
Ianko
Telerik team
 answered on 07 Jun 2018
2 answers
415 views

I find this particular component anti-MVC as it is not offering features compared to every other Kendo UI MVC components. I need to have it bind to a model's property and generate button(s) from a data source. Each generated button can be customized like a Grid's columns are customized using the HtmlHelper. This is how I use it right now:

<div class="row">
    <div class="col-sm-12">
        <div class="form-group">
            @Html.LabelFor(m => m.PaymentModeId, new { @class = "control-label" })
            @(Html.Kendo().ButtonGroup()
                .Name("PaymentModeTest")
                .HtmlAttributes(new { @class = "form-control" })
                .Selection("single")
                .Index(0)
                .Items(t =>
                {
                    t.Add().Text("Cash");
                    t.Add().Text("Cheque");
                    t.Add().Text("Debit");
                    t.Add().Text("Free");
                    t.Add().Text("Credit Card");
                    t.Add().Text("eDirham");
                })
                .Events(ev => ev.Select("UpdateUiPaymentMode"))
            )
        </div>
    </div>
</div>

 

Here is the binding trick:

<input type="hidden" name="PaymentModeId" id="PaymentModeId" value=1 />

 

And the JS:

@section Scripts
{
    <script type="text/javascript">
        $(document).ready(function () {
            $('#divPaymentModeCheque').hide();
            $('#divPaymentModeDebit').hide();
            $('#divPaymentModeCreditCard').hide();
            $('#divPaymentModeEDirham').hide();
        });
 
        function UpdateUiPaymentMode(e) {
            // 0: Cash, 1
            // 1: Cheque, 2
            // 2: Debit, 3
            // 3: Free, 4
            // 4: Credit Card, 5
            // 5: e-Dirham, 9
 
            $('#divPaymentModeCheque').hide();
            $('#divPaymentModeDebit').hide();
            $('#divPaymentModeCreditCard').hide();
            $('#divPaymentModeEDirham').hide();
 
            switch (e.indices.toString()) {
                case "0":
                    // Cash
                    $('#PaymentModeId').val(1);
                    break;
 
                case "1":
                    // Cheque
                    $('#divPaymentModeCheque').show();
                    $('#PaymentModeId').val(2);
                    break;
 
                case "2":
                    // Debit
                    $('#divPaymentModeDebit').show();
                    $('#PaymentModeId').val(3);
                    break;
 
                case "3":
                    // Free
                    $('#PaymentModeId').val(4);
                    break;
 
                case "4":
                    // Credit Card
                    $('#divPaymentModeCreditCard').show();
                    $('#PaymentModeId').val(5);
                    break;
 
                case "5":
                    // eDirham
                    $('#divPaymentModeEDirham').show();
                    $('#PaymentModeId').val(9);
                    break;
            }
        }
    </script>
}

 

Joana
Telerik team
 answered on 07 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
DropDownButton
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
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
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?