Telerik Forums
UI for ASP.NET MVC Forum
2 answers
99 views
I am doing a manual Jquery.Ajax post as my screen has data outside the grid that has to be posted to the Action.

I am able to do an Jquery.each to populate the model from the grid.dataSource.data, but even if I do a date.toUTCString() the HttpPost Action receives the date incorrectly after I do a JSON.stringify(model) in the Ajax post.

From Jquery AJAX post in View: 
1/25/2013 (resolved to "Fri, 25 Jan 2013 05:00:00 GMT" with the .toUTCstring())
NOTE: I did try this without a .toUTCstring pior, as well as .toDateString()

Resolved To Controller Action: 
{1/23/2013 11:01:57 AM}

Has anyone encountered something like this? If so, how have you resolved it?
Sean
Top achievements
Rank 1
 answered on 25 Jan 2013
2 answers
587 views
I've implemented a right-click context menu for some of the grids in our project.  One of these grids is set up to allow multiple row selection.  I was hoping that when the user right-clicks I could have some options for them which would operate on all currently selected rows.  But it seems that the right-click is interpreted as a "Select" click and proceeds to select the row that the user has clicked over, which causes all the other rows to be deselected.  Is there a way to treat a right-click differently and have it not affect which rows are selected?

Thanks for your help!

Brian
Brian Roth
Top achievements
Rank 1
 answered on 25 Jan 2013
3 answers
153 views
How do I set the width of a chart?
Iliana Dyankova
Telerik team
 answered on 25 Jan 2013
1 answer
143 views
I recently upgraded to the current version via VS2012 NuGet and all of my language changes went bye-bye. This is obviously because i had made the new resource file to the source project and built the dll from there. Naturally the upgrade didn't have my changes to resource files. How can i get the latest version of the source files in order to add my own resources to it and building the new dll? If adding new resource files is somehow achievable via other measures i would love to hear them. 
Daniel
Telerik team
 answered on 25 Jan 2013
1 answer
423 views
Hi guys.

I found somme issue with Editor widget if use MVC wrapper for use Html.Kendo().EditorFor(x=>x.Body).
If use code above - when open image browser all files has name undefined and shows without Thumbnail. When i look at js code, that was rendered by MVC wrapper - it`s a bit different with code, that doc suggest to use as javascript plugin.


So, if i use mvc wrapper code like this:
@(Html.Kendo().Editor()
      .Name("Editor")
      .HtmlAttributes(new { style = "width: 740px;height:440px" })
.ImageBrowser(imageBrowser => imageBrowser
    .Image("~/Content/UserFiles/Images/{0}")   
    .Read("Read", "ImageBrowser")
    .Create("Create", "ImageBrowser")
    .Destroy("Destroy", "ImageBrowser")
    .Upload("Upload", "ImageBrowser")
    .Thumbnail("Thumbnail", "ImageBrowser"))
)
All is ok, but problem start when i use Html.Kendo().EditorFor(x=>x.Body).

I use latest version of libs and js files - 2012.3.1315.

Could you help me?
Daniel
Telerik team
 answered on 24 Jan 2013
2 answers
782 views
I was wondering how the kendo grid could be configured such that the grouped rows would be collapsed rather than the expanded as in the default behaviour. I found this workaround, but the problem with that is that it uses the grid's databound event to collapse all rows, and this inadvertently tampers with the scrolling feature, basically the user is then unable to scroll further than the first page. So does the grid expose a OnGrouped() event or something similar which can be exploited to collapse the rows?

The behaviour i desire is similar to the devexpress grid, drag the country column down, and drag it back up to group, notice how the rows are collapsed.

Any other workaround to achieve this beaviour? Thanks.
Chad
Top achievements
Rank 1
 answered on 24 Jan 2013
5 answers
303 views
Hi,

I have a class called Appointment, and within other classes have a service call and time stopped, follows below:

public class Appointment
{
        / / ...
        / / other properties

         [UHint ("ServiceEditor")]
         public Service Service {get; set;}

        [UHint ("ServiceEditor")]
         public Service Service {get; set;}
}

public class Service
{
       
         public int Id {get; set;}

         public string Name {get; set;}
}

public class TimeStopped
{
       
         public int Id {get; set;}

         public string Description {get; set;}
}

/ / View Editor:
@ (Html.Kendo (). DropDownList ()
     . Name ("Service")
     . DataValueField ("Id")
     . DataTextField ("Name")
     . BindTo ((System.Collections.IEnumerable) ViewData ["services"])
       . OptionLabel ("Select"))

The rule is if a note has a service he can not have hours parade and vice versa. Suppose the User selected a service, ok the change happens, but when he comes back to kendo option select throws a TypeError exception: Service is null

already tried to fix this but so far have found nothing = / what should I do?
Daniel
Telerik team
 answered on 24 Jan 2013
2 answers
206 views

Anybody else have this problem?
Any help would be appreciated!

Visual Studio Premium 2012

  • File -> New -> Project -> Templates -> Telerik -> Web -> C# Kendo UI...
  • Default for Name, Location, Solution, Solution Name
  • Create directory for solution is checked
  • Press OK
  • Kendo UI for ASP.NET MVC Project Settings page is displayed
  • Default all except uncheck Add Test Project
  • Press Next
  • Data Access with Telerik OpenAccess ORM is displayed (no options)
  • Press Finish
  • Error pop-up

    Package Installation Error
    The "repository" attribute of the package element has an invalid value:
    'registry'. Valid values are 'template', or 'extension'

Thanks!

Nick
Top achievements
Rank 1
 answered on 24 Jan 2013
4 answers
383 views

I'm just building my first kendo app - and my first mvc app, for that matter - and am stuck on one piece.  The page has a kendo grid that is populated using the View's model.  Above the grid is a search form, which triggers a "Search" controller action.  That action uses any criteria to get a new set of data and passes it back to the View, but the grid doesn't automatically re-bind to the data.  I'm not sure how to re-bind the grid, but if there is a way, where would I do it - in the View or the controller action? 

Here is my code - Grid:

@(Html.Kendo().Grid(Model)
      .Name("tblGrid")
      .Columns(columns =>
          {
              columns.Bound(w => w.Id).Hidden();
              columns.Bound(w => w.IncidentType).Width(160);
              columns.Bound(w => w.Location).Width(180);
              columns.Bound(w => w.IncidentDateTime).Width(120).Format("{0: MM/dd/yyyy H:mm tt}");
              columns.Bound(w => w.PostDateTime).Width(120).Format("{0: MM/dd/yyyy H:mm tt}");
          })           
      .DataSource(dataSource => dataSource
                                    .Server()
                                    .Model(model => model.Id(w => w.Id))
                                    .PageSize(15)
                                    .Create("Editing_Create", "Grid")                                       
      )
      .Events(events => events.Change("gridChange"))
      .Groupable()
      .Pageable()
      .Sortable()         
      .Selectable()         
      .Resizable(builder => builder.Columns(true))         
)

Search Controller:

[HttpPost]
public ActionResult Search([DataSourceRequest] DataSourceRequest request, string location, string reportNum, int? officerId, int? xref, int? days, int incidentTypeId)
{
    var summaries = new List<WatchSummaryInfo>();
    try
    {
        summaries = WatchSummaryBL.DoGetWatchListBySearch(SearchCriteriaHere).ToList();
    }
    catch (Exception ex)
    {               
        throw new Exception(ex.Message);
    }
 
    var filtered = new List<WatchSummaryViewModel>();
    try
    {
        foreach (var summary in summaries)
        {
            filtered.Add(new WatchSummaryViewModel{
                Id = summary.ID,
                IncidentDateTime = summary.WatchDateTime,
                IncidentType = summary.IncidentType,
                Location = summary.Location,
                PostDateTime = summary.PostDateTime                    
            });
        }
    }
    catch (Exception ex)
    {
        throw new Exception(ex.Message);
    }
                 
    return View("List", filtered);
}

I can verify by stepping through this that the collection I am passing back to the View has a much smaller subset (11) than the original ViewModel data, but the grid doesn't change.

What am I missing?

Thanks for the help!

Eddie

Software
Top achievements
Rank 1
 answered on 24 Jan 2013
1 answer
1.8K+ views

Is there a way to disable column resizing for a particular column only (the last column to be precise)?

Some more info on my problem, I have enabled fixed table layout on the Grid, so that an Ellipsis will show for fields that are very long.

/*  allow ellipsis to show on overflow text in grid */
.k-grid table
{
   table-layout:fixed;
}

... but now when the user resizes the last column, there are rendering issues on the Grid - it overruns the width of the grid (see attachment).

Here is my grid def -

       @(Html.Kendo().Grid(Model)
                .Name("Grid")
                .Columns(columns =>
                {
                    columns.Bound(p => p.RoleName).Width(200);
                    columns.Bound(p => p.Description);
                })
                .Events(events => events.Change("Grid_OnRowSelect"))
                .Pageable()
                .Sortable()
                .HtmlAttributes(new { @style = "width:500px" })
                .Selectable(s => s.Mode(GridSelectionMode.Single))
                .Resizable(resize => resize.Columns(true))
                .DataSource(dataSource => dataSource
                    .Ajax()
                        .Read(read => read.Action("RoleSearch", "Role").Data("Grid_OnData"))
                        .Events(e => e.RequestEnd("Grid_OnRequestEnd"))
                    )

            )

Dimiter Madjarov
Telerik team
 answered on 24 Jan 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
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
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?