Telerik Forums
UI for ASP.NET MVC Forum
1 answer
260 views
I have a grid that has a few different tooltips tied to it.  Each tooltip is tied to a specific column in the grid.  I'd like to be able to do some modification to the tooltips client-side, but can't figure out how to access all of them.  $('#mygrid').data('kendoTooltip') only returns one tooltip, not all of them (in my case, I have 3 different tooltips.)

Thanks for your help!

Regards,
Brian
Dimo
Telerik team
 answered on 19 Apr 2013
2 answers
226 views
I am just getting started with the ASP.NET MVC wrappers.  I have been looking at the Custom server binding http://docs.kendoui.com/getting-started/using-kendo-with/aspnet-mvc/helpers/grid/custom-binding.

The first example of server-side paging/sorting works fine, but it refreshes the entire web page on paging/sorting (it's not ajax).

So I have started looking at the second example on the same page, "Custom ajax binding". Unfortunately there is no .cshtml code provided, so I can't get this to work.

Server-side paging with ajax is such a common scenario in ASP.NET, can you please add a full sample in the demo pages?

Thank you
First
Top achievements
Rank 1
 answered on 18 Apr 2013
1 answer
229 views
I am using the grid control and having a problem where it is not sorting on a column that is being calculated.  Here's the relevant part of my controller, where I'm performing my LINQ query:

                             select new Models.ApplicationModels.CustomerModel
                             {
                                 CustomerID = instance.CustomerID,
                                 CustomerOrders = GetCustomerOrders(instance.CustomerID)
                             };

This all displays perfectly fine.  I can sort on CustomerID, but I can't sort on CustomerOrders.  I'm not doing anything special with the binding, just calling it the same way as CustomerID.  

How can I get this to sort properly?  Would it help if I moved the logic of GetCustomerOrders into a SQL function and made it a computed column there?  I should note that I'd like to be able to sort this across all Customer entities -- and I am looking at a lot of data (millions of rows).  If there is a better way of handling this I'm open to suggestions.

Petur Subev
Telerik team
 answered on 18 Apr 2013
1 answer
124 views
My insert button inside Ajax.beginform().
<div id="createDescriptors">
@using (Ajax.BeginForm(

"InsertDescriptors",
new { id = Model.CitationID},

new AjaxOptions()
{

UpdateTargetId = "createDescriptors",
HttpMethod = "post",


}


) )

{

<div class="grid">
<div class="row gridRow">
<div class="span1">
<input type="image" id="btnInsertDes" src="~/Content/Icons/Add.png">
Insert
</div>
<div class="span1">
<input type="image" id="btnEditDes" src="~/Content/Icons/Edit.png" >
Edit
</div>
<div class="span1">
<input type="image" id="btnDeleteDes" src="~/Content/Icons/Delete.png">
Delete
</div>
<div class="span1">
<input type="image" id="btnSaveDes" src="~/Content/Icons/Save.png" >
Save
</div>

</div>
</div>
 
and here is my controller Action method:
public JsonResult InsertDescriptors([DataSourceRequest] DataSourceRequest request, CitationDescriptor citationDescriptor, int id)
{

citationDescriptor.CitationID = id;
citationDescriptor.DBProviderID = 1;

if( citationDescriptor != null && (ModelState.IsValid))
{
Db.Descriptors.Add(citationDescriptor);
Db.SaveChanges();
}

return Json(new[] { citationDescriptor }.ToDataSourceResult(request, ModelState), "application/json");


}

Thanks for your help!
VANDANA
Petur Subev
Telerik team
 answered on 18 Apr 2013
1 answer
98 views
I have a detail grid where I want to display a specified number of items.
My master grid item have a Quantity columns that is 6, for example. And for detail items, in database, is set that I need to have 4 of type A, and 2 of type B.
and the user *MUST* fill all the 6 lines.

in controller I add 6 items to the list, 4 for type A, 2 for type B, for each type, while needed:
list.Add(new Editable
                    {
                        Id = -1,
                        MasterId = masterId,
                        Type = TypeCode
                    });

but when I try to save it, I got this error in jquery.min.js:
Unhandled exception at line 3, column 5099 in http://localhost:60455/Scripts/kendo/jquery.min.js
 
0x800a138f - Microsoft JScript runtime error: 'length' is null or not an object
Is there a way to work this out?

Thanks,
Ezequiel
Daniel
Telerik team
 answered on 18 Apr 2013
1 answer
199 views
I want to have the selected items in the multi-select helper render vertically (instead of the default horizontal).  I tried using a custom tagTemplate that added a break tag, but all that did was put the "X" for removing below the text of the tag.  How can I do this?

Dane
Iliana Dyankova
Telerik team
 answered on 18 Apr 2013
1 answer
373 views
In our database, we use 0 (which resolves as 1/1/1900) for dates.

We don't have nullable dates.

What is the best practice such that dates that come into the model is 0 (or1/1/1900), format so in display mode they appear as "--" or "n/a" or "", while in edit mode, the control shows an empty box, instead of 1/1/1900?


Vladimir Iliev
Telerik team
 answered on 18 Apr 2013
3 answers
231 views
Hey,

I want to use KendoUI on the top of my ServiceStack project.
What is the recommended way to use ? I heard that the MVC of KendoUI wrappers are not compatible with HTML-Helpers of ServiceStack ?

So it would be nce to know why ?
Can I use it without the MVC wrappers of KendoUI - if yes - what's the best case ?

best wishes
Norbert

PS: ServiceStack
Atanas Korchev
Telerik team
 answered on 18 Apr 2013
1 answer
819 views
I have a grid that have a template column with an anchor to open a window popup when it is click. I need to pass the id of the line where I'm clicking the anchor, but I can get how to pass that value.

I'm attaching my code


@(Html.Kendo().Grid(Model.QuoteRequests)
                .Name("MultilineGrid")
                .Resizable(resizable => resizable.Columns(true))
                .Scrollable()
                .EnableCustomBinding(true)
                .Selectable(selectable => selectable
                    .Mode(GridSelectionMode.Multiple))
                    
                .Columns(columns => {
                    columns.Bound(qr => qr.QuoteRequestId).Hidden();
                    columns.Template(@<text><a href="#" onclick= "OpenNotes(#=QuoteRequestId#)" class = 'k-button k-button-icontext'> Notes </a></text>).Width(100);
                    }
                })

Dimiter Madjarov
Telerik team
 answered on 18 Apr 2013
1 answer
454 views
Hi,

i want fix width of column in kendoGrid, i tried using width:100px but when text is too long like
 (Ex. asgfsgdajhdkjashdasdklaskdljaslkdjlkasj) column width aoutomatically incresed,
 is there any way to handel overflow text or nowrap property to break text and add it to next line.
Dimiter Madjarov
Telerik team
 answered on 18 Apr 2013
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?