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

Hy,
I created a Spreadsheet. But I want to add a class to the SpreadsheetSheetRowCell Value attribute. The cell only shows me [object Object] in the view. I tried to override the toString method but with no effect.

As an example if my class looks like:
public class User
{
    public int ID { get; set; }
    public string FirstName { get; set; }
    public string LastName { get; set; }
}

How can I display the first and the last name?
Thx for Help!

Stephan
Top achievements
Rank 1
 answered on 18 Apr 2017
1 answer
185 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
407 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
144 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
89 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
225 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
377 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
408 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
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
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?