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

Hello,

i run into a problem about conditional binding properties. I want certain properties only writeable on creating an entity, but not on editing. Generally i can fix it on server side by just adding code to check it or just not bind some properties. But how i can solve this on client side? Let's take the following example:

Data model ->

public classs MyDataModel
{
    [ScaffoldColumn(false)]
    public long Id { get; set; }
 
    [Required(AllowEmptyStrings = false)]
    [StringLength(255)]
    [DisplayName("Title")]
    public string Title { get; set; }
 
    [Required(AllowEmptyStrings = false)]
    [StringLength(255)]
    [DisplayName("Description")]
    public string Description { get; set; }
 
    [Required(AllowEmptyStrings = false)]
    [DisplayName("Type")]
    [DefaultValue(1)]
    public int TypeOfSomething { get; set; }
}

 

So "TypeOfSomething" should be only writeable on creating the entity. On later editing it should be read only. There is an interesting approach in this comment http://www.codethinked.com/aspnet-mvc-think-before-you-bind/comment-page-1#comment-3933, but i don't see any way to realize this with the Telerik Grid.
Maybe one of you guys have an idea or some hints for achieving this on client side with the Telerik Grid.

 thanks & regards

Alexander Popov
Telerik team
 answered on 08 Jul 2015
1 answer
166 views

Hi,

Is it possible that Kendo UI to detect Microsoft Edge browser? It seem like currently it is detect as Webkit.

Sample of Microsoft Edge user agent string from https://msdn.microsoft.com/en-us/library/hh869301%28v=vs.85%29.aspx:

Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0

Thanks.

Kiril Nikolov
Telerik team
 answered on 08 Jul 2015
1 answer
140 views

Hi,

Is it scrollable tab must set the width to tabstrip and cannot auto detect? How to make it work as responsive, automatically scroll when browser width smaller than tabstrip width and hide when exceed tabstrip width.

 

Thanks.

Dimo
Telerik team
 answered on 07 Jul 2015
3 answers
234 views

Hello

    Perhaps telerik diagrams are quite good, but I can't find out how to reload a diagram?

I have a diagram like this:

 

@(Html.Kendo().Diagram()
              .Name("diagram")
              .DataSource(dataSource => dataSource
              .Read(read => read
                          .Action("GetLinkedPersonsData", "KartotekaKlientow")
              )
              .Model(m => m.Children("Items"))
              )
              .Editable(false)
              .Layout(l => l.Type(DiagramLayoutType.Layered))
              .ShapeDefaults(sd => sd
                      .Visual("LinkedPersonsTemplate")
              )
              .ConnectionDefaults(cd => cd
              .Stroke(s => s
              .Color("#979797")
              .Width(2)
              )
              )
)

and when I click I want the diagram to reload and get new data without refreshing the page. It would be also solution to inject new data into diagram. 

Is there any way to to any of these?

Daniel
Telerik team
 answered on 07 Jul 2015
1 answer
180 views

Hello,

 I'm trying to add the ability for the user to refresh manually the tree list view. I was able to display the reload icon on others telerik controls but can't find the way to do it on a tree list.

Code:

@(Html.Kendo().TreeList<Document>()
                        .Name("sharepointdocumentviewertreelist")
                        .Columns(columns =>
                        {
                            columns.Add().Field(e => e.Title).Width(180).TemplateId("documenttitle-template");
                            columns.Add().Field(e => e.SPItemId).Width(20).Hidden(true);
                            if (Model.showTaskIDColumn)
                            {
                                columns.Add().Field(c => c.TaskID).Width(30).Title("Task ID").Hidden(true);
                            }
                            columns.Add().Field(c => c.EmailFrom).Width(65).Hidden(false);
                            columns.Add().Field(c => c.ExchangeReceivedTime).Width(40).Template("#=kendo.toString(kendo.parseDate(data.ExchangeReceivedTime, 'yyyy-MM-dd'), 'dd/MM/yyyy') #").Title("Received").Hidden(false);
                            columns.Add().Field(c => c.EmailTo).Width(75).Hidden(true);
                            columns.Add().Field(c => c.LinkToItem).Width(190).Hidden(true);
                            columns.Add().Field(c => c.EmailId).Width(190).Hidden(true);
                            columns.Add().Field(c => c.IsParentEmail).Hidden(true);
                            columns.Add().Field(c => c.EmailBody).Hidden(true);
                            columns.Add().Field(c => c.DocumentType).Hidden(true);
                            columns.Add().Field(c => c.FileNoteId).Hidden(true);
                        })
                        .Filterable()
                        .Sortable()
                        .Selectable(true)
                        .Scrollable(true)
                        .Events(events =>
                        {
                            events.Change("SharepointDocumentViewerTreelistOnChange").DataBound("DocViewerDataBound");
                        })
                        .DataSource(dataSource => dataSource
                            .Read(read => read.Action("GetDocumentsMetadata", "Documents", new RouteValueDictionary(){
                                { "spItemId", Model.spItemID }, { "emailID", Model.emailID }, { "caseID", Model.caseID }}))
                            .ServerOperation(false)
                            .Model(m =>
                            {
                                m.Id(f => f.SPItemId);
                                m.ParentId(f => f.ParentSPItemID);
                                m.Field(f => f.FileType);
                                m.Field(f => f.Title);
                            })
                        )
                        .Height(200)
                    )

 

Thanks in advance,

Tiago

Dimo
Telerik team
 answered on 07 Jul 2015
5 answers
213 views

Hi,

I am a new user of Telerick, and i want to know if there is any way to save rowcommand button to localstorage?
i am using a grid view, and for some columns i am implementing button to download some file from the server.
Everything works well, only when i try to save the state of my grid to the local storage then when i reopen my grid all my buttons are not working any more.
Thanks in advance.

 Thanks

 Monta

Kiril Nikolov
Telerik team
 answered on 07 Jul 2015
4 answers
365 views
I have a menu that I want to add tooltips to. So far, I have added a tooltip, but it is for the entire menu and I would like different tooltips for each menu item.

Is this possible and if so, how would I do it?

Here is the code I have so far:
<div style="background-color: #41526e; float: left">
    @(Html.Kendo()
          .Menu()
          .Name("Menu")
          .Items(items =>
          {
              items.Add().Text("Home").Action("Index", "Home").ImageUrl(Url.Content("~/Images/Home.png"));
              items.Add().Separator(true);
              items.Add()
                   .Text("Search")
                   .Action("Search", "Catalog")
                   .ImageUrl(Url.Content("~/Images/Search.png"));
              items.Add().Separator(true);
              items.Add()
                   .Text("First Action")
                   .Action("FirstAction", "Catalog")
                   .ImageUrl(Url.Content("~/Images/Promote.png"));
              items.Add().Separator(true);
              items.Add()
                   .Text("Second Action")
                   .Action("SecondAction", "Catalog")
                   .ImageUrl(Url.Content("~/Images/Promote.png"));
              items.Add().Separator(true);
              items.Add()
                   .Text("Subscription Stuff")
                   .Action("Index", "Subscription");
              items.Add().Separator(true);
              items.Add()
                   .Text("Schedule Stuff")
                   .Action("CreateSchedule", "Subscription");
          })
          .Orientation(MenuOrientation.Vertical)
    )
 
    @(Html.Kendo()
        .Tooltip()
        .For("#Menu")
        //.Filter("button")
        .AutoHide(true)
        .Content("Greetings, Puny Earthling! This is a tooltip for your edification.")
        .Position(TooltipPosition.Top)
        .Width(200)
    )
 
</div>

 

TIA<

Bob

Bob
Top achievements
Rank 2
 answered on 06 Jul 2015
1 answer
179 views

Hi,

Am I going mad or are the "Mobile" demos removed from the mvc demos (http://demos.telerik.com/aspnet-mvc/)? If so, where can I find them? thanks in advance!

Best regards,

Ruud

Sebastian
Telerik team
 answered on 06 Jul 2015
2 answers
105 views
When I run the upgrade wizard to complete the version upgrade noted in the title, the wizard removes Telerik.web.UI from my references and adds a bunch of Telerik.Windows.* references instead.  I know that is part of the winforms package, but why would the upgrade wizard remove the web assemblies and add the winforms assemblies to a web application?  Is this a known issue?
Dyanko
Telerik team
 answered on 06 Jul 2015
1 answer
92 views

I have the following code:

var recurrenceEditor = $("#RecurrenceRule", form).kendoRecurrenceEditor(
     {
       frequencies: ["daily", "weekly", "monthly"]
     }
   ).data("kendoRecurrenceEditor");

 

I'm trying to convert this to typescript. Kendo.all.d.ts does not seem to recognize this.

How do I solve this?

 

thanks in advance

Georgi Krustev
Telerik team
 answered on 06 Jul 2015
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
Upload
ComboBox
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
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
ListView (Mobile)
Pager
Accessibility
ColorPicker
DateRangePicker
Wizard
Security
Styling
Chat
MediaPlayer
TileLayout
DateInput
Drawer
SplitView
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Template
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
AppBar
BottomNavigation
Card
FloatingActionButton
Licensing
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
DateTimePicker
TimePicker
StockChart
RadialGauge
ContextMenu
ArcGauge
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?