Telerik Forums
UI for ASP.NET MVC Forum
1 answer
639 views
Hi,

I want to add a condition for the toolbar template as follow:

 .ToolBar(toolbar =>
            {
                toolbar.Template(
                    @{
                        if(centre.AttributeCenterRels.Count < 6) {
                            @<div class="action text-align-right">
                                <a href="~/AttributCentreRel/Create?CentreId=@centre.Id" class="btn"><i class="icon-plus"></i> Create</a>
                            </div>
                        }
                        else{
                            @<div class="action text-align-right">
                                Vous ne pouvez spĂ©cifier que 6 attributs pour un centre.
                            </div>
                        }
                    }
                );
            })

Is this possible?

Regards,
Vladimir Iliev
Telerik team
 answered on 19 Apr 2013
1 answer
313 views
 Hi,

I'm upgrading the kendo to the new one (Spring) and after that, I can't set the selected value for DropDown and Combobox. 
It was ok before when i'm using the old version.
And its happen not only in chrome, but in all browser.

I'm using Visual Studio 2012 (MVC 4), and the new Jquery (1.9.1) and JQuery.Validate.Min.js

following is the code snippet:
@(Html.Kendo().DropDownList()
.Name("color")
.DataTextField("Text")
.DataValueField("Value")
.Value("2")
.BindTo(new List<SelectListItem>() {
new SelectListItem() {
Text = "Black",
Value = "1"
},
new SelectListItem() {
Text = "Orange",
Value = "2"
},
new SelectListItem() {
Text = "Grey",
Value = "3"
}
})
)

It always selects  1 instead of 2?!

Any ideas why?

Thanks :)
Dimiter Madjarov
Telerik team
 answered on 19 Apr 2013
10 answers
987 views
I'm playing around with the new MVC wrappers and I'm having trouble with the grid editors in the examples.
When I view the InlineEditing sample for the grid, clicking the Create button on the toolbar provides an inline editor with numeric text boxes.
In my own project, the grid just shows standard textboxes. To try and see where I've gone wrong I've copied the code from the examples into a standalone project and that reproduces the error, showing only standard text boxes as well. No errors, just no numeric textbox.

Any ideas where I could be going wrong?
Atanas Korchev
Telerik team
 answered on 19 Apr 2013
1 answer
290 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
252 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
260 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
158 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
130 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
231 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
414 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
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
Dialog
MultiColumnComboBox
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?