I would like to know how to get the count of items of the list when the user types in something.
For instances, let's say that the user starts typing the "X" letter but my query doesn't returns any word with "X", so the count of items would be zero.
In this case I could display a warning message like "There is no one possible choice that matches your typing".
Any idea?
Hello,
I have a RadGrid for which I have enabled exporting to Excel using the XSLX format. The export works very well except the export removes hyperlinks from the grid and replaces them with plain text. I have a requirement to include in the resulting XSLX file the hyperlink that appears in the grid in a GridHyperlinkColumn. I have tried altering the ExportOnlyData value in the grid's export settings, but that causes the data in the GridHyperlinkColumn to not appear at all. Here is a simplified grid. Thank you for your advice on whether XSLX exports can include hyperlinks.
<
telerik:RadGrid
ID
=
"rgInstSearchResults"
runat
=
"server"
RenderMode
=
"Lightweight"
DataSourceID
=
"odsInstSearch"
AutoGenerateColumns
=
"false"
Skin
=
"Bootstrap"
ShowStatusBar
=
"true"
AllowMultiRowSelection
=
"true"
Width
=
"95%"
GridLines
=
"Both"
AllowFilteringByColumn
=
"false"
>
<
ClientSettings
>
<
Selecting
AllowRowSelect
=
"true"
UseClientSelectColumnOnly
=
"true"
/>
</
ClientSettings
>
<
ExportSettings
ExportOnlyData
=
"true"
OpenInNewWindow
=
"true"
FileName
=
"InstitutionSearchResults"
IgnorePaging
=
"true"
>
<
Excel
DefaultCellAlignment
=
"Left"
Format
=
"Xlsx"
/>
<
Word
Format
=
"Html"
/>
</
ExportSettings
>
<
MasterTableView
Name
=
"mtvInstSearchResults"
DataSourceID
=
"odsInstSearch"
DataKeyNames
=
"InstitutionID"
CommandItemDisplay
=
"Top"
AllowPaging
=
"true"
AllowSorting
=
"true"
PageSize
=
"50"
AllowMultiColumnSorting
=
"true"
AllowAutomaticDeletes
=
"true"
ShowFooter
=
"True"
AllowAutomaticInserts
=
"False"
AllowAutomaticUpdates
=
"False"
>
<
CommandItemStyle
BackColor
=
"#dae0ed"
Font-Bold
=
"true"
HorizontalAlign
=
"Right"
/>
<
CommandItemSettings
ShowExportToExcelButton
=
"true"
ShowAddNewRecordButton
=
"false"
ShowRefreshButton
=
"true"
ShowExportToWordButton
=
"true"
/>
<
PagerStyle
AlwaysVisible
=
"true"
PageSizes
=
"25,50,100,500"
/>
<
Columns
>
<
telerik:GridClientSelectColumn
UniqueName
=
"ClientSelectColumn"
Reorderable
=
"False"
Exportable
=
"false"
/>
<
telerik:GridHyperLinkColumn
UniqueName
=
"InstitutionID"
HeaderText
=
"ID"
DataNavigateUrlFields
=
"InstitutionID"
Reorderable
=
"False"
DataNavigateUrlFormatString
=
"ViewInstitution.aspx?InstitutionID={0}"
DataTextField
=
"InstitutionID"
Target
=
"_blank"
/>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
I am trying to post an array from jQuery on an .aspx page to a method in the codebehind using Telerik AjaxManager. The problem I am having is converting the string to a list or even an array using C#. The string (after using Json.stringify in jQuery) looks like this:
string zoneString = "[[1,[["Ticket Core.AFE"],["Ticket Core.CompanyName"]]],[2,[["Ticket Core.CompanyCity"],["Ticket Core.CompanyState"]]]]"
I tried to deserialize like this:
List<ZoneInfo> zones = JsonConvert.DeserializeObject<List<ZoneInfo>>(zonesString);
But that produced an error.
Here is my client-side code:
var zones = [];
for (var i = 1; i <= zoneCount; i++)
{
var o = $.data(listBox, i.toString());
if(o != undefined){var items = [];var a = o._array;
//pull the key/value
for (x = 0; x < a.length; x++)
{
var item = a[x];
var value = item.get_value();
value items.push([value]);
}
zones.push([i, items]);
}}
jsonZones = JSON.stringify(zones);
var ajaxManager = $find("<%= ((RadAjaxManager)this.Page.Master.FindControl("RadAjaxManager1")).ClientID %>"); ajaxManager.ajaxRequest('CREATEREPORT|' + jsonZones + '|' + tid);
Here is my server-side code:
protected void AjaxMgr_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
string[] args = e.Argument.Split('|');
string sCommand = args[0];
switch (sCommand.ToUpper())
{
case "CREATEREPORT":string zonesString = args[1];
List<ZoneInfo> zones = JsonConvert.DeserializeObject<List<ZoneInfo>>(zonesString);
var template = args[2];
string[] zone = new string[zones.Count];break;
}
InitializeWizard();}
I am implementing a RadGrid with batch mode editing using clientside binding with a RadClientDataSource. I am finding that calling .hasChanges() results in records flagged for Delete to not actually get deleted when .saveChanges() executes.
This is my setup:
I created my own button for saving, as such:
<
CommandItemTemplate
>
<
telerik:RadButton
ID
=
"RadButtonSave"
runat
=
"server"
Text
=
"Save"
CssClass
=
"GoButton"
AutoPostBack
=
"false"
OnClientClicked
=
"function(){ saveChanges();}"
>
</
telerik:RadButton
>
</
CommandItemTemplate
>
Which calls the following javascript function:
function saveChanges() {
var grid = $find("<%= RadGrid1.ClientID %>");
//var isDirty = grid.get_batchEditingManager().hasChanges(grid.get_masterTableView());
grid.get_batchEditingManager().saveChanges(grid.get_masterTableView());
}
If I make changes to grid data and click the Save button the webservices for the insert, update, delete are being called.
HOWEVER, if I uncomment the "var isDirty...." line in the above .saveChanges() function that calls .hasChanges(), then the Deletes will no longer save. The web service for deletes simply does not get called. Inserts and update still work correctly. If i comment out that line, then the deletes work again.
I found the same behaviour on a LiveDemo example that checks .hasChanges().
https://demos.telerik.com/aspnet-ajax/grid/examples/data-binding/client-side/client-data-source-binding/defaultcs.aspx
Steps to reproduce:
- Make any change to the first record, such as modifying the Contact Name.
- On the second record, Click the "x" under the DELETE column to mark it for delete.
- Click any column heading to sort. (This calls a UserAction event handler that calls .hasChanges())
- Choose to Cancel at the popup prompt.
- Click "Save changes".
- Monitor the browser console, you will find that webservice UpdateCustomers is called, but DeleteCustomers is not.
Please confirm whether this is a bug and if there is a workaround.
It seems that Column names (title, start time, end time,..) are not translated via dictionary (RadGantt.resx)
Is there a way to change column names?
Hi,
I have same drodown in ItemTemplate and edititemTemplate.iI don't want to click the cell and edit.If anything i edit in itemtemplate,the cell should be recognised as edited. same way in Edititemtemplate.So i don't want the cell disable.I found one link related to check box.I want same for dropdown also.But it is not working for dropdown
Hi,
I have aspx file which refer another external jquery file.i.e. js file referred in aspx page.in this page we migration the old control into new telerik control.After selecting in autocomplete, they send a jquery ajax call for get data from the service and rendering in respective control instead of typing.All this functionality is available in external js file.So how i can get the Radcombobox and change the value.Any suggestion on this. please Support me.
Thank you
S A Saikrisshnan
WAVE accessibility evaluation tool reports numerous errors with player button. How can we configure to avoid? Please attached image.
<telerik:RadMediaPlayer RenderMode="Lightweight" ID="RadMediaPlayer1" Skin="Bootstrap" runat="server" Width="340" BackColor="Black" AutoPlay="true" MimeType="video/mp4" EnableAriaSupport="true"
StartVolume="80" Height="200px">
</telerik:RadMediaPlayer>
Hello,
I have a styling problem when a dialog is shown in RadEditor (e.g. linkmanager). I have assigned my own skin.:
<
telerik:RadEditor
ID
=
"radEditor"
runat
=
"server"
AutoResizeHeight
=
"true"
EditModes
=
"Design,Html" DialogsCssFile="/editordialog.css"
>
<
Tools
>
<
telerik:EditorToolGroup
>
<
telerik:EditorTool
Name
=
"Cut"
/>
<
telerik:EditorTool
Name
=
"Copy"
/>
<
telerik:EditorTool
Name
=
"Paste"
/>
<
telerik:EditorTool
Name
=
"PastePlainText"
/>
<
telerik:EditorTool
Name
=
"FormatStripper"
/>
</
telerik:EditorToolGroup
>
<
telerik:EditorToolGroup
>
<
telerik:EditorTool
Name
=
"Bold"
/>
<
telerik:EditorTool
Name
=
"Italic"
/>
<
telerik:EditorTool
Name
=
"Unterline"
/>
</
telerik:EditorToolGroup
>
<
telerik:EditorToolGroup
>
<
telerik:EditorTool
Name
=
"Indent"
/>
<
telerik:EditorTool
Name
=
"Outdent"
/>
<
telerik:EditorTool
Name
=
"InsertUnorderedList"
/>
<
telerik:EditorTool
Name
=
"InsertOrderedList"
/>
</
telerik:EditorToolGroup
>
<
telerik:EditorToolGroup
>
<
telerik:EditorTool
Name
=
"LinkManager"
/>
<
telerik:EditorTool
Name
=
"InsertParagraph"
/>
<
telerik:EditorTool
Name
=
"ApplyClass"
/>
</
telerik:EditorToolGroup
>
</
Tools
>
<
CssClasses
>
<
telerik:EditorCssClass
Name
=
"remove CSS"
Value
=
""
/>
<
telerik:EditorCssClass
Name
=
"title"
Value
=
"p.EditorTitle"
/>
</
CssClasses
>
<
CssFiles
>
<
telerik:EditorCssFile
Value
=
"~/App_Themes/EditForm/Form.css"
/>
</
CssFiles
>
</
telerik:RadEditor
>
Skin, EmbeddedSkins and RenderMode are defined in web.config.
I have read some older posts like:
https://www.telerik.com/forums/css-skin-not-setting-for-radeditor-dialogs#D2y6DCqSQkiiOjw0-LqBhA
https://feedback.telerik.com/aspnet-ajax/1377496-adding-dialogscssfile-to-radeditor-changes-radeditor-class
But this doesn't change anything.
<
telerik:RadEditor
ID
=
"radEditor"
runat
=
"server"
AutoResizeHeight
=
"true"
EnableEmbeddedSkins
=
"false"
Skin
=
"myown"
RenderMode
=
"Lightweight"
EditModes
=
"Design,Html"
DialogsCssFile
=
"/editordialog.css"
>
editordialog.css
@import
url
(
"/App_Themes/RadControls/myown/FormDecorator.myown.css"
);
@import
url
(
"/App_Themes/RadControls/myown/ColorPicker.myown.css"
);
@import
url
(
"/App_Themes/RadControls/myown/FormDecorator.myown.css"
);
@import
url
(
"/App_Themes/RadControls/myown/Grid.myown.css"
);
@import
url
(
"/App_Themes/RadControls/myown/Input.myown.css"
);
@import
url
(
"/App_Themes/RadControls/myown/PanelBar.myown.css"
);
@import
url
(
"/App_Themes/RadControls/myown/Rotator.myown.css"
);
@import
url
(
"/App_Themes/RadControls/myown/Slider.myown.css"
);
@import
url
(
"/App_Themes/RadControls/myown/Splitter.myown.css"
);
@import
url
(
"/App_Themes/RadControls/myown/TabStrip.myown.css"
);
@import
url
(
"/App_Themes/RadControls/myown/ToolBar.myown.css"
);
@import
url
(
"/App_Themes/RadControls/myown/TreeView.myown.css"
);
@import
url
(
"/App_Themes/RadControls/myown/Upload.myown.css"
);
@import
url
(
"/App_Themes/RadControls/myown/Window.myown.css"
);
@import
url
(
"/App_Themes/RadControls/myown/ComboBox.myown.css"
);
@import
url
(
"/App_Themes/RadControls/myown/Button.myown.css"
);
@import
url
(
"/App_Themes/RadControls/myown/Editor.myown.css"
);
@import
url
(
"/App_Themes/RadControls/myown/ListBox.myown.css"
);
I created the style with the theme builder tool on this site: https://themebuilder.telerik.com/aspnet-ajax
I tested with versions 2019.3.1023 and 2020.1.114
Maybe I missed something important. I hope you can help me.
Regards
Karsten
I have a gallery of three RadMediaPlayer controls. The sources are added in the code behind. The mp4 files are sitting in a folder at the root of the app. The videos play in debug mode, but when I publish and upload to the dev web server, the video players don't play. They are just black boxes. I'm using IE11 and Chrome. In debug mode, the videos all play in both browsers, but after publishing none of them play in either browser. I have confirmed that the video files are included in the deployed published content and that the folder's path is consistent. What would cause them to not play after publishing?
Code behind snippet:
protected
void
Page_Load(
object
sender, EventArgs e)
{
videoPlayer1.Source = ConfigurationManager.AppSettings[
"MediaUrl"
] +
"Video01_EMISPurposeOverview.mp4"
;
videoPlayer2.Source = ConfigurationManager.AppSettings[
"MediaUrl"
] +
"Video02_AccessHomepageOverview.mp4"
;
videoPlayer3.Source = ConfigurationManager.AppSettings[
"MediaUrl"
] +
"Video03_PrintingInspections.mp4"
;
videoPlayer4.Source = ConfigurationManager.AppSettings[
"MediaUrl"
] +
"Video04_EnteringResultsResolutionOptions.mp4"
;
}
HTML snippet:
<
tr
class
=
"galleryRow"
>
<
td
>
<
div
class
=
"videoWrapper"
>
<
telerik:RadMediaPlayer
ID
=
"videoPlayer1"
runat
=
"server"
Source
=
""
Width
=
"300"
/>
<
p
class
=
"videoCaption"
>EMIS Purpose Overview</
p
>
</
div
>
</
td
>
<
td
>
<
div
class
=
"videoWrapper"
>
<
telerik:RadMediaPlayer
ID
=
"videoPlayer2"
runat
=
"server"
Source
=
""
Width
=
"300"
/>
<
p
class
=
"videoCaption"
>Homepage Access & Overview</
p
>
</
div
>
</
td
>
<
td
>
<
div
class
=
"videoWrapper"
>
<
telerik:RadMediaPlayer
ID
=
"videoPlayer3"
runat
=
"server"
Source
=
""
Width
=
"300"
/>
<
p
class
=
"videoCaption"
>Printing Inspections</
p
>
</
div
>
</
td
>
</
tr
>