Telerik Forums
UI for ASP.NET MVC Forum
1 answer
149 views
Grid values do not seem to use the DisplayTemplate as defined.  Is there something to do to get them to use them?

I suppose as an alternative I could use the ClientRowTemplate and do it that way, but seems over kill.
Dimiter Madjarov
Telerik team
 answered on 16 Apr 2013
2 answers
334 views
Hello!
I want  editing as here  http://www.kendoui.com/code-library/mvc/grid/using-multiselect-in-grid.aspx and 

I have Model:
public class ShrinkCoeffModel
    {
        [Display(Name = "thickness")]
        public virtual int Thickness { get; set; }
           
        [Display(Name = "wett")]
        public virtual string[] Wetness { get; set; }
   
        [Display(Name = "coeff")]
        public virtual decimal[] Coeff { get; set; }
    }
and Grid: (1.png)
@(
 Html.Kendo().Grid(Model)
                .Name("ShrinkCoeff")
                .ToolBar(commands =>
                {
                    commands.Create();
                })
                .Columns(columns =>
                {
                    columns.Bound(o => o.Thickness);
                    for (int i = 0; i < Model.FirstOrDefault().Wetness.Count(); i++)
                    {
                    columns.Bound(o => o.Wetness[i]);
                           
                    }
                    columns.Command(command =>
                    {
                        command.Edit();
                        command.Destroy();
                    }).Width(210).Title("Действия");
                })
                .Editable(editable => editable.TemplateName("Item").Mode(GridEditMode.PopUp))
                .DataSource(dataBinding => dataBinding
                    .Server()
                                                    .Model(model => model.Id(o => o.Thickness))
                                                        .Update("Edit", "ShrinkCoeff")
                                                        .Create("Create", "ShrinkCoeff")
                                                        .Destroy("Delete", "ShrinkCoeff"))
                .Pageable()
                .Sortable()
                .Selectable()
)
And if I click Edit I see this: 2.png 

But I want :

first Wetness             first Coeff                                                     
second Wetness      second Coeff  
.....                                  ......

how to display  also to and edit
how I can this do?

(I can pass my model to EditorTemplates and use:
@foreach(Type item in Model)
{
......) 
There are other ways?)
Gusev
Top achievements
Rank 1
 answered on 15 Apr 2013
1 answer
156 views
I want use text box in form or grid that user can only select value from special list for this action I want show button inside textbox and user click on this button an show list on data and after select special record the value of select record show on text box and popup window close.
Saeid
Top achievements
Rank 1
 answered on 15 Apr 2013
0 answers
100 views
Hi
I want create a page that show data of a table in form style I want use anythings like paging and arrow key to navigate between records (like grid control) on this page, kendo don't have anything for this purpose?
Saeid
Top achievements
Rank 1
 asked on 14 Apr 2013
0 answers
124 views
For example ,I want to find the object that its id in "101,1011,1001' and name "Lucy" called filterstring.Need I have to filter 3 times?
$("#Grid").data("kendoGrid").dataSource.filter([
{ field: "id", operator: "eq", value: "101"},
{ field: "id", operator: "eq", value: "1001"},
{ field: "id", operator: "eq", value: "1001"}
{ field: "name", operator: "eq", value: "Lucy"}
]);
PEIYANG
Top achievements
Rank 1
 asked on 14 Apr 2013
6 answers
290 views
I have a groupable grid which I have included a <br> it some of the column titles.
The column title displays correctly, but when I drag the column to the group area, the '<br>' is displayed in the column name.  I have attached a screen capture of the issue. 
I would be OK if the <br> were replaced by a space, or if it wapped..  any suggestions?
Thanks!

Below is the razor / view code:
@model Maris.Presentation.Models.EventSummary.EventSummaryMasterViewModel
@{
    ViewBag.Title = "Event Summary";
}
@(Html.Kendo().Grid(Model.Data)
.Name("EventSummary")
.DataSource(dataSource => dataSource
        .Server()
        .PageSize(20)
)
 
.CellAction(cell =>
{
    if (cell.Column.Title.Equals("Name"))
    {
        cell.HtmlAttributes["style"] = String.Format("background-color: {0}; color: {1}",
            cell.DataItem.VesselNameBackColor, cell.DataItem.VesselNameForeColor);
    }
    else if (cell.Column.Title.Equals("Type"))
    {
        cell.HtmlAttributes["style"] = String.Format("background-color: {0}; color: {1}",
            cell.DataItem.VesselTypeBackColor, cell.DataItem.VesselTypeForeColor);
    }
    else if (cell.Column.Title.Equals("Arrival<br>Time"))
    {
        cell.HtmlAttributes["style"] = String.Format("color: {0}",
            cell.DataItem.ArrivalTimeForeColor);
    }
    else if (cell.Column.Title.Equals("Departure<br>Time"))
    {
        cell.HtmlAttributes["style"] = String.Format("color: {0}",
            cell.DataItem.ArrivalTimeForeColor);
    }
    else if (cell.Column.Title.Equals("Arrival<br>Date"))
    {
        cell.HtmlAttributes["style"] = String.Format("background-color: {0}; color: {1}",
            cell.DataItem.ArrivalBackColor, cell.DataItem.ArrivalForeColor);
    }
    else if (cell.Column.Title.Equals("Departure<br>Date"))
    {
        cell.HtmlAttributes["style"] = String.Format("background-color: {0}; color: {1}",
            cell.DataItem.DepartureBackColor, cell.DataItem.DepartureForeColor);
    }
    else if (cell.Column.Title.Equals("Current<br>Berth"))
    {
        cell.HtmlAttributes["style"] = String.Format("background-color: {0}; color: {1}",
            cell.DataItem.CurrentBerthBackColor, cell.DataItem.CurrentBerthForeColor);
    }
    else if (cell.Column.Title.Equals("Current<br>Activity"))
    {
        cell.HtmlAttributes["style"] = String.Format("background-color: {0}; color: {1}",
            cell.DataItem.CurrentActivityBackColor, cell.DataItem.CurrentActivityForeColor);
    }
})
.Columns(columns =>
    {
        columns.Bound(d => d.Status);
        columns.Bound(d => d.Updated);
        columns.Bound(d => d.Quarantine);
        columns.Bound(d => d.Name);
        columns.Bound(d => d.Num);
        columns.Bound(d => d.Agent);
        columns.Bound(d => d.Type);
        columns.Bound(d => d.Flag);
        columns.Bound(d => d.CallSign);
        columns.Bound(d => d.MMSI);
        columns.Bound(d => d.Announce);
        columns.Bound(d => d.ArrivalDate)
            .Format("{0:MM/dd/yyyy}")
            .Title("Arrival<br>Date");
        columns.Bound(d => d.ArrivalTime)
            .Format("{0:HH:mm}")
            .Title("Arrival<br>Time");
        columns.Bound(d => d.DepartureDate)
            .Format("{0:MM/dd/yyyy}")
            .Title("Departure<br>Date");
        columns.Bound(d => d.DepartureTime)
            .Format("{0:HH:mm}")
            .Title("Departure<br>Time");
        columns.Bound(d => d.CurrentBerth)
            .Title("Current<br>Berth");
        columns.Bound(d => d.CurrentActivity)
            .Title("Current<br>Activity");
    })
    .Pageable(paging => paging
        .Refresh(true)
        .PreviousNext(true)
        .PageSizes(new []{ 20, 40, 80, 100 })      
        .Input(true)
    )
    .Groupable()
    .Sortable(sortable => sortable
            .AllowUnsort(true)
            .SortMode(GridSortMode.MultipleColumn))
    //.HtmlAttributes(new { style = "height:100%" }) 
    //.Scrollable()
    .Filterable()
    .ColumnMenu()
    .Resizable(resize => resize.Columns(true))
    .Reorderable(reorder => reorder.Columns(true))
     
)
Galen Giebler
Top achievements
Rank 1
 answered on 12 Apr 2013
3 answers
118 views
Hello,

I encounter a little annoying issue with cascading combos, tried couple of things but failed to obtain desired behavior so far. I hope someone can suggest a way to address the following problem.

When I edit an entity with cascaded combos (so the entity exists all properties have proper values). I BindTo the combos server side on the view creating the page, I would expect that on the client side the combos will appear with the proper text inside.. so the item with the right value will just be selected on each combo as I provided adequate items to each of them. It works properly for the first combo, but next ones that are cascaded will not use the items that I specified with BindTo on the server wrapper, instead they execute the ajax call and bring again actually the same items that I provided with BindTo. In this time I see in the combobox input the value which is a GUID and it looks really "unfinished".

What is the right way to handle this in order to achieve proper presentation of the combos when the page is just displayed  (one thing that cross my mind is to wire up all cascading infrastructure on the client side - but that would defeat the goal of using MVC wrappers to deal with wiring of cascades).

Thank you
Vasile
Georgi Krustev
Telerik team
 answered on 12 Apr 2013
1 answer
126 views
Is there a way to put the pager control somewhere else on the page, using the MVC wrappers? It seems like the pager is always rendered after the listview. I would like to have it in a separate pane (seperated by a kendo splitter) on my page? Is this possible with the MVC wrappers, or will I have to resort to a native javascript implementation?
Dimiter Madjarov
Telerik team
 answered on 12 Apr 2013
2 answers
110 views
Hello,
i tried to use HtmlAttributes method on a grid command column,with the following
....
command.Edit().Text(" ").HtmlAttributes(new {@class = "min-width-class" });
and nothing happened.

Is this possible, can i put a class to this button?

Regards,
Daniel
Daniel
Top achievements
Rank 1
 answered on 12 Apr 2013
12 answers
122 views
Hello,
In IE9,sometimes,i get the pagination for the grid,without round buttons,insteed they are square,could you tell me why?

Regards,
Daniel
Daniel
Top achievements
Rank 1
 answered on 12 Apr 2013
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
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
ColorPicker
DateRangePicker
Security
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
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?