Telerik Forums
UI for ASP.NET MVC Forum
8 answers
757 views
hi friends

i am new to telerik UI 

i was performed CRUD operations using telerik perfoectly,

i want to perform CRUD operations with more than one table,

u have any sample project please forward to me other wise give the suggestion to do that.

Thanks in advance.

Atanas Korchev
Telerik team
 answered on 17 Jul 2014
1 answer
84 views
Trying to add numericTextBox to ClientGroupFooterTemplate does not render styles.

                  columns.Bound(p => p.Reason).Title("Reason").ClientGroupFooterTemplate("<div>" + @Html.Kendo().NumericTextBox<double>().Name("numeric").Value(0).Placeholder("Packages").ToClientTemplate().ToHtmlString() + "</div>");

Is there a way to do this?
Daniel
Telerik team
 answered on 17 Jul 2014
8 answers
133 views
Hi

I was able to open the sample hierarchy.cshtm grid but now there is no cshtml file in the sample below, it only has the html. Can you please let me know from where I can get the View and the Controller for that sample?

http://demos.telerik.com/aspnet-mvc/grid/hierarchy
Jim
Top achievements
Rank 1
 answered on 17 Jul 2014
1 answer
177 views
hi telerik forum team

http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/insert-update-delete-hierarchy/defaultvb.aspx?#qsf-demo-source

i got the program from this link (i.e) CRUD operation in aspnet with c# and vb.net

but 

http://demos.telerik.com/aspnet-mvc/grid/hierarchy 

in the above link you give only read operation in asp.net mvc

update,delete facility not privide

is there any program is there kindly send me.

Thank You.
Nikolay Rusev
Telerik team
 answered on 17 Jul 2014
1 answer
268 views
Hi i have Mvc application. where i have a text box and desired behavior is to search the item in DB and if found, widget will display the found list in suggestion options so i can add to local list 

and if the item don't exist, add the new item [ thru same widget ] in the database when we press enter.

since autocomplete Widget don't allow to add new items, i went with combobox

can we add new item in combobox widget in the same time if we are performing the server filtering
Georgi Krustev
Telerik team
 answered on 16 Jul 2014
1 answer
148 views
My site has a spinner that shows on ajaxStart(). I want to disable this when having the ajax call coming from an endless scrolling grid. When using jquery natively and making an $.ajax() call there is a property called "global" that can be set to prevent your ajaxStart function from calling. Is there anyway to prevent the ajaxStart from calling using Kendo UI with ajax and mvc? Sample code is below.

Thanks,

Jim

.DataSource(d => d.Ajax().Read(r =>
         r.Action("Get", "Controller")
        .Type(HttpVerbs.Post)
        ).Filter(filters =>
        {
            filters.Add(a => a.Status).IsNotEqualTo("Test");
        })
        .Sort(sort =>
            {
                sort.Add(a => a.DisplyName).Ascending();
            }
        )
        .PageSize(30)
        .ServerOperation(true)
        )
    .Scrollable(s => s.Virtual(true))
    .Sortable()
    .Filterable()
Petur Subev
Telerik team
 answered on 16 Jul 2014
1 answer
166 views
I have a listview that has an editor template. I want to do server side validation (I check for uniqueness in my database) on create/update. Here is my code. Please tell me what to do to get this working.

01.public JsonResult CreateWatch([DataSourceRequest] DataSourceRequest request, HomeWatchListItem hw) {
02.    try {
03.        var result = uow.HomeWatchesRepository.FindBy(w => w.SerialNo == hw.SerialNo).FirstOrDefault();
04.        if (result != null) {
05.            ModelState.AddModelError("SerialNo", "Serial number already exists");
06.        }
07.        if (ModelState.IsValid) {
08.            uow.HomeWatchesRepository.Add(new HomeWatch {
09.                HomeServerId = hw.IdHomeServer,
10.                PatientId = hw.IdPatient,
11.                SerialNo = hw.SerialNo
12.            });
13.            uow.Commit();
14.        }
15.        return Json(new [] {hw}.ToDataSourceResult(request, ModelState));
16.    }
17.    catch (Exception ex) {
18.        //TODO: what to return here
19.        return Json(new DataSourceResult {Errors = ex.Message});
20.    }
21.}

When create the listView I add an error handler function that doesn't get called no matter what I do.
01.@(Html.Kendo().ListView<HomeWatchListItem>().Name("watchesListView")
02.    .DataSource(ds => {
03.        ds.Read(r => {
04.            r.Action("GetWatches", "Watches").Type(HttpVerbs.Post);
05.        }).Create(c => {
06.            c.Action("CreateWatch", "Watches").Type(HttpVerbs.Post);
07.        }).Update(u => {
08.            u.Action("EditWatch", "Watches").Type(HttpVerbs.Post);
09.        }).Destroy(d => {
10.            d.Action("DeleteWatch", "Watches").Type(HttpVerbs.Post);
11.        })
12.        .Events(e => {
13.            e.Error("alert('a')");
14.        })
15.        .ServerOperation(true)
16.        .PageSize(4)
17.        .Model(m => {
18.            m.Id("Id");
19.            m.Field<int>("IdPatient");
20.            m.Field<int>("IdHomeServer");
21.            m.Field<string>("PatientName");
22.            m.Field<string>("HomeServerName");
23.        });
24.    })
25.    .ClientTemplateId("watch-template")
26.    .Editable(e => {
27.        e.TemplateName("edit-watch-template");
28.    })
29.    .TagName("div")
30.    .HtmlAttributes(new { @class = "k-widget k-listview" })
31.    .Pageable()
32.    .Deferred()
33.)

Daniel
Telerik team
 answered on 16 Jul 2014
1 answer
59 views
Hi

Is it possible to put only the Event editor on a page and not show the calendar part of the Scheduler? For my requirements I just need the ability to set the recurrence values of a single event, so going through the calendar part of the scheduler isn't necessary.

Is this possible?

Many thanks,
Bill
Vladimir Iliev
Telerik team
 answered on 16 Jul 2014
2 answers
101 views
Hi, 

This is my first time using the grid and I'm having some issues with the formatting. I followed and double checked the setup for MVC4. Here is my razor code:

@(Html.Kendo().Grid((IEnumerable<TS.Models.ConnectionManagement.ConnectionManagementSystemTelerik>)Model)
    .Name("grid")
    .Columns(columns =>
    {
        columns.Bound(System => System.SystemId);
        columns.Bound(System => System.SystemType);
        columns.Bound(System => System.SiteId);
        columns.Bound(System => System.SiteName);
        columns.Bound(System => System.SiteAddress);
        columns.Bound(System => System.IsSecured);
    })
  .Pageable() // Enable paging
  .Sortable() // Enable sorting
)

If you look at the attached file, the grid functions properly, but it does not look correct. Can you think of anything for me to look for?

Thanks
Alex
Alex
Top achievements
Rank 1
 answered on 16 Jul 2014
2 answers
187 views
Hi,
I have a kendo-template which i put my Calendar widget in it. I tried to open the Window and load the template into my calendar end up having error and below are the error:
 Error: Invalid template:'
    <div id="details-container">
        <div class="k-widget k-calendar" id="test"></div><script>
    jQuery(function(){jQuery("#test").kendoCalendar({});});
' Generated code:'var o,e=kendo.htmlEncode;with(data){o='\n    <div id="details-container">\n        <div class="k-widget k-calendar" id="test"></div><script>\n\tjQuery(function(){jQuery("';test").kendoCalendar({});});
;o+=;}return o;'


Here is my Code:

@(Html.Kendo().Window().Name("Details").Title("Customer Details")
            .Visible(false).Modal(true).Draggable(true).Width(900).Height(400))

My template
<script type="text/x-kendo-template" id="CopyProjectTemplate">
    <div id="details-container">
        @(Html.Kendo().Calendar().Name("test"))
 
    </div>
</script>

Here is my Javascript that execute the code:
$(document).ready(function () {
     
      $("#grdTimelogDetail_btnSaveTemplate_onclick").click(function (e) {
          e.preventDefault();
          try {
           var detailsTemplate = kendo.template($("#CopyProjectTemplate").html());
                                  kendo.init($("#details-container"));
                                  var wnd = $("#Details").data("kendoWindow");
                                  wnd.content(detailsTemplate);
                                  wnd.center().open();
              return false;
          }
          catch (err) { alert(err); }
      });
 
  });

Any Idea how to get working?

thanks.

Regards,

Dimo
Telerik team
 answered on 15 Jul 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?