Telerik Forums
UI for ASP.NET MVC Forum
3 answers
524 views
Dear KendoUI-Team!
I have a hierarchy grid. I want to expand a master grid row in javascript. The javascript function is called by a custom command.
I succeeded to locate the the row.
When I call the expandRow() method something strange happens. The Row is expanded, but the current scroll position in the browser jumps to the top of the window. It looks like the jump happens after the expansion.
Even if I call the .click() function of the .t-plus element directly in javascript this strange behaviour occurs.

If I perform a mouse click on the expand item in the row, the scroll position of the browser window does not change.

Do you have any Ideas to solve this problem or find the cause?

brgds
Malcolm Howlett
Nikolay Rusev
Telerik team
 answered on 25 Sep 2013
1 answer
105 views
i can not get sub menus to open in IE11
Also i could not log into this site with IE11, clicking button sends no request
is this a known bug,
thanks
Kamen Bundev
Telerik team
 answered on 25 Sep 2013
4 answers
490 views
I set up a simple grid like this using the Razor syntax:

@(Html.Kendo().Grid<VideoGames.Game>(Model)
  .Name("theGrid")
  .Columns(c =>
  {
    c.Bound(p => p.Name).Width(200);
    c.Bound(p => p.Price).Format("{0:c}").Width(100);
    c.Bound(p => p.Genre).Width(100);
    c.Bound(p => p.ImageUrl).ClientTemplate("<img src='#= ImageUrl #' alt='' />").Width(150);
    c.Command(cmd => { cmd.Edit(); });
  })
  .Editable(editable => editable.Mode(Kendo.Mvc.UI.GridEditMode.InCell))
  .Pageable()
  .ToolBar(c => c.Save())
  .DataSource(d => d.Ajax()
                    .Model(m => m.Id(p => p.Name))
                    .Update(c => c.Action("UpdateGame", "Home")))
  )

The problem is that the .Update(...) in the DataSource doesn't expose the callback that the underlying KendoUI does:

$("#theGrid").kendoGrid({
        dataSource: {
          data: data,
          batch: true,
          schema: {
            model: {
              id: "GameID",
              fields: {
                GameID: { editable: false, nullable: true },
                Name: "Name",
                Price: { type: "number" },
                ReleaseDate: { type: "date" },
                Genre: "Genre",
                Rating: "Rating",
              }
            }
          }
        },
        transport: {
          update: {
            url: "/home/updategame",
            success: onUpdateSuccess,
            error: onUpdateError
          }
        }
        toolbar: [ "Save" ],
        height: 400,
        editable: true,
        scrollable: true,
        columns: [
          {
            field: "Name",
            title: "Title"
          },
          {
            field: "Price",
            title: "Price",
            format: '{0:c}'
          },
          {
            field: "ReleaseDate",
            title: "Rel Date",
            template: '#= kendo.toString(ReleaseDate,"MM/dd/yyyy") #'
          },
          {
            field: "Genre"
          },
          {
            field: "Rating"
          },
        ],
      });


Since the transport.update (in the JavaScript) are passed through to the $.ajax handler, we can wire up to success and error, but can't via the MVC. We can do this after the fact, but it's not expected behavior. Can we get this added to future versions of the MVC package?
KV
Top achievements
Rank 1
 answered on 24 Sep 2013
8 answers
551 views
Gents,

How do we add Telerik reporting to a MVC 4 razor Project, do we have to "WorkAround" using ASCX w /ASP.NET?


Thanks  
KS
Top achievements
Rank 1
 answered on 24 Sep 2013
4 answers
386 views
I have a current asp.net website using Telerik Reporting and I want to migrate to a Kendo UI MVC solution but don't see any documentation on how it works with Reporting. Can someone point me in the right direction? Thanks.
KS
Top achievements
Rank 1
 answered on 24 Sep 2013
1 answer
342 views
Hello,

I've made a command.Custom in my grid:
columns.Command(command =>
       {
          command.Custom("Details")
          .Text("<i class=" + "icon-globe" + "></i> Details")
          .SendDataKeys(true)
          .Click("archiveAppliance")
          .HtmlAttributes(new { @style = "width:100px" });
 
 
       }).Width(110);
   })
I also have a "add" button in the grid that opens a popup window
.Editable(editable =>
 
                editable.DisplayDeleteConfirmation("Är du säker pÃ¥ att du vill ta bort detta DelomrÃ¥de?")
                .Mode(GridEditMode.PopUp)
                 
                .TemplateName("PartAreaEdit")
                .Window(w => w.Title("Detaljer"))
            )

H
ow can i change the labels on the buttons "update" and "cancel" in the popup window without making a command.edit() button and use the .Text()
.CancelText().UpdateText() which gives me another button that i don't want.

Thanks.
Vladimir Iliev
Telerik team
 answered on 24 Sep 2013
6 answers
444 views
I am using a Kendo Grid in Server mode. I am using a popup editor for adding/editing records. The popup editor page has several text fields and checkbox list controls.

I am trying to use the checkboxlist control from mvccbl.com as below:


For examples see: http://mvccbl.com/Examples

@Html.CheckBoxListFor(x => x.PostedCities.CityIDs, // checkbox list name, 'PostedCities.CityIDs' in this case
x => x.AvailableCities, // List<City>()
x => x.Id, // City.Id
x => x.Name, // City.Name
x => x.SelectedCities) // List<City>() - should contain only cities to be selected

My requirement is that SelectedCities should be lazy loaded. So I am loading when the user clicks the Add/Edit button. Since there are several checkbox list controls on the editor page and all of them are required, so I am using data annotations [Required] on the posted values.  The problem is that if user forgets to check a box in one list and tries to update, model validation fails and that causes the popup editor to reload the data and thereby user selections are lost.

Any ideas on how to fix this?

Thanks
Daniel
Telerik team
 answered on 24 Sep 2013
1 answer
118 views
Hi,

I have a bug in my application but seems like I can reproduce this in your demo examples.

If you goto the Sorting example on the grid: http://demos.kendoui.com/web/grid/sorting.html

On the 2nd grid with Multiple column sorting supported, sort by Ship Country then Freight.  click on page 4.  Notice how the Freight is NOT sorted correctly.

Please advise,
Regards
Nga
Top achievements
Rank 1
 answered on 24 Sep 2013
3 answers
540 views
Hello,

I have a panel bar with just one item.   Once I have expanded it and then collapse it the highlight is still there.  Using firebug I can see that the "k-state-selected" class is still applied.    When I collapse I want it to go back to the original styling as if it was never expanded.

Please advise how I can accomplish this using the following example - preferable without having to manually remove the styling using Jquery as my implementation will be dynamic so I will not know what the IDs additionally I will have multiple panelbars on the page some of which may be open.

Thanks,
Carrie
@(Html.Kendo().PanelBar()
    .Name("IntroPanelBar")
    .Items(items =>
    {
        items.Add()
            .Text("Getting Started")
            .Content(@<text>
                Just some random content
            </text>);
    })
)
Dimo
Telerik team
 answered on 23 Sep 2013
1 answer
183 views
@(Html.Kendo().Grid<Zeus.Models.AnswerGroup>(Model.Groups)
    .Name("Grid")
    .Columns(columns =>
    {
        columns.Bound(p => p.Id);
        columns.Bound(p => p.QuestionGroupName);
    })
    .Sortable()
    .Pageable()
    .ClientDetailTemplateId("detailTemplate")
    .Events(e => e.DetailInit("onDetailInit"))
    .Events(e => e.DataBound("dataBound"))
)
 
<script id="detailTemplate" type="text/kendo-tmpl">
    @(Html.Kendo().Grid<Zeus.Models.AnswerDetail>()
        .Name("answersGrid_#=Id#")
        .AutoBind(false)
        .DataSource(ds => ds
            .Ajax()
            .ServerOperation(false)).ToClientTemplate()
     )
</script>
 
<script type="text/javascript" language="javascript">
    function dataBound(e) {
        this.expandRow(this.tbody.find("tr.k-master-row").first());
    }
    function onDetailInit(e) {
        var grid = $("#answersGrid_" + e.data.Id).data("kendoGrid");
        grid.dataSource.data(e.Groups.Answers);
    }
</script>
Above is a set of code.  Its not working.  I'm not sure why, maybe there is something obvious.  The grid shows up, but there is no child grid, and the columns are off by one.

Dimiter Madjarov
Telerik team
 answered on 23 Sep 2013
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
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
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?