Telerik Forums
UI for ASP.NET MVC Forum
1 answer
128 views
Hello,
i noticed in the grid,when i have multiple pages,for example if i put pagesize(5) the it remains some space until the bottom of the grid.If i put 10,then i have use the scroll in the alocated dimension for the grid.Is there a height of the grid,especially the detail zone,where are the rows?or how can i adjust to perfectly match the detail's height of the grid,with the number of rows?

Regards,
Daniel
Dimo
Telerik team
 answered on 25 Mar 2013
1 answer
197 views
Hi all,

I'm looking for the same basic functionality as (here), but the tree view is a maintenance/function menu, and the right hand pane is an "index"-type page for a partial CRUD function or a user screen or whatever I need to display. This could be a grid page for a list of records which leads to a CRUD edit page, or it could be a user-function page where the user makes a series of selections.

My background is in ASP.NET web forms, so it's a struggle right now to convert my thinking to MVC/Razor. I'm thinking that maybe the MasterPage-equivalent has a header/side-bar navigation/footer, and that the content area only shows a view (full or partial?) based on the item selected in the side tree view (see attached).

I plan to load the tree view content from the database so that I can control user permissions.

Does anyone have any suggestions on how to make this work in MVC/Kendo?

Dimo
Telerik team
 answered on 25 Mar 2013
6 answers
143 views
Hi,

I've got an issue about handling my grid.

There was my first code :

@using System.Data
@{
    DataTable dataTable = ViewBag.DataSource;
}
@(Html.Kendo().Grid(dataTable)
    .Name("Logs")
    .Columns(columns =>
    {
        foreach (DataColumn column in dataTable.Columns)
        {
            columns.Bound(column.DataType, column.ColumnName);
        }
    })
    .Pageable()
    .Scrollable()
    .HtmlAttributes(new { style = "margin-top:30px; height:575px;" })
)

I load my DataTable thanks to a library (so there is no model). When I change page grid, the display is ok.

I try to add a Selectable, in order to have information about the line to display a treeview with data.

So I add this :

.Selectable(selectable => selectable.Mode(GridSelectionMode.Multiple))
But Visual said I have to add a DataSource. That's the first problem to me ...

Adding this in my .cshtml :
.DataSource(datasource => datasource
        .Ajax()
        .PageSize(10)
        .Read(read => read.Action("GetLogs","Home")))
And this in my controller :

public ActionResult GetLogs([DataSourceRequest] DataSourceRequest request)
        {
            FormFilter filter = new FormFilter();
 
            return Json(Reader.GetLog(filter).ToDataSourceResult(request));
        }
It's working, but my first column is DateTime type, so when I display my grid ... Date become "/Date(13633....)/"

Do you have a solution to avoid DataSource, or to display easily my data without broken everything ?

Second issue, when I add my Selectable, how can I have the id of the selected line in my controller ? I'd like to add those information in a treeview ...

Thanks,

Daniel
Dimiter Madjarov
Telerik team
 answered on 25 Mar 2013
5 answers
513 views
Hello,
I have the following scenario :i press a custom edit buttom,and it appears a template under the grid,i make some updates,regarding the row data,and after that,with an action i make the update and the grid is refreshing,but  if was on page 2,the page reset and it shows me again page 1.
It is possible to remain on the same page,after i reloaded the data?

Regards,
Daniel
Daniel
Top achievements
Rank 1
 answered on 25 Mar 2013
1 answer
131 views
We are using a NumericTextBoxFor and we want to capture a change to that field.  Unfortunately though, the event fires upon initialization but not thereafter (not on change).   See example below.    Any help would be appreciated
<div class="inline-datafield" style="width: 400px;">
                @Html.Kendo().NumericTextBoxFor( Model => Model.Interval ).Events(events => events.Change("CheckUpdateBox(this)").HtmlAttributes( new { style = "width:100px"} ).Format("{0:n0}")
            </div>
Georgi Krustev
Telerik team
 answered on 25 Mar 2013
2 answers
184 views
EDIT:: Figured something out

if I change :: 
 Create([DataSourceRequest] DataSourceRequest request, Property model)

TO:: Create([DataSourceRequest] DataSourceRequest request, Property <ANY OTHER WORD BUT model> )

it works.  _model, data, stuff

Please any clues, and or answers would be great.


I apologize if this has been covered elsewhere, I have looked and not found an answer.

the issue is as follows:

I have a kendo grid on a strongly typed view  see below:

<div style="margin: 0 1em; width: 940px">
    @(Html.Kendo().Grid<WebClaims.Common.Models.Property>(Model.OtherProperties)
        .Name("OtherProperties")
        .Columns(columns =>
        {
            columns.Bound(p => p.Make).HeaderTemplate("Vehicle").HeaderHtmlAttributes(new { style = "width:30%;" });
            columns.Bound(p => p.Model).HeaderHtmlAttributes(new { style = "display:none;" });
            columns.Bound(p => p.Year).HeaderHtmlAttributes(new { style = "display:none;" });
            columns.Bound(p => p.Driver.FirstName).HeaderHtmlAttributes(new { style = "display:none;" });
            columns.Bound(p => p.Driver.LastName).HeaderTemplate("Driver Info");
            columns.Command(cmd => cmd.Edit());

        })
       .Editable(editable => editable.Mode(GridEditMode.PopUp).TemplateName("Property"))
        
        .DataSource(dataSource => dataSource
            .Ajax()
            .Model(m=>{
                m.Id(p => p.ID);
                m.Field(p => p.ID).DefaultValue(Guid.NewGuid());
                m.Field(p => p.Make).DefaultValue("Unknown");
                m.Field(p => p.Model).DefaultValue("Unknown");
                m.Field(p => p.Year).DefaultValue(DateTime.Now.Year);
                m.Field(p => p.Driver).DefaultValue(WebClaims.Common.Models.Claimant.Default());
            })
            .Read(read =>{
                read.Action("Read", "OtherPropertiesGrid");

            })
            .Create(create=> {
                create.Action("Create","OtherPropertiesGrid").Type(HttpVerbs.Post);
            })
            .Update(u =>{
                u.Action("Update", "OtherPropertiesGrid");
            })
            .Destroy(u =>{
                u.Action("Destroy", "OtherPropertiesGrid");
            })
            
        )
        .ToolBar(t=>{
            t.Create();
           
        })
        .Sortable()
        .Scrollable()
    )
    </div>



the Create will open the editor template and when the update button is pressed it fires the Create Action on the controller however, i must be doing something wrong as the model that is passed is null:

[AcceptVerbs(HttpVerbs.Post)]
        public ActionResult Create([DataSourceRequest] DataSourceRequest request, Property model)
        {                                                                                                    this is populated^               this is NULL ^
            WebClaims.Common.Models.Claim c = Session["claim"] as WebClaims.Common.Models.Claim;
             //DO stuff //
            return Json(c.OtherProperties.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);

        }

something else thats a bit off is that the edit command fires the create action not the update?? 


If I populate the list of stuff I want to see before hand the read call works, 

I'm not sure what I'm doing wrong... any and all help would be great.

thanks 


James
Top achievements
Rank 1
 answered on 22 Mar 2013
1 answer
101 views
Hi I am getting a jquery error while displaying data on grid, if i select cotinue i get the data in the Grid, just filter option is not working, but am able to sort and go to other pages in the Grid, but that jquery error comes evertime. error message is "Microsoft JScript runtime error:Object doesn't support this property or method"
The error come in my View at runtime in this line, which has all the table data:jQuery(function(){jQuery("#Grid").kendoGrid({"columns"
Content of my View is whown belo, i have followed instruction from kendo website and copied all the references, but still error is there, please see the view and let me know my mistake.
@model IEnumerable<MvcApplication6.Models.tbliDeployWeeklySchedule>

<!DOCTYPE html>

<html>
<head>
<link rel="stylesheet" href="@Url.Content("~/Content/kendo.common.min.css")">
<link rel="stylesheet" href="@Url.Content("~/Content/kendo.default.min.css")">
<script src="@Url.Content("~/Scripts/jquery.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.core.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.data.odata.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.data.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.popup.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.list.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.calendar.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.numerictextbox.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.validator.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.binder.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.dropdownlist.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.filtermenu.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.pager.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.sortable.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.draganddrople.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.groupable.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.editable.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.selectable.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.resizable.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.reorderable.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.grid.min.js")"></script>
<title>Example2View1</title>
</head>
</html>
@(Html.Kendo().Grid(Model)
.Name("Grid")
.Columns(columns =>
{
columns.Bound(p => p.Weekly_Schedule_Id);
columns.Bound(p => p.Region_No).Width(130);
columns.Bound(p => p.Team_No).Width(130);
columns.Bound(p => p.Month_No).Width(130);
columns.Bound(p => p.Year_No);
columns.Bound(p => p.Week_No).Width(130);
columns.Bound(p => p.Territory_No).Width(130);
columns.Bound(p => p.ECC_Num).Width(130);
columns.Bound(p => p.Total_Calculated);
columns.Bound(p => p.Total_Adjusted).Width(130);
columns.Bound(p => p.SalesRep_Id).Width(130);
columns.Bound(p => p.Role_Id).Width(130);
columns.Bound(p => p.Last_Updated_By).Width(130);
columns.Bound(p => p.Modified_Date).Width(130);
columns.Bound(p => p.Last_Updated_TimeStamp).Width(130);
})

.Pageable()
.Sortable()
.Scrollable(scr=>scr.Height(430))
.Filterable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)

.ServerOperation(false)
)
)


Rosen
Telerik team
 answered on 22 Mar 2013
1 answer
364 views
Hi Telerik team
   I have a grid with InCell editing
      .Name("UserDetailsGrid").Editable(editable=> editable.Mode(GridEditMode.InCell) )

 This grid has a column Password      
   columns.Bound(p=> p.Password).ClientTemplate("***").Title("Password").Width(200);

   On  Edit / Create New  I need to have
a password confirm option which will force the user to type the password two times.

   This is required because I am not
displaying the password to the user in the grid. I am displaying it using
 ClientTemplate("***") which will show * on the grid 

  Can you help me to solve this issue. This way or some other better way.
 
Thanks

Petur Subev
Telerik team
 answered on 22 Mar 2013
1 answer
809 views
How to disable client side validation on @Html.DatePicker ?
Petur Subev
Telerik team
 answered on 21 Mar 2013
1 answer
111 views
Hola buen dia.
puedo crear un control Window de telerik or un helper al que le pueda pasar parametros y asignarlos al control?
Ejemplo
@Helper helpWindow(string nom, string tit)
{
 @(Html.Telerik()
     .Name(nom)
     .Title(tit)
    )
}
--------------------------------
Hello good day.
I can create a control of telerik Window or a helper when you can pass parameters and assign them to control?
example
@ Helper helpWindow (nom string, string tit)
{
  @ (Html.Telerik ()
      . Name (nom)
      . Title (tit)
     )
}
Dimo
Telerik team
 answered on 21 Mar 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
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
ColorPicker
DateRangePicker
Security
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
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?