Telerik Forums
UI for ASP.NET MVC Forum
3 answers
539 views
I have a Ajax Bound Grid with this column which works:

  
columns.Bound(c => c.Id).Title("")
.ClientTemplate(@Html.ActionLink("Download", "DownloadReport?Id=#=Id#")
.ToHtmlString());
  How do I modify this to show/hide the URL based on c.IsReportAvailable?
Dimiter Madjarov
Telerik team
 answered on 21 Jan 2014
1 answer
530 views

Hi Team,

I am using ImageBrowser as a part of editor widget in my screen . I need to delete an image only if it is not used by other resources. I wired the destroy to an action that checks whether its in use or not. If its in use I would return a message saying it could not be deleted .I got stuck on how to return this message to destroy and stop it from deleting the image from the library.
As the documentation says the configuration values will be sent to jquery.Ajax() function I tried using the success and error functions in the destroy configuration but could not handle the request. It always shows up as undefined.This is how I configured my imagebrowser.

01.imageBrowser: {
02.           path: "/BroadcastType/",
03.           transport: {
04.                read: {
05.                    url: function () { $(".k-breadcrumbs.k-textbox").css('display', 'none'); return "../ImageBrowser/Read" },
06.                    type: "POST"
07.                },
08.                destroy: {
09.                    url: "../ImageBrowser/Destroy",
10.                    type: "POST" ,
11.                    success:function(){},
12.                   error:function(){}
13.                },
14.                thumbnailUrl: "../ImageBrowser/Thumbnail",
15.                uploadUrl: "../ImageBrowser/Upload",
16.                imageUrl: "../ImageBrowser/Image?name={0}"
17.            }
18.        }
In short,
How to stop image from being destroyed from the library until I get a response from backend?
How to handle any errors while backend execution?
Can we override the callback functions in the destroy configuration or should we deal with them at the transport level?

Any pointer to the right direction will be appreciated .

Thanks,
Ramoji.




Dimo
Telerik team
 answered on 21 Jan 2014
1 answer
146 views
Hello,

I'm using a custom filter for my Grid on one specific collumn.
Since a have multiple filters on different collumns I would like to be able to clear the active filter for this single collumn.
I don't want to use dataSource.filter({}); cause this will clear all the active filters.
Could anyone help me with this?
Dimo
Telerik team
 answered on 20 Jan 2014
1 answer
68 views
Hi,
After I closed the ticket # 776594, I found that there is still a problem with your VSIX produced template for MVC 5/VS 2013.  My VS Crashes near the end of the template wizard.  I also saw that the jquery issue is fixed. I have disabled all my add ons & extensions.  Any ideas?

Anthony
Momchil
Telerik team
 answered on 20 Jan 2014
3 answers
687 views
Hi,

I have kendo grid read parameterized method, which search employees. When I as search string with "#" than it does not search. When I debug the code and check searchName value in controller, it was empty. I also checked Json request using IE developer tool, it also remove # values from query string. 

I have pasted my code below. Please guide me.

1. Controller Read Method
01.[HttpPost]
02.public ActionResult ReadEmployee([DataSourceRequest] DataSourceRequest command,string searchName){
03.var empList = GetEmployeeListByFirstAndLastName(searchName)
04.var result = new DataSourceResult
05.           {
06.                Data = empList .FirstName,
07.                Total = empList .LastName
08.            };
09.return Json(result,JsonRequestBehavior.AllowGet);
2. Kendo Grid 
@(Html.Kendo().Grid<EmployeeModel>()
     .Name("Grid")
     .DataSource(dataSource => dataSource
                       .Ajax()
                       .PageSize(20)
                       .Read(read => read.Action("ReadEmployee", "Home", "#"))
 )
      .Columns(columns =>
      {
             columns.FirstName
     })
 
      .Sortable()
      .Scrollable(scrollable => scrollable.Height("auto"))
      .Resizable(resizing => resizing.Columns(true))
      .Pageable(pager =>
      {
          pager.Refresh(true);
          pager.Numeric(true);
      }))

Alexander Popov
Telerik team
 answered on 20 Jan 2014
5 answers
181 views
Hello again!

The restriction works really well for drag & drop, but I'm having troubles with preventing recurring events to overlap. I can do this serverside, but that's not really the friendly way. Anyone got any tips?

// Pär
Vladimir Iliev
Telerik team
 answered on 20 Jan 2014
7 answers
317 views
In regards to this thread:
               
http://www.kendoui.com/forums/kendo-ui-complete-for-asp-net-mvc/general-discussions/vs2013-compatibility.aspx

I am looking for an ETA on the Kendo MVC Extensions for VS 2013 feature as its original ETA was mid-November. I am looking to upgrade my  Kendo  VS Solution from VS 2010 to  VS 2013 and have the ability to us the automatic updater as required.

Petar
Telerik team
 answered on 20 Jan 2014
2 answers
696 views
I'm using a combobox to create a searchable list of employees from where the user needs to select one.
If there is a false name entered they should get a warning (which already works) and the first person in the list needs to be selected. I Was trying to do that like this:

<div class="editor-field edit-project">
(Html.Kendo().ComboBox()
.Name("PersonId")
.HtmlAttributes(new { @class = "input-project" })
.DataTextField("Fullname").DataValueField("Id")
.DataSource(source => { source.Read(read => { read.Action("GetPeople", "Project"); }); })
.MinLength(3)
.Filter("contains")
.Events(ev => ev.Change("checkcombobox")))
</div>
And in javascript i'm doing this:

function checkcombobox(e)
{
    if (this.value() && this.selectedIndex == -1) {
        alert('Gelieve een geldige persoon te selecteren');
        var cbx = $("#PersonId").data("kendoComboBox").Selected(0);
 
    }
}
Could anyone help?

Thanks in advance
Tim
Top achievements
Rank 1
 answered on 20 Jan 2014
1 answer
106 views
Kendo UI Complete ASP.NET  Verison : 2013.3.1316 
download the code library  from peter post
add the datetime field in the mode


this code library post everything except datetime field.. please help

dattime filed always remians= 01/01/0001 if you change it from datepicker and then post the form to the controller



--------DateTime Filed PostBack value stays 01/01/0001 Issue-------------------

This approach does not work any more with new kendo contorls library i do'nt know if its works for the previous verions.

if you have datetime filed in your model

Model
{
 public string UserName { get; set; }
 public string UserPhone { get; set; }
 public datetime workDate { get; set; }      <--this will be 01/01/0001 or Null on postback
}

when you do this your view

 columns.Bound(item => item.workDate ).Title("Wok Date").Encoded(true).ClientTemplate("#= WorkDate #" +
                                        "<input type='hidden' name='gridItems[#= index(data) #].WorkDate' value='#= WorkDate #' />");


  <input type="submit" value="Save" id="save"/>


Fails on Postback
CreateWorkOrder(WorkOrderContainer model)
{
 var mydate =model.workDate;   <---- your mydate will be 01/01/0001 Or  null always
}

please help any one or if there is other approch to post the data to server where new entry will be made on action result

regards
Shahzad ilyas


Shahzad
Top achievements
Rank 1
 answered on 19 Jan 2014
6 answers
405 views
I'm attempting to use a custom editor template in a kendo scheduler but have 2 issues.  

1.  I have a mutliselect in the editor template, and am unable to get the selected options to bind and be posted to the server.
2.  My ajax requests are wonky.  
  2a.  What I'm seeing is when i click save it fires the datasource.create method multiple times (sometimes twice sometimes 3 times) and posts the same data to the server.
  2b.  When i attempt to delete an event the datasource.create endpoint is hit and not the datasource.destroy method.


I've attached a solution with an example.  I've neven used these custom editor templates before so i think its likely im not binding it properly.

Thanks,
Chris
  
ShareDocs
Top achievements
Rank 1
 answered on 19 Jan 2014
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
Security
ColorPicker
DateRangePicker
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
DropDownButton
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
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
LLM Kit
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?