Telerik Forums
UI for ASP.NET MVC Forum
5 answers
88 views

I have a grid with incell editing. Everything works fine, the incell editing has a dropdown list. 

My problem is that once the row (cell) has been updated, it goes to the bottom of the grid. Any idea what might be causing that?

Georgi
Telerik team
 answered on 22 Sep 2017
1 answer
187 views

Hello,

 

In my view there is a kendotreeview and  kendo tab inside which i have Kendo splitter with 2 panes each. Pane 1 and pane4 load partial view when a node in Kendo treeview selected depending on what is selected on node. On main view i have 2 save button. Button1 Contents of form inside pane1(formid: frmObjdetails) in splitterchild and other button to save Content from pane 4 form inside splitterchild1(formid:frmDoc). If i have only pane 1 form loaded then clicking Button1 submits the data perfectly. But when i have both forms loaded then clicking on Button 1 post pane 4 form data and not pane 1 form data. though both forms have specific id

 

Here are my codes

  @helper ObjectDetailContentTemplate()
{
         @(Html.Kendo().TabStrip()
          .Name("tabstrip")
          .SelectedIndex(0)
          .Animation(animation =>
              animation.Open(effect =>
                  effect.Fade(FadeDirection.In)))
          .Items(tabstrip =>
          {
              tabstrip.Add().Text("ObjektDetail")
                  .Selected(true)
                  .Content(@<text>
         @ObjectDetailContentSplitterTemplate()
          </text>);
              tabstrip.Add().Text("Objekt-Aktivitat")
                  .Content(@<text>
               @ObjectActivityContentSplitterTemplate()
                  </text>);
          })
            )
    }   
 @helper ObjectDetailContentSplitterTemplate()
{
    @(Html.Kendo().Splitter()
      .Name("splitterchild")
      .HtmlAttributes(new { style = "height: 800px;" })
      .Orientation(SplitterOrientation.Vertical)
      .Panes(panes =>
      {
          panes.Add()
              .Scrollable(false)
               .Size("290px")
              .HtmlAttributes(new { id = "pane1" })
              .Collapsible(false)
               .LoadContentFrom("Index", "ObjectDetail", new { id = ViewBag.SelectedObjectID });
          panes.Add()
              .Scrollable(false)
              .HtmlAttributes(new { id = "pane2" })
              .Content(@<text>
                        @ObjectAddressGrid()
                        </text>);
      }))
   
}
  @helper ObjectActivityContentSplitterTemplate()
{
    @(Html.Kendo().Splitter()
      .Name("splitterchild1")
      .HtmlAttributes(new { style = "height: 100%;" })
      .Orientation(SplitterOrientation.Vertical)
      .Panes(panes =>
      {
          panes.Add()
               .Size("400px")
              .HtmlAttributes(new { id = "pane3" })
              .Collapsible(false)
                .Content(@<text>
                       @DocumentGrid()
                        </text>);
          panes.Add()
              .Size("200px")
              .HtmlAttributes(new { id = "pane4" })
              .Collapsible(false);
      }))
   
}

When treeview node is selected i call ajaxrequest for loading the partialviews with forms

 function onSelect(e) {             
        var nodeid = $("#treeview").getKendoTreeView().dataItem(e.node).id;
       
        var splitter = $("#splitterchild").data("kendoSplitter");
        var splitterch = $("#splitterchild1").data("kendoSplitter");
       
        splitter.ajaxRequest("#pane1",rootDir + "ObjectDetail/Index", { id: nodeid });
        splitterch.ajaxRequest("#pane4", rootDir + "Document/Index", { id: nodeid, DocumentID: nodeid });
}

here is partial view Content for pane1

@using (Html.BeginForm("SubmitObjectCollection", "ObjectDetail", FormMethod.Post, new { @name = "frmObjdetails", Id = "frmObjdetails" }))
{

}

here is partial view Content for pane4

@using (Html.BeginForm("SubmitFormCollection", "Document", FormMethod.Post, new { data_ajax = "false", @name = "frmDoc", id = "frmDoc" }))
{

}

 

In main view on button 1 click i do

var dataPost = $('#frmObjdetails').serialize();
$.ajax({
cache: false,
async: false,
url: "@Url.Action("SubmitObjectCollection", "ObjectDetail")",
type: 'POST',
data: dataPost,
success: function (data) {
if (data.result == "Error") {
alert(data.message);
} else {

}
}
});

and button2 click

var dataPost = $('#frmDoc').serialize();
$.ajax({
cache: false,
async: false,
url: "@Url.Action("SubmitFormCollection", "Document")",
type: 'POST',
data: dataPost,
success: function (data) {
if (data.result == "Error") {
alert(data.message);
} else {
// alert(data);
}
}
});

 

But when both panes are loaded clicking button 1 submit frmDoc .

 

What is causing this Problem. How can i post correct form on respective button click

 

Thanks

 

Anamika

 

Dimitar
Telerik team
 answered on 22 Sep 2017
3 answers
214 views

Hello,

 

I have a Kendo treeview which loads on demand and i am using hierarchial data. So it only loads children when clicked on node . everything works fine till my records are more than 3000. In Firefox the tree loads in 5 seconds. But in IE the browser hangs and never recovers.

This is how my treeview looks

@(Html.Kendo().TreeView()
.Name("objtreeView")
.HtmlAttributes(new { style = "height:700px;overflow-x:hidden;" })
.DataImageUrlField("imageUrl")
.DataTextField("Text")
.LoadOnDemand(true)
.Template(
"# if (item.AdditionalImageUrl !='') { #" +
"<img src='#= item.AdditionalImageUrl#'/> #:item.Text#" +
"# } else {#" +
" #:item.Text#" +
"# }#"
)
.Events(events => events
.Select("onSelect")
)
.DataSource(dataSource => dataSource       
        .Read(readtree => readtree
.Action("ReadObjects", "Objekt").Data("addSearch")
)
)
)

 

And ReadObjects Looks like this

public JsonResult ReadObjects(string Id, string)
{

DataSet ds = cObjData.ReadObjects();
if ((ds != null) && ds.Tables.Count > 0)
{
//Alle Zeilen durchgehen
foreach (DataRow r in ds.Tables[0].Rows)
{

result.Add(new { Text = strText, id = r["ObjectID"].ToString(), Color = hexColor, hasChildren = bhaschildren, imageUrl = Url.Content(strImage), AdditionalImageUrl = "" });

}

return Json(result.AsQueryable(), JsonRequestBehavior.AllowGet);

}

 

In production sometimes we have 10,000 records to load. Any help is appreciated

 

Thanks

 

Anamika

Neli
Telerik team
 answered on 21 Sep 2017
2 answers
396 views

I know I've done this before, but for some reason, it's just not working for me today.  What am I missing:

@(Html.Kendo().Grid((IEnumerable<Provider>)ViewData["providers"])
    .Name("providerGrid")
    .Columns(cols =>
    {
 
        cols.Bound(c => c.ProviderName);
        cols.Bound(c => c.Active).ClientTemplate("#= Active ? 'Yes' : 'No' #");
    })
)

 

See the screen shot I attached, it just shows a disabled checkbox for the field.

Stefan
Telerik team
 answered on 21 Sep 2017
1 answer
101 views
HI Team,

We have received a client requirement to lock the predefined data in Editor and the following link suits our requirement

https://demos.telerik.com/aspnet-mvc/editor/immutable-elements

But if we select the predefined data and presses delete, its getting deleted. kindly advice any work around to block deletion of the predefined data .

Thanks,

Ivan Danchev
Telerik team
 answered on 21 Sep 2017
2 answers
131 views

Hello,

I am trying to utilize the kendo spreadsheet control in my mvc project. The data loads fine when toolbar is set to false, however, when we set toolbar to true, the attached is what renders. Any ideas as I don't see any errors. Thanks.

Larry
Top achievements
Rank 1
 answered on 20 Sep 2017
1 answer
624 views

Hi , I am working on the kendo editor but I need some red color on the text . Can it be possbile? I have followed the below link but it has no information about it. 

Anyone any ideas??

 

http://demos.telerik.com/aspnet-mvc/editor

 

Thanks

Neli
Telerik team
 answered on 20 Sep 2017
1 answer
233 views
Hi ,

I need a small help as I am evaluating the telerik product for MVC and am kind of stuck at a place
I want to build a responsive vertical form with kendo UI grid. Can you please provide me a code sample to do that.
A help is appreciated 
Georgi
Telerik team
 answered on 20 Sep 2017
1 answer
67 views

I am making a page with two html forms, The first has two kendo comboboxes in which the user selects some options and then presses submit on the first section. I then look in the database to see if the user inputted a duplicate value. If a entry is found it returns it. I need the information from the returned entry to populate in the corresponding fields. Is this possible?

Nencho
Telerik team
 answered on 20 Sep 2017
5 answers
2.3K+ views
Anyone get the kendo window to work with partial views?  I really enjoy MVC partial views for code resuse and readability, but Kendo windows don't give control back when they are modal.  Tried it two different ways: where the content is the partial view and where the partial view contains the kendo window.

It also seems to screw up the other window on the page.  If I just have the one normal window, it works.  If I have both, they are both broken.  If I have just the partial view window, it doesn't work.
Ivan Danchev
Telerik team
 answered on 20 Sep 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?