Telerik Forums
UI for ASP.NET MVC Forum
1 answer
12.8K+ views
Hi Team,

I'd like to know how the column headers in a grid may be hidden. The effect I wish to achieve is something like the following:

Instead of:

Order ID        Employee                Ship Address
10251            Janet Leverling        2, rue du Commerce
10252            Margaret Peacock    Boulevard Tirou, 255

I wish to make my grid look like:

10251             Janet Leverling         2, rue du Commerce
10252             Margaret Peacock     Boulevard Tirou, 255

Just the same thing, but without the headers. Please let me know how to achieve this.
Stefan
Telerik team
 answered on 21 May 2018
1 answer
1.4K+ views

I'm trying to create a custom number format for a bound column using MVC/Grid like you see in Excel where you have a positive;negative;zero formats  I keep getting errors this is what I've tried:

.ClientTemplate("#= kendo.toString(RegularTimeHours, '##,##0.00;(##,##0.00);-' ) #")

.ClientTemplate("#= kendo.toString(RegularTimeHours, '{0:##,##0.00;(##,##0.00);-}' ) #")

 

Could I get some direction on how to do this?

Thanks

Lee

Stefan
Telerik team
 answered on 21 May 2018
2 answers
2.3K+ views

The MultiSelect-control is bound to a list of strings and it's required that the user select exactly four items.

How can I validate that with Kendo Validator or ASP.Net Validation?

I have also tried to use the Required annotation on the model property, but only that doesn't work.
Neither do the Range-keyword since it only works for numeric fields.

 

Johan
Top achievements
Rank 1
 answered on 19 May 2018
3 answers
652 views

HI I have asp.net mvc application with below telerik grid whcih i want to bind with asp.net webapi hosted on IIS. i can't find any ecample where to put the webapi url and how weapi's controller is invoked. please help in responding to this

 

 @(Html.Kendo().Grid<TelerikMvcApp131.Models.DeviceDetailsChild>()
                        .Name("webapi_grid")
                        .Columns(columns =>
                        {
                            columns.Bound(p => p.person).Title("ID").Width(100);
                         
                            columns.Command(command => { command.Edit(); command.Destroy(); }).Width(200);
                        })
                        .ToolBar(tools =>
                        {
                            tools.Create();
                        })
                        .Sortable()
                        .Pageable()
                        .Filterable()
                        .DataSource(dataSource =>
                            dataSource
                            .WebApi()
                            .Model(model =>
                            {
                                model.Id(p => p.Network);
                            })
                            .Events(events => events.Error("error_handler"))
                            .Read(read => read.Url(Url.HttpRouteUrl("DefaultApi", new { controller = "product" })))
                     
                        )
                    )

 

Where should i define DefaultApi inside asp.net mvc application (note DefaultApi is defined inside webapi already)

Boyan Dimitrov
Telerik team
 answered on 18 May 2018
1 answer
644 views

So I pass in a model list of objects into my view, I reference this in my foreign key column and use filterable.UI to link to a separate function to control the filter. But when I try to do this the grid ignore my .Filterable options and uses the data from my Model.List to populate the filter, this is not the case with a non-foreign key column.

Does anyone know how to use custom filter options with a foreign key column in a kendo grid?

Tsvetina
Telerik team
 answered on 17 May 2018
1 answer
182 views

Using MVC; How do I get the labels (months)  to dynamically align at the bottom of the chart (see attached image) when values are negative?

I have tried:

.Labels(labels => labels.Padding(80, 0, 0, 0))

but it changes the scale of my chart if there are no negative values.

Stefan
Telerik team
 answered on 17 May 2018
1 answer
124 views
How does an MVC grid, or it's datasource determine which controller methods to use when Creating, reading, updating and destroying data utilizing the datasource.sync() method?  I have a grid that that when sync is called, it is trying to use the update method on a new record which causes an error.  I can't figure out how to identify the new record to the grid and datasource so that it will use the create method instead.  Has anyone else experienced this issue?
Casey
Top achievements
Rank 1
 answered on 16 May 2018
3 answers
620 views
Hello I want to export pivot grid with expanded rows and columns to excel/ pdf. The current demo does not reflect this.
Viktor Tachev
Telerik team
 answered on 15 May 2018
1 answer
199 views
hai how to keep our own popup instead of Resources popUp  in gantt chart 
Ivan Danchev
Telerik team
 answered on 15 May 2018
3 answers
1.0K+ views

I am apparently missing something in setting up a combo box, can someone help me out?

I followed the examples, and got to here:

------

        public JsonResult GetItems(string filter)
        {
            List<Item> Items = new List<Item>();
            if (!string.IsNullOrEmpty(filter))
                using (ScratchDBClassesDataContext DB = new ScratchDBClassesDataContext())
                    Items = DB.Items.Where(itm => itm.Name.Contains(filter)).ToList();
            return Json(Items, JsonRequestBehavior.AllowGet);
        }

------

@(Html.Kendo().ComboBox()
        .Name("ItemCombo")
        .DataSource(ds =>
        {
            ds.Read(read =>
            {
                read.Action("GetItems", "Home").Data("FilterValue");
            });
            ds.ServerFiltering(true);
        })
        .DataTextField("Name")
        .DataValueField("ItemID")
        .AutoBind(false)
        .MinLength(3)
        .ClearButton(true)

)
<script>
    function FilterValue() {       
        var ItemCombo = $("#ItemCombo").data("kendoComboBox");
        return { filter: ItemCombo.text() };
    }
</script>

------

 

It works initially - once I type 3 characters, the read action runs and my initial results are shown in the popup.  However, after that, the read action never fires again when I continue typing, so the box never further filters my results. 

 

I put a breakpoint in my controller code as well as an alert in the "FilterValue" function, and I can confirm that the action is not firing.

 

I discovered that if I add ".Filter(FilterType.Contains)" to the combobox configuration, the action fires every time I type after the 3rd character but my controller receives a null value for the filter string. An alert in "FilterValue" shows that ItemCombo.text() has the value I want, but it isn't being sent to the controller.

 

What have I missed here?

Tony
Top achievements
Rank 1
 answered on 14 May 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?