telerik

Kendo MVC: Adding Edit, Delete Buttons to Grid

懵懂的女人 提交于 2019-12-13 16:29:29
问题 Assuming I have the below table: @Html.Kendo().Grid(Model).Name("Staff").Columns(x => { x.Bound(y => y.StaffId); x.Bound(y => y.FirstName); x.Bound(y => y.LastName); x.Bound(y => y.Email); x.Bound(y => y.Phone); x.Command(y => y.Custom("Edit").Action("edit", "controller", new { id = ????? })); }).Sortable().Scrollable().Pageable(x=> x.PageSizes(true)).Filterable() How can I pass the primary key value (StaffId in this case) associated to the row to the object route values similar to the way it

Set the date to raddatepicker by using Javascript

孤者浪人 提交于 2019-12-13 16:05:57
问题 I am getting a date value from server side and passing it to javascript method and then i am assigning the date to Telerik RadDatePicker control using Javascript. I am getting date as var Date1="16/01/2013 00:00:00"; function SetDate(Date1) { var datepicker = $find("<%= RadDatePicker1.ClientID %>"); datepicker.set_selectedDate(Date1); } datepicker.value=Date1; to display the date.but i am Unable to display the date in raddatepicker 回答1: This question was old, but here goes... It may just be

invoke method batcheditcommand from C#.net [duplicate]

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-13 08:17:53
问题 This question already has an answer here : how to use webmethod with telerik batch edit grid (1 answer) Closed 4 years ago . I used telerik:RadGrid batch editing; to fill this grid I used below syntax: function GridBind(GridID, GridData) { var TableView = GridID.get_masterTableView(); TableView.set_dataSource(GridData); TableView.dataBind(); } To Invoke batcheditcommand I used below syntax. It’s written under non-postback button Javascript event: function SaveAllChanges(sender,args) { var

how to assign dataSource to DetailgridOptions(dataItem)

时光总嘲笑我的痴心妄想 提交于 2019-12-13 07:38:06
问题 I have a kendo grid which has buttons in every row, On click the buttons open a pop-up with different grid on each button click, and there is a detail teamplate in each row of pop-up grid which contains another grid. Now the problem is how to assign dataSource to the 3rd grid when detailGridOptions(dataItem) function is called. var p=0; $scope.detailGridOptions = function (dataItem) { return { dataSource: new kendo.data.DataSource({ schema: { model: { id: 'Id', fields: { Id: { type: 'number'

How can I download an Excel file to the user's download folder?

妖精的绣舞 提交于 2019-12-13 06:55:22
问题 In a C#, asp.net 4.0 project, I've created an Excel file using Microsoft.Office.Interop.Excel. The file gets created correctly and is placed in a folder on the server. However, I've been unable to come up with a way to display the file to the client. Can someone help me? Some background: I'm trying to work around the Microsoft change that is blocking Excel files from opening. Our web application uses a Telerik grid and that grid is exported to an Excel file using the ExportToExcel function.

How to exclude specific control from css?

被刻印的时光 ゝ 提交于 2019-12-13 06:25:31
问题 I have a telerik treeview which renders in HTML as ul . When I try it in my aspx with specific css , it doesn't appear in the correct way because the CSS file has ul and li selectors . From firebug : Now i want to exclude this control from (#tabContaier ul ,#tabContaier Li) I want some general solution to this problem especially with the telerik controls. Edit: After apply the cascade technique : <telerik:RadTreeView ID="RadTreeView1" runat="server" CheckBoxes="True" Height="200px"

Filter for “UnitPrice” and “ProductID” column

99封情书 提交于 2019-12-13 05:58:14
问题 I wanted to filter UnitPrice and ProductID . This is the sample, you want more using the jsfiddle link. Check this jsfiddle for more detail & work my program in that //change event $("#category").keyup(function () { var selecteditem = $('#category').val(); var kgrid = $("#grid").data("kendoGrid"); selecteditem = selecteditem.toUpperCase(); var selectedArray = selecteditem.split(" "); if (selecteditem) { }); var orfilter = { logic: "or", filters: [] }; var andfilter = { logic: "and", filters:

RadComboBox changing selected item when clicking on other parts of page

帅比萌擦擦* 提交于 2019-12-13 05:17:41
问题 If I select any item of a RadComboBox, next when I click on other parts of the page then the RadComboBox item is changing. How do I solve this problem? aspx: <telerik:RadComboBox ID="cmbExpCTC" runat="server" MarkFirstMatch="true"> </telerik:RadComboBox> C#: public void FillStatus() { try { cmbExpCTC.Enabled = true; dsLocation = BizRegion.GetCandidateInterviewStatus(hfdcandidateid.Value, hfdjobid.Value, hfdRounds.Value); RadComboBoxItem cItem = new RadComboBoxItem("Sourcing in process",

how to fill dropdown in telerik grid databound?

亡梦爱人 提交于 2019-12-13 04:59:41
问题 i have a telerik grid and use GridTemplateColumn as bellow <telerik:GridTemplateColumn DataField="Status" ReadOnly="true" UniqueName="colStatus" HeaderText="Status"> <ItemTemplate> <asp:Label ID="lblStatus" runat="server"></asp:Label> </ItemTemplate> <EditItemTemplate> <asp:DropDownList ID="drpstatus" runat="server" /> </EditItemTemplate> </telerik:GridTemplateColumn> then i fill dropdown and label in ItemDataBound event : protected void grdList_ItemDataBound(object sender, GridItemEventArgs

Expand/Collapse all the gof kendoTreeList

天涯浪子 提交于 2019-12-13 04:50:51
问题 I am using kendoTreeList and I am trying to expand all the groups. Here is my code sample But it seems like the kendoTreeList support only expanding the first group. I tried the following selector in the expand method as well. treeList.expand($(".k-treelist-group")); to expand all the groups. Even though the selector $(".k-treelist-group").length is 3 (total number of groups) but the treelist only expand the first group. Any suggestion please let me know. 回答1: You are right, according with