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

Hi,

I am currently using a Grid with a SignalR datasource and expandable rows to show a Detail Template, every time a new record is created in the grid from the server (onPush) it collapses any/all detail templates which you may have been viewing. Kinda annoying, any way to resolve this?

@(Html.Kendo().Grid<Models.MyView>()
    .Name("Grid")
    .Columns(columns =>
    {
        columns.Bound(p => p.Column1);
        columns.Bound(p => p.Column2);
    })
    .ClientDetailTemplateId("template")
    .Sortable()
    .Scrollable(s => s.Height("auto"))
    .Filterable()
    .Pageable()
    .Navigatable()
    .DataSource(dataSource => dataSource
        .SignalR()
        .AutoSync(true)
        .ServerFiltering(true)
        .ServerPaging(true)
        .ServerSorting(true)
        .ServerAggregates(true)
        .ServerGrouping(true)
        .PageSize(20)
        .Events(events => events.Push("onPush"))
        .Sort(s => s.Add("Posted").Descending())
        .Transport(tr => tr
            .Promise("hubStart")
            .Hub("hub")
            .Client(c => c
                .Read("read")
                .Create("create")
                .Update("update")
                .Destroy("destroy")
            )
            .Server(s => s
                .Read("read")
                .Create("create")
                .Update("update")
                .Destroy("destroy")
            )
        )
        .Schema(schema => schema
            .Data("Data")
            .Total("Total")
            .Aggregates("Aggregates")
            .Groups("Groups")
            .Model(model =>
            {
                model.Id("ID");
                model.Field("Column1", typeof(string));
                model.Field("Column2", typeof(string));
            })
        )
    )
)

<script id="template" type="text/kendo-tmpl">
   @(Html.Kendo().TabStrip()
            .Name("tabStrip_#=ID#")
            .SelectedIndex(0)
            .Animation(animation => animation.Open(open => open.Fade(FadeDirection.In)))
            .Items(items =>
            {
                items.Add().Text("Detail")
                    .LoadContentFrom("Detail", "Home", new { ID= "#=ID#" })
                    .Selected(true);
            })
            .ToClientTemplate())
</script>

 

Thanks!

Stefan
Telerik team
 answered on 17 Apr 2017
2 answers
402 views

I have an MVC grid with the following settings:

 

                .Editable(editable => editable.Mode(GridEditMode.InLine))   
                .Navigatable()                                              

When the user is editing a row, I need to be able to trap when he/she leaves a particular cell so that I can perform a lookup on the value of the cell and place a default value in another cell. 

How can I capture the event that occurs when a user leaves a cell?

 

Randy
Top achievements
Rank 1
 answered on 14 Apr 2017
2 answers
143 views

Hello,

I have a startTime and a endTim on my Scheduler: from 7 AM to 16PM and I wonder if It's possible to hide one hour from 12 pm to 13pm.

@(Html.Kendo().Scheduler<KendoSchedulerMVC.Controllers.TAS_TasksViewModel>()
    .Name("scheduler")
    .Timezone("Etc/UTC")
    .Date(new DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day))
    .Height(800)
    .StartTime(new DateTime(2013, 6, 13, 7, 00, 00))
    .EndTime(new DateTime(2013, 6, 13, 16, 00, 00))

    .Editable(editable => editable
        .EditRecurringMode(SchedulerEditRecurringMode.Dialog)
    )
    .Selectable(false)
    .Views(views => {
        views.DayView();
        views.WorkWeekView();
        views.WeekView(w => w.Selected(true));
        views.MonthView();
        views.AgendaView();
    })
    .DataSource(d => d
        .Model(m => {
            m.Id(f => f.tas_id);
            m.Field(f => f.Title).DefaultValue("No title");
            m.RecurrenceId(f => f.RecurrenceID);
        })
        .Read(read => read.Action("TAS_Tasks_Read", "Scheduler"))
        .Create(create => create.Action("TAS_Tasks_Create", "Scheduler"))
        .Update(update => update.Action("TAS_Tasks_Update", "Scheduler"))
        .Destroy(destroy => destroy.Action("TAS_Tasks_Destroy", "Scheduler"))
    )
)

 

Thank you

 

Julien
Top achievements
Rank 1
 answered on 14 Apr 2017
1 answer
85 views

Hello,

I have already a startTime and endTime on my scheduler and I wa     

Ivan Danchev
Telerik team
 answered on 14 Apr 2017
8 answers
1.2K+ views
I have a grid which is editable in popup mode. I have two problems the first is that when the popup is shown it is too small and I have to scroll left to see the whole text box. Second I do not want the user to be able to change the UserId field as this is a key field generated by the database. So I either want the field hidden (including the label) or I want it disabled. 

Having looked at the forums I think the only way to solve this is to use a template. I tried to add a template but the popup does not use it, I am new to Kendo and Javascript so would appreciate if someone could tell me why it is not picking up my template. Both Grid code and template are shown below.

@(Html.Kendo().Grid(Model)
    .Name("Grid")
    .Columns(columns =>
    {
        columns.Bound(p => p.UserId).Hidden(true).Width(100);
        columns.Bound(p => p.Username).Width(200);
        columns.Bound(p => p.Password).Width(250);
        columns.Command(command => { command.Edit(); });
    })
    .Editable(editable => editable.Mode(GridEditMode.PopUp).TemplateName("AddEditUser"))
    .Pageable()
    .Sortable()
    .Scrollable()
    .DataSource(dataSource => dataSource
        .Ajax()
        .Model(model => model.Id(u => u.UserId))
        .Read("Users", "Home")
        .Update("UserListUpdate", "Home")
    )
)
 
<script id="AddEditUser" type="text/kendo-tmpl">
    <div class="k-edit-label">UserId: </div>
    <div class="k-edit-field">
        <input name="UserId" disabled class="k-textbox" />
    </div>
    <div class="k-edit-label">UserName: </div>
    <div class="k-edit-field">
        <input name="Username" required class="k-textbox" />
    </div>
    <div class="k-edit-label">Password: </div>
    <div class="k-edit-field">
        <input name="Password" required class="k-textbox" />
    </div>
</script>


Thank you
Dimiter Madjarov
Telerik team
 answered on 14 Apr 2017
1 answer
221 views

If I add the MVC Wrapper for a Dialog in a page, and initially set Visible(false), how do I set the actual content of the dialog via Javascript?

Background, I have a SignalR hub that is set to receive admin messages from the server, and I want the message sent by the server to be displayed in the dialog.  SO I put the basic dialog MVC wrapper in my page, with no content initially and when the SignalR hub receives a a message, I want it to display in that dialog then.

Joe
Top achievements
Rank 1
 answered on 13 Apr 2017
3 answers
1.4K+ views

Hi,

I can set Title HtmlAttribute for Edit and Destroy command button in Grid like:

                                command.Edit().HtmlAttributes(new { title = "Edit Row" });
                                command.Destroy().HtmlAttributes(new { title = "Delete Row" });

But I cannot find the way to set Title for buttons "Update" and "Cancel" which appears during editing.

Kind regards

Genadij

 

 

 

 


Viktor Tachev
Telerik team
 answered on 13 Apr 2017
1 answer
369 views

HI

How could I show the destroyed data in another Grid ?

I have met an error : 

grid2.setDataSource(grid.dataSource._destroyed);

Uncaught TypeError: e.fetch is not a function at init.setDataSource (kendo.all.min.js:48)


Best regards

Chris

 

Tsvetina
Telerik team
 answered on 13 Apr 2017
1 answer
401 views

Hi,

I have some questions about the Table Wizard:

- When I create a table, either using the normal way or through Table Wizard, I don’t have a way to edit that created table.
- When creating a table with the wizard, and setting table width and height, when typing inside of that table the cell widths start changing.
- When adding columns to an existing table, either left or right, it adds it in a very small width and unproportioned to the rest of the columns of the table.
- When creating a table with the wizard, configuring Cell properties without checking “Select All Cells”, does not allow to specify which cell to be configured, top left by default only.
- When creating a table with the wizard, set cellspacing: 10px, no effect on created Table.

Thanks!

Veselin Tsvetanov
Telerik team
 answered on 13 Apr 2017
1 answer
121 views
Hi guys,
I am using:
     1-Kendo MVC - 2014.3.1411.545
     2-Chrome/Mozilla regardless the version

I have been working with kendo UI scheduler control which works fine with its default functionality, but I need to do the customization to meets the requirements.

Here are the certain things I want to do with kendo scheduler:

1. I want to to generate kendo scheduler rows with respect to the binded resource dynamically.
2. To Remove the time slots and create appointments with certain height & width.
3. I want to show the kendo scheduler appointments created in concerned row with respect to every resource with a certain height and width.

I have uploaded an image to explain what I wanted to do with Kendo MVC scheduler.
Ivan Danchev
Telerik team
 answered on 13 Apr 2017
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
+? 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?