Telerik Forums
UI for ASP.NET MVC Forum
6 answers
827 views

I have kendo mvc grid and basically all functions are correct but when i try to export my excel from my grid it's downloading excel but hiding all columns results weirdly
Here my grid

@(Html.Kendo().Grid<Alerts>()
                .Name("grdWaterAlert").AutoBind(false)
                .HtmlAttributes("width: 100%;cellpadding:0;")
                .DataSource(d => d.Ajax().Read("GridWaterAlertBinding", "Dashboards"))
                .Columns(columns =>
                {
                    columns.Bound(e => e.BelIdent).Title("Id").Width("auto");
                    columns.Bound(e => e.StationCode).Title("Station Code").Width("auto");
                    columns.Bound(e => e.StationName).Title("Station Name").Width("auto");
                    columns.Bound(e => e.BelTarih).Title("DateTime").ClientTemplate("#= kendo.toString(BelTarih, 'MM/dd/yyyy') #").ClientGroupHeaderTemplate("DateTime" + ": #=  kendo.toString(value, 'MM/dd/yyyy') #").Width("auto");
                    columns.Bound(e => e.BelInsTime).Title("Alert Time").ClientTemplate("#= kendo.toString(BelInsTime, 'MM/dd/yyyy HH:mm tt') #").ClientGroupHeaderTemplate("DateTime" + ": #=  kendo.toString(value, 'MM/dd/yyyy HH:mm tt') #").Width("auto");
                    columns.Bound(e => e.BelTankId).Title("Tank ID").Width("auto");
                    columns.Bound(e => e.ProductCode).Title("Product Code").Width("auto");
                    columns.Bound(e => e.BelAlarm).Title("Alarm").Width("auto");
                    columns.Bound(e => e.BelTotCapacity).Title("Total Capacity").Width("auto");
                    columns.Bound(e => e.BelWaterVol).Title("Water Volume").Width("auto");
                })
                .ToolBar(toolBar =>
                {
                    toolBar.Excel().HtmlAttributes(new { @class = "btnexcel" }).Text(" ").IconClass("k-i-excel");
                    toolBar.Custom().Text((string)ViewData["ClearFilter"]).HtmlAttributes(new { @class = "k-button", id = "cleargrid", href = "#", onclick = "clearFiltersWaterLevel()" });
                })
                .Excel(excel => excel.FileName("WaterAlert.xlsx").Filterable(true))
                .Selectable()
                .Sortable()
                .AutoBind(false)
                .Pageable(pageable => pageable
                .Refresh(true)
                .PageSizes(true)
                .ButtonCount(5))
                .Filterable(filterable => filterable
                .Extra(false)
                .Operators(operators => operators
                .ForString(str => str.Clear()
                .StartsWith((string)ViewData["Startswith"])
                .Contains((string)ViewData["Contains"])
                ))
                )
                .Groupable()
                .Scrollable(scrolling => scrolling.Height("100%"))
                .Resizable(config =>
                {
                config.Columns(true);
                })
                .Reorderable(config =>
                {
                config.Columns(true);
                })
                .ColumnMenu()
            )

 

How can i fix this?

 

Thanks

Adil
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 23 Jun 2020
1 answer
534 views

Hi 

I Have a main grid and detail grid like this

https://docs.telerik.com/kendo-ui/knowledge-base/grid-excel-export-hierarchy-master-and-detail-separate-sheets

i need to have the detail grid column values separated in comma in another new  columns in excel in the same row of can you please help on this.

 

Thanks

Mohammed

 

 

Alex Hajigeorgieva
Telerik team
 answered on 23 Jun 2020
3 answers
258 views
Greetings,

I need a spellchecker to implement in my Telerik MVC editor.
From what I read in your documentation, I know I can integrate a spellchecker in my editor or I can use the RadSpellChecker.

I think these are to viable solutions, but I need one more functionality.
Is there anyway that I can right click the misspelled word and correct it, using Telerik dictionaries instead of native browser dictionaries?

Regards.

Petar
Telerik team
 answered on 23 Jun 2020
5 answers
1,000 views

My company is trying to be on the cutting edge. 

We built some CRUD pages using Kendo UI. But having problems with the drop down list. In .Net Core we are using razor pages, but the concepts is the same.

 

    @(Html.Kendo().Grid<NG.Analytics.Models.Applications>()//(Model.Data)
                    .Name("Grid")
                    .Columns(columns =>
                    {
                        columns.Bound(a => a.Id).Title("ID").Visible(false);
                        columns.Bound(a => a.CategoryId).EditorTemplateName("ApplicationCategory"); //Having trouble with what to put right here. 
                        columns.Bound(a => a.CategoryId).Title("CategoryID");
                        columns.Bound(a => a.Title).Title("Title").Width(200);
                        columns.Bound(a => a.Description).Title("Description");
                        columns.Bound(a => a.BaseUrl).Title("Base Url").Width(120);
                        columns.Bound(a => a.Url).Title("Url");
                        columns.Bound(a => a.IconUrl).Title("Icon Url").Width(350);
                        columns.Bound(a => a.IsExternal).Title("Is External").Width(120);
                        columns.Command(command => { command.Edit(); }).Width(90);
                        columns.Command(command => { command.Destroy(); }).Width(100);
                        columns.Command(command => command.Custom("ViewDetails").Click("showDetails"));
                    })
                    .ToolBar(toolbar => toolbar.Create())
                    .Editable(editable => editable.Mode(GridEditMode.PopUp))
                    .Sortable()
                    .Scrollable()
                    .Filterable()
                    .HtmlAttributes(new { style = "height: 750px;" })
                    .DataSource(dataSource => dataSource
                            .Ajax()
                            .Model(model =>
                            {
                                model.Id(a => a.Id); // Specify the property which is the unique identifier of the model
                    model.Field(a => a.Id).Editable(false); // Make the ID property not editable
                                                            //model.Field(p => p.CategoryId).DefaultValue(
                                                            //Model.ApplicationCategory as Models.ApplicationCategory);
                })
                            .Read(read => read.Url("?handler=Data").Type(HttpVerbs.Get))
                            .Create(update => update.Url("?handler=CreateApplications").Type(HttpVerbs.Post))
                            .Destroy(update => update.Url("?handler=Applications").Type(HttpVerbs.Delete))
                            .Update(update => update.Url("?handler=UpdateApplications").Type(HttpVerbs.Put)))
    )

    <partial name="EditorTemplates/ApplicationCategoryEditor" /> //Editor is working as expected when normally use.

Here is what the partial looks like:

 

@(Html.Kendo().DropDownList()
                      .Name("CategoryName")
                      .DataTextField("CategoryName")
                      .DataValueField("Id")
                      .BindTo(Model.ApplicationCategory)
                      .HtmlAttributes(new { style = "width: 100%" })
)

 

I know you guys are pretty good and responsive. I just hope I can find the answer. 

Thanks, Trung

Georgi
Telerik team
 answered on 23 Jun 2020
1 answer
320 views

Is there a way to setup overflow on a ButtonGroup?

 

<div class="demo-section k-content"  >
  
            
                @(Html.Kendo().ButtonGroup()
                .Name("DashboardNavigate-select")
                .HtmlAttributes(new { style = "  display:" + displayToolbar + ";    " })

                        .Items(t =>
                    {
                      foreach (KeyValuePair<string, string>     kvp in Model.ButtonList)
                    {
                        
                              t.Add().Text(kvp.Value).HtmlAttributes(new { datavalue = kvp.Key.ToString() });
                         
                    }

                        })
                 .Events(events => events.Select("buttonNavigateNew"))

                )
              
</div>

Ivan Danchev
Telerik team
 answered on 22 Jun 2020
1 answer
349 views

I'm trying to use FileManager to access a network share on behalf of the user using the app. We want to make sure that the user using the app belongs to an active directory group that has access to the share.

I'm at the point where we can retrieve a list of active directory groups that have access to the requested network folder using a PrincipalContext, and can verify that the current user belongs to one of the groups with access permissions. 

However, it seems like this authorization takes ~2 minutes to complete, which makes the filemanager unusable by our users.

Is anyone using FileManager for something like this, and if so, do you have any recommendations for checking if the user has access to a network share?

Aleksandar
Telerik team
 answered on 22 Jun 2020
2 answers
553 views

I have a simple grid and try to get the updated row on server side but the model send is always empty

Client side Grid (View)

<div class="card-body">
        @(Html.Kendo().Grid<CoopTel_MultiLocation.Models.DummyModel>()
                    .Name("grid")
                    .Columns(columns =>
                    {
                        columns.Bound(p => p.Col1).Filterable(false);
                        columns.Bound(p => p.Col2);
                        columns.Bound(p => p.Col3);
                        columns.Bound(p => p.Col4);
                        columns.Bound(p => p.Col5);
                        columns.Bound(p => p.TestBooleen);
                        columns.Command(command => { command.Edit(); command.Destroy(); }).Title("Commandes").Width(250);
                    })
                    .Editable(editable => editable.Mode(GridEditMode.InLine))
                    .Pageable()
                    .Sortable()
                    .Scrollable()
                    .ToolBar(toolbar =>
                    {
                        toolbar.Search();
                        toolbar.Create();
                    })
                    .HtmlAttributes(new { style = "height:550px;" })
                    .DataSource(dataSource => dataSource
                        .Ajax()
                        .PageSize(20)
                        .Model(model => { model.Id(p => p.Col1); })
                        .Read(read => read.Action("GetLocationUI", "GestionLocation"))
                        .Update(update => update.Action("DetailLocationUpdate", "GestionLocation"))
                        .Destroy(destroy => destroy.Action("DetailLocationDestroy", "GestionLocation"))
                        .Create(update => update.Action("DetailLocationCreate", "GestionLocation"))
                    )
        )
    </div>

GestionLocationController

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult DetailLocationUpdate([DataSourceRequest] DataSourceRequest request, DummyModel Locations) <-- Location is always empty 
        {
            return Json("");
        }

Marc Jr
Top achievements
Rank 1
 answered on 22 Jun 2020
11 answers
2.3K+ views
I have the following ComboBox on my view
@(Html.Kendo().ComboBoxFor(m => m.CurrentBooking.Resource.ResourceId)
    .Name(
"resourceAutoComplete")
    .DataTextField(
"ResourceName")
    .DataValueField(
"ResourceId")
    .BindTo(Model.Resources)
    .Placeholder(
"Select resource"))
But in my Save() action the Model.CurrentBooking.Resource is always null, and Model.CurrentBooking.ResourceId is always 0.

What am I doing wrong in my ComboBoxFor() configuration?
Martin
Telerik team
 answered on 22 Jun 2020
1 answer
121 views

Hi, I'm new in Telerik and currently using VB.net for my code. Can someone help to convert the below code to vb in vbhtml?

.DataSource(dataSource =>
    dataSource.Ajax().Read("AjaxInitGrid", "Shared").Model(model =>
    {
        model.Id(p => p.ID);
        model.Field(p => p.CreationDate).Editable(false);
           model.Field(p => p.BirthDate).Editable(false);
    })
)

 

I not able to convert model.Field(p => p.CreationDate).Editable(false) to vb.

Thanks.

 

Dimitar
Telerik team
 answered on 22 Jun 2020
3 answers
840 views

Hi,

I have a kendogrid in MVC , in that i am loading switch and textbox and dropdown control using client template, below is the example, but when i change the value in textbox  and dropdownlist and switch and then i go to the next page in the grid  the entered and selected value is lost and back to original.for example below you can check, Is there any way to maintain the selected and entered value in the grid when i go to the next page in grid, please help on this.

 

 

http://dojo.telerik.com/@Iliana/eYUCi

 

Thanks

Mohammed

Tsvetomir
Telerik team
 answered on 19 Jun 2020
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
Upload
ComboBox
MultiSelect
Window
ListView
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
Licensing
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
AICodingAssistant
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?