Hi,
On the kendo side of things there seems to be a databound event that you can subscribe to. I cannot seem to use this on the htmlchart though. I am trying to add it to the kendo widget element of the chart but it doesn't work. I am moving away from server side stuff where possible so need this to be client based.
kendoWidget.dataBound =
function
(e) {
alert(
"dataBound"
);
}
Any ideas?
Regards
Jon
I'm having a problem with the initial image in my image gallery not being resized when the image gallery is placed in a Bootstrap Collapse panel. As soon as I click to scroll through the images, it works fine, but the initial image isn't resized when the panel is shown. Below is some sample code that should illustrate the problem. Any ideas on how to resolve this?
<
div
class
=
"panel panel-default"
>
<
div
class
=
"panel-heading"
role
=
"tab"
id
=
"headingOne"
>
<
h4
class
=
"panel-title"
>
<
a
role
=
"button"
data-toggle
=
"collapse"
data-parent
=
"#accordion"
href
=
"#collapseOne"
aria-expanded
=
"true"
aria-controls
=
"collapseOne"
>Show Images
</
a
>
</
h4
>
</
div
>
<
div
id
=
"collapseOne"
class
=
"panel-collapse collapse"
role
=
"tabpanel"
aria-labelledby
=
"headingOne"
>
<
div
class
=
"panel-body"
>
<
div
class
=
"row"
>
<
div
class
=
"col-md-3"
>
<
div
class
=
"text-center"
>
<
telerik:RadImageGallery
RenderMode
=
"Lightweight"
ID
=
"imgGallery"
runat
=
"server"
LoopItems
=
"true"
BackColor
=
"Gray"
>
<
ThumbnailsAreaSettings
Mode
=
"ImageSlider"
ShowScrollButtons
=
"False"
/>
<
ImageAreaSettings
Height
=
"100px"
NavigationMode
=
"Zone"
ShowNextPrevImageButtons
=
"true"
ShowDescriptionBox
=
"False"
/>
<
ToolbarSettings
Position
=
"None"
></
ToolbarSettings
>
<
Items
>
<
telerik:ImageGalleryItem
ImageUrl
=
"images/Image1.png"
/>
<
telerik:ImageGalleryItem
ImageUrl
=
"images/Image2.png"
/>
</
Items
>
</
telerik:RadImageGallery
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
I have filtered my RadClientDataSource according to the information available in the docs. The filter works momentarily. When my button is clicked, I can see for a single moment that the grid displays the 1 record matching the filter criteria then all the rows come back. I have tried calling the javascript function from a link and a button (as is shown in the code below). Any ideas?
Here is the code for my page.
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="testControl.aspx.vb" Inherits="virtuePortal2016.testControl" %>
<!DOCTYPE html>
<
html
class
=
"no-js"
lang
=
"en"
>
<
head
runat
=
"server"
>
<
meta
charset
=
"utf-8"
/>
<
meta
name
=
"viewport"
content
=
"width=device-width, initial-scale=1.0"
/>
<
title
>Foundation</
title
>
<
link
rel
=
"stylesheet"
href
=
"stylesheets/app.css"
/>
<
script
src
=
"bower_components/modernizr/modernizr.js"
></
script
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
></
telerik:RadScriptManager
>
<
telerik:RadClientDataSource
ID
=
"RadClientDataSource1"
runat
=
"server"
AllowBatchOperations
=
"True"
AutoSync
=
"True"
>
<
DataSource
>
<
WebServiceDataSourceSettings
>
<
Select
Url
=
"http://virtuepb.ourvoiceusa.com/api/catalogItem"
RequestType
=
"Get"
/>
</
WebServiceDataSourceSettings
>
</
DataSource
>
<
Schema
>
<
Model
>
<
telerik:ClientDataSourceModelField
FieldName
=
"Qty"
/>
<
telerik:ClientDataSourceModelField
FieldName
=
"ProductKey"
/>
</
Model
>
</
Schema
>
</
telerik:RadClientDataSource
>
<
input
type
=
"button"
onclick
=
"applyFilter()"
value
=
"Filter"
/>
<
telerik:RadGrid
runat
=
"server"
ID
=
"RadGrid1"
ClientDataSourceID
=
"RadClientDataSource1"
ResolvedRenderMode
=
"Classic"
Width
=
"306px"
Skin
=
"Metro"
>
<
GroupingSettings
CollapseAllTooltip
=
"Collapse all groups"
></
GroupingSettings
>
<
MasterTableView
DataKeyNames
=
"ProductKey"
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"ProductKey"
HeaderText
=
"ProductKey"
UniqueName
=
"ProductKey"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Qty"
HeaderText
=
"Qty"
UniqueName
=
"Qty"
>
</
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
<
telerik:RadCodeBlock
runat
=
"server"
ID
=
"RadCodeBlock1"
>
<
script
type
=
"text/javascript"
>
function applyFilter() {
var dataSource = $find('<%= RadClientDataSource1.ClientID %>');
dataSource.get_filterExpressions().clear();
dataSource.get_filterExpressions().add({ fieldName: "ProductKey", value: "417", operator: Telerik.Web.UI.ClientDataSource.FilterOperator.EqualTo });
var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
masterTable.rebind();
alert(dataSource.get_filterExpressions().get_count());
return false;
}
</
script
>
</
telerik:RadCodeBlock
>
<
script
src
=
"bower_components/jquery/dist/jquery.min.js"
></
script
>
<
script
src
=
"bower_components/foundation/js/foundation.min.js"
></
script
>
<
script
src
=
"bower_components/foundation/js/foundation/foundation.alert.js"
></
script
>
<
script
src
=
"js/app.js"
></
script
>
</
form
>
</
body
>
</
html
>
Hello there
I have a radComboBox
and I'm trying to accees the selected value from it in app_code(.cs)
there is any way to do it ?
Hello Team,
I am having simple Radgrid. which I am binding with JSON object like below :
$(document).ready(function () {
$(window).load(function () {
var JSONdata = [{ "ID": 1, "FirstName": "Chintan", "MiddleName": "Mukesh", "SurName": "Dave" }, { "ID": 2, "FirstName": "Pratik", "MiddleName": "Mukesh", "SurName": "Dave" }, { "ID": 3, "FirstName": "Devang", "MiddleName": "Subhash", "SurName": "Trivedi" }]
var tableView = $find("<%=form1.FindControl("gridClientSide").ClientID%>").get_masterTableView();
tableView.set_dataSource(JSONdata);
tableView.dataBind();
});
});
Grid Code :
<telerik:RadGrid ID="gridClientSide" runat="server" AutoGenerateColumns="false" AllowFilteringByColumn="true">
<MasterTableView TableLayout="fixed">
<Columns>
<telerik:GridBoundColumn DataField="ID" HeaderText="ID" AllowFiltering="true" UniqueName="ID"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name" AllowFiltering="true"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="MiddleName" HeaderText="Middle Name" AllowFiltering="true" ></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="SurName" HeaderText="Sur Name" AllowFiltering="true"></telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<ClientSettings>
<ClientEvents OnCommand="RaiseCommand"/>
</ClientSettings>
</telerik:RadGrid>
function RaiseCommand(sender, args) {
args.set_cancel(true);
sender.get_masterTableView().filter(sender.get_masterTableView().get_filterExpressions().getItem(0).FieldName, sender.get_masterTableView().get_filterExpressions().getItem(0).FieldValue, sender.get_masterTableView().get_filterExpressions().getItem(0).FilterFunction, true);
//sender.rebind();
}
In RaiseCommand function , I am trying to filter radgrid by setting filter expression nothing error occurs but no change applies in rows of grid after execution of this function.
Please help....Please find attached filed
I changed something from demo example to my project and i use datasource in codebehind. DataPager still works fine if i put RadListView datasource in PageLoad but DataPager doesn't work when i put RadListView datasource in event click of Button. Can you help me, please?
- aspx:
<telerik:RadButton ID="RadButton1" runat="server" Text="RadButton" OnClick="Button1_Click"></telerik:RadButton>
<br />
<div>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="ListViewPanel1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="ListViewPanel1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" MinDisplayTime="0">
</telerik:RadAjaxLoadingPanel>
<asp:Panel ID="ListViewPanel1" runat="server">
<telerik:RadListView ID="RadListView1" Width="97%" AllowPaging="True" runat="server"
allowsorting="true" ItemPlaceholderID="ProductsHolder">
<LayoutTemplate>
<asp:Panel ID="ProductsHolder" runat="server">
</asp:Panel>
<table>
<tr>
<td>
<telerik:RadDataPager RenderMode="Lightweight" ID="RadDataPager1" runat="server" PagedControlID="RadListView1"
PageSize="6">
<Fields>
<telerik:RadDataPagerButtonField FieldType="FirstPrev"></telerik:RadDataPagerButtonField>
<telerik:RadDataPagerButtonField FieldType="Numeric"></telerik:RadDataPagerButtonField>
<telerik:RadDataPagerButtonField FieldType="NextLast"></telerik:RadDataPagerButtonField>
<telerik:RadDataPagerPageSizeField PageSizeText="Page size: "></telerik:RadDataPagerPageSizeField>
<telerik:RadDataPagerGoToPageField CurrentPageText="Page: " TotalPageText="of" SubmitButtonText="Go"
TextBoxWidth="30"></telerik:RadDataPagerGoToPageField>
<telerik:RadDataPagerTemplatePageField>
<PagerTemplate>
<div style="float: right; line-height: 34px; margin-left: 10px;">
Items
<asp:Label runat="server" ID="CurrentPageLabel" Text="<%# Container.Owner.StartRowIndex+1%>"></asp:Label>
to
<asp:Label runat="server" ID="TotalPagesLabel" Text="<%# Container.Owner.TotalRowCount > (Container.Owner.StartRowIndex+Container.Owner.PageSize) ? Container.Owner.StartRowIndex+Container.Owner.PageSize : Container.Owner.TotalRowCount %>"></asp:Label>
of
<asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount%>"></asp:Label>
<br />
</div>
</PagerTemplate>
</telerik:RadDataPagerTemplatePageField>
</Fields>
</telerik:RadDataPager>
</td>
</tr>
</table>
</LayoutTemplate>
<ItemTemplate>
<table>
<tr>
<td style="width: 140px; text-align: left; height: 120px">
<asp:Image ID="Img1" runat="server"
ImageUrl='<%# Eval("_Image") %>' Height="100" Width="130" />
</td>
<td style="vertical-align: top; text-align: left">
<asp:LinkButton runat="server" ID="Title" Font-Bold="true" CommandName="Select"
Text='<%# Eval("_Title") %>'></asp:LinkButton>
<asp:Label runat="server" ID="lblink" Font-Size="Small"
Text='<%# Eval("_Link") %>' Visible="false" />
</td>
</tr>
</table>
</ItemTemplate>
</telerik:RadListView>
</asp:Panel>
<asp:SqlDataSource ID="SqlDS" runat="server" ConnectionString="<%$ appSettings:sqlconn %>"
ProviderName="System.Data.SqlClient" ></asp:SqlDataSource>
- aspx.cs work fine (don't use Button):
protected void Page_Load(object sender, EventArgs e)
{
_News.NewsList("20", "", "08/20/2016", "08/30/2016", "0", "0", 0);
RadListView1.DataSource = _News._znews;
RadListView1.DataBind();
}
- aspx.cs DataPager doesn't work:
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
_News.NewsList("20", "", "08/20/2016", "08/30/2016", "0", "0", 0);
RadListView1.DataSource = _News._znews;
RadListView1.DataBind();
}
Thanks.
Hi,
I've not got the data in my embedded tree via an ajax call and the tree is fully populated and expanded. I have made it so that if teh drop down is a checkbox enabled on that the relevant nodes are ticked and if it isn't checkbox enabled that the relevant node is selected.
I now have a further 2 issues
1) I need to be able to make the unopened box show the checked/selected nodes. On the server side there is a sync method but there seems to be nothing of the sort on the client side. I have mucked around with beginUpdate and repaint etc but nothing seems to trigger a sync of the selection from the embedded tree back to the dropdown control.
2) I have the drop down set to autowidth but it doesn't work, it sticks on the width of the opening control box and as such I end up with both horizontal and vertical scrollbars. This might be related to the issue in 1 if the box hasn't worked out that things are different.
Any suggestions?
By the way this is another area where there is significant improvement needed in the documentation.
Regards
Jon
Hi,
I would like to add a piece of text to command item .How can i do it
Next issue - this one is very fustrating
My page works with some cascading combos and I have it all setup. It works fine on the first load. Then if I change one of the parent values the requestingitems event is raised and I alter the parameters as before of teh client data source but this time nothing happens. There is no http request (I see them on the initial call via fiddler)
This is my code that adds the custom parameters on the fly onto the datasource.
$find(dataSourceId).get_dataSourceObject().options.transport.read.url = $find(dataSourceId).get_dataSourceObject().options.transport.baseUrl + dataSourceUrl;
Any suggestions?
Regards
Jon