Telerik Forums
UI for ASP.NET MVC Forum
3 answers
117 views
Hello,

I have been trying to get the batch grid to work with a file upload. The aim is to update the grid with the information in the text file. Would this be a common scenario which has been tried before? 

For temporary solution, I processed the uploaded file and save it in the server and render the partial view which contain
@html.Kendo().Grid()

Then, during loading of the partial view, the Read( read.Action ("Test","TestController")) is invoked and load the data from the text file.

Is there a way to set the dirty flag manually after the initial load of the grid so that I can click the save button?

Thank you,

-sk 
Dimiter Madjarov
Telerik team
 answered on 18 Dec 2014
2 answers
703 views
I have a situation, in which the Kendo().DropDownListFor isn't working as expected; I'm using a dropdown in a KendoGrid edit popup. The user is allowed to choose a user friendly value for a foreign key.

This is working:

@Html.DropDownListFor(m => m, new SelectList(ViewBag.Partners, "Id", "FriendlyName"), "Select Partner")

But this is not:

@(Html.Kendo().DropDownListFor(m => m)
    .BindTo(new SelectList(ViewBag.Partners, "Id", "FriendlyName"))
    .OptionLabel("Select Partner"))

In both cases, the dropdown is displayed correctly, and the initial value is correctly selected.
However, when saving, the Id field is cleared. When I look at the generated HTML markup, this is a part of it:

<ul unselectable="on" class="k-list k-reset" tabindex="-1" role="listbox" aria-hidden="true" id="PartnerId_listbox" aria-live="off" style="overflow: auto; height: auto;"><li tabindex="-1" role="option" unselectable="on" class="k-item">Select Partner</li><li tabindex="-1" role="option" unselectable="on" class="k-item">Indicia Test SFTP</li><li tabindex="-1" role="option" unselectable="on" class="k-item">Indicia Test Mail</li><li tabindex="-1" role="option" unselectable="on" class="k-item">Indicia Test FS</li><li tabindex="-1" role="option" unselectable="on" class="k-item k-state-selected k-state-focused" id="PartnerId_option_selected" aria-selected="true">Test Jesse</li></ul>

As you can see, no Id's are in the markup, which I find suspicious.

Here is how the ViewBag.Partners value is populated (in the controller):
/// <summary>
/// Populates the partners.
/// </summary>
protected void PopulatePartners()
{
    ViewBag.Partners = Database.Partners.Select(pg => new { pg.Id, pg.FriendlyName }).ToArray();
}

What is going on here? Why is the normal Html.DropDownListFor working, while Kendo's version isn't?
Indicia
Top achievements
Rank 1
 answered on 18 Dec 2014
13 answers
263 views
Hi I have a list of items in a multiselect and I want them to be received in the order that the user has specified when being sent to the controller

Right now they seem to be sorted by whatever the datasource is sorted by.

Any tips?
Alexander Popov
Telerik team
 answered on 18 Dec 2014
1 answer
791 views
Hi,

I've created a simple MVC 5 project with a Kendo grid to display a few records from a remote server. When i run the application, the kendo grid appears but displays no records. 
I checked Fiddler and found no errors or circular references. Furthermore, the JSON output shows the correct data in it but its simply not displaying in the grid. Here is the grid and controller code:

<div style="width:830px;font-size:x-small; padding-top:40px;">
 
        @(Html.Kendo().Grid<SystemsFormsMVC.Models.vMyForm>()
 
        .Name("Grid1")
 
        .Columns(columns=>
 
        {
 
            columns.Bound(o => o.Id);
 
            columns.Bound(o => o.SystemName);
 
            columns.Bound(o => o.FormType);
 
 
            })
              
 
            .DataSource(dataSource => dataSource
 
             .Ajax()
 
             .PageSize(5)
 
             .Read(read => read.Action("GetMyForms", "Home"))             
 
                )
 
                .Pageable()
 
                .Navigatable()
 
                .Sortable()
 
                .Filterable()
 
            )
</div>

Controller:
public ActionResult GetMyForms([DataSourceRequest] DataSourceRequest request)
{
    var query = _repository.GetMyForms(GetCurrentUserName());
    query = query.OrderBy(s => s.RequestDate);
    return Json(query, JsonRequestBehavior.AllowGet);
}
 
  
 
public IQueryable<vMyForm> GetMyForms(string UserName)
{
    SystemsFormsDataContext db = new SystemsFormsDataContext();
    IQueryable<vMyForm> query;
    Int32 UserId = GetCurrentUserId(UserName);
 
    try
    {
        query = (from s in db.vMyForms
                 where s.UserId == UserId
                 select s);   
    }
    catch (Exception ex)
    {
        query = (from s in db.vMyForms
                 where s.UserId == 0
                 select s);
    }
 
    return query;
}

Could you please help me figure out what the issue is with the data not displaying in the grid?

Thanks,  Shuja

Georgi Krustev
Telerik team
 answered on 18 Dec 2014
10 answers
172 views
I am reviewing the  new export to Excel feature in version 2014.3.1119.   This feature is really nice, but I cannot find a way to correctly export a grid with dropdownlists.   The export shows the column, but include the foreign key, not the dropdownlist text.   The new Export to PDF works correctly and downloads the text for the dropdownlist.    Is there a way to get the Export to Excel to work correctly on dropdownlists?

Thanks for your help.
Gayathri Rao
Top achievements
Rank 1
 answered on 18 Dec 2014
2 answers
129 views
I have a treeview with remote data binding. Every time I expand a node it does a GET with the parent Id as parameter. Is it possible change the GET for a POST?

The reason to do this is for security. We either need to encrypt the parameter on the GET or change it as a POST.
Ana Clara
Top achievements
Rank 1
 answered on 17 Dec 2014
1 answer
848 views
Hi,

We've just come to integrating our product which uses the Telerik.UI.for.AspNet.Mvc5 NuGet package and we get errors stating that it cannot be found. Having looked at Nuget.org, it seems that it has disappeared.

Any reason for this, or is there an alternative location that I can use? I notice a ZIP file in my Product download page. I guess I need to host that locally. THough I would like confirmation that the original NuGet repository package has disappeared - and why considering this will break a lot of builds.

Thanks

Nathan
Sebastian
Telerik team
 answered on 17 Dec 2014
1 answer
122 views
I would like to create sub total rows and group header rows for Monthly and Yearly totals and counts. I have a date field and a payment field. I can't see any way of doing this without creating extra columns in my data. Is there an example that works with dates that is available anywhere?


Thanks,


Larry
Petur Subev
Telerik team
 answered on 17 Dec 2014
1 answer
297 views
I am trying to use the TreeList widget (http://demos.telerik.com/kendo-ui/treelist/index), but with a lot of data (~2000 rows). It seems to not handle this well as it tries to load all everything at once. 

There is a similar TreeView widget (http://demos.telerik.com/kendo-ui/treeview/index), which allows for a configurable method called “LoadOnDemand” (http://docs.telerik.com/kendo-ui/api/javascript/ui/treeview#configuration-loadOnDemand) that allows the children for a node to be loaded when the parent is expanded, but I can't seem to find a similar function for the treelist widget. 

Is there an alternative way to achieve the same functionality (loading the children on expand of their parent)?

Nikolay Rusev
Telerik team
 answered on 17 Dec 2014
3 answers
413 views
Hi,

We're using numeric textboxes in a grid that allows for keyboard navigation.  The problem is that the up/down arrows still increase and decrease the values in the textbox before the navigation event occurs.  Is there a way to disable the default key events, or modify them?

Thanks,
Kevin
Georgi Krustev
Telerik team
 answered on 17 Dec 2014
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
Upload
ComboBox
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
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
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
DateTimePicker
AppBar
BottomNavigation
Card
FloatingActionButton
Licensing
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
+? 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?