const string sSql = "SPl_JUIZOS";
SqlConnection oConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["ApplicationServices"].ConnectionString);
SqlDataAdapter oAdapter = new SqlDataAdapter(sSql, oConnection);
DataTable oDataTable = new DataTable();
GridJuizos.DataSource = oDataTable;
Sys.Application.add_load(function (e) { var item = $find("lstAllGroups").get_selectedItem(); if (item) item.scrollIntoView();
<telerik:RadMenu ID="FarsiMenu" runat="server" DataFieldParentID="MenuParentID" DataNavigateUrlField="AdminValue" DataSourceID="sdsMenuBuilder" DataTextField="MenuText" DataValueField="Value" DataFieldID="MenuID" Width="650px" onprerender="FarsiMenu_PreRender">
</telerik:RadMenu>
<
asp:SqlDataSource ID="sdsMenuBuilder" runat="server"
ConnectionString="<%$ ConnectionStrings:ArminShopConnectionString %>" DeleteCommand="Delete tDynamicMenu
Where MenuID=@MenuID"
InsertCommand="Insert tDynamicMenu (MenuParentID,MenuText,Lang,ShopID,OrderMenu)
Values(@MenuParentID,@MenuText,1,@ShopID,@OrderMenu)
"
ProviderName="<%$ ConnectionStrings:ArminShopConnectionString.ProviderName %>" SelectCommand="Select * From tDynamicMenu
Where Lang = 1 And ShopID = @ShopID
Order By OrderMenu"
UpdateCommand="Update tDynamicMenu
Set MenuText=@MenuText ,OrderMenu=@OrderMenu
Where MenuID=@MenuID And ShopID=@ShopID">
<SelectParameters>
<asp:ControlParameter ControlID="lblShopID" Name="ShopID" PropertyName="Text" />
</SelectParameters>
<DeleteParameters>
<asp:Parameter Name="MenuID" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="MenuID" />
<asp:ControlParameter ControlID="lblShopID" Name="ShopID" PropertyName="Text" />
</UpdateParameters>
<InsertParameters>
<asp:ControlParameter ControlID="lblShopID" Name="ShopID" PropertyName="Text" />
<asp:Parameter Name="MenuParentID" />
<asp:Parameter Name="MenuText" />
<asp:Parameter Name="OrderMenu" />
</InsertParameters>
</asp:SqlDataSource>
using
Telerik.Web.UI;
protected void FarsiMenu_PreRender(object sender, EventArgs e)
{
try
{
foreach (RadMenuItem rootItem in FarsiMenu.Items)
{
rootItem.Attributes.Add(
"style", "cursor:pointer");// for root tems
SubMenuF(rootItem);
}
}
catch (Exception)
{
}
}
protected void SubMenuF(RadMenuItem MenuItem)
{
try
{
foreach (RadMenuItem childItem in MenuItem.Items)
{
childItem.Attributes.Add(
"style", "cursor:pointer");//for child items
SubMenuF(childItem);
}
}
catch (Exception)
{
}
}
Any help or suggestion plz? and any better suggestion for convert project better ?
Thanks in Advance.
Dear Telerik Team,
Currently, we are working on our web.app. which utilizes your library for ATLAS. Getting a fast chart component was one of the reasons for our decision to buy your library. Recently, we have using MSChart on certain web page which resides in our solution. However, we are unfavorably surprised, because of your Radchart performance ussues. We are afraid of the incorrect utilization of the RadChart component, therefore we would like to ask you for a proper technique to RadChart preparing as well as rendering.
Please, have a look at our performance test, which we have made for the comparison. The test were proceeded on the same machine/IDE/database/.NET framework (so, on the same HW & SW configuration).
Here is our source code snippet: (Let us remark that we need to specify the color for each of the series.)
foreach (KeyValuePair<DataPointEntity, DataTable> dt in data)
{
ChartSeries chartSeries = new ChartSeries(radChart.Series);
chartSeries.Name = dt.Key.Name;
chartSeries.Appearance.ShowLabels = false;
chartSeries.SetColors(dt.Key.Color);
chartSeries.Appearance.FillStyle.MainColor = dt.Key.Color;
for (int i = 0; i < dt.Value.Rows.Count; ++i)
chartSeries.AddItem(new ChartSeriesItem(
((DateTime)dt.Value.Rows[i][1]).ToOADate(), (double)dt.Value.Rows[i][2]));
radChart.Series.Add(chartSeries);
}
Here are the obtained results:
MSChart:
Preparing 27 000 values 0:0:0.093 s
Rendering: 13 s
RadChart:
Preparing 27 000 values 0:0:2.160 s
Rendering: 30 s
What we have made wrong, please? Must we done this by using a DataTable (or something similar)?
There is series type “Fastline” in MS chart for faster rendering. Do you have any tip or idea how to set up the RadChart instance to accomplish faster rendering, or is there something for increase the rendering speed?
We suppose that Silverlight version of the RadChart maybe faster, but we want to build our web app on ATLAS.
Kind Regards,
SCT
<
script
type
=
"text/javascript"
>
var $ = $telerik.$;
function GetTweetes(keywords, numPosts, fnk) {
var url = "http://search.twitter.com/search.json?q=" + keywords + "&rpp=" + numPosts + "&callback=?";
$.getJSON(url, function(data) {
if ($.isFunction(fnk)) {
fnk.call(this, data.results);
}
});
}
function OnClientShowing(sender, args) {
GetTweetes("Ajax", 10, function(data) {
var rotator = $find("<%= tweetsRotator.ClientID %>");
var currentItems = rotator.get_items();
//scroll the rotator to the first item
rotator.set_currentItemIndex(0);
$(data).each(function(i, post) {
//if there is such an item created already - simply replace the content with the latest one
var dataItem = data[i];
var htmlString = "<
div
class
=
'wrapper'
>" + "<
img
class
=
'profilePic'
src
=
'" + dataItem.profile_image_url + "'
></
img
>" + "<
div
class
=
'text'
>" + dataItem.text + "</
div
><
div
class
=
'date'
><
span
class
=
'author'
>" + dataItem.from_user + " | </
span
>" + dataItem.created_at + "</
div
></
div
>";
if (currentItems[i]) {
currentItems[i].get_element().innerHTML = htmlString;
}
else {
//create and add a new item in case there is no such in the rotator - e.g in this demo this will be needed only on first show but in more complex scenario, when the returned by twitter records have different length
var radRotatorItemData = {};
radRotatorItemData.Html = htmlString;
rotator.addRotatorItem(radRotatorItemData, i);
}
});
});
}
function ShowNotification() {
var notification = $find("<%= RadNotification1.ClientID %>");
notification.show();
}
</
script
>
<
script
type
=
"text/javascript"
>
var $ = $telerik.$;
function GetTweetes(keywords, numPosts, fnk) {
var url = "http://search.twitter.com/search.json?q=" + keywords + "&rpp=" + numPosts + "&callback=?";
$.getJSON(url, function(data) {
if ($.isFunction(fnk)) {
fnk.call(this, data.results);
}
});
}
function OnClientShowing(sender, args) {
GetTweetes("Ajax", 10, function(data) {
var rotator = $find("<%= tweetsRotator.ClientID %>");
var currentItems = rotator.get_items();
//scroll the rotator to the first item
rotator.set_currentItemIndex(0);
$(data).each(function(i, post) {
//if there is such an item created already - simply replace the content with the latest one
var dataItem = data[i];
var htmlString = "<
div
class
=
'wrapper'
>" + "<
img
class
=
'profilePic'
src
=
'" + dataItem.profile_image_url + "'
></
img
>" + "<
div
class
=
'text'
>" + dataItem.text + "</
div
><
div
class
=
'date'
><
span
class
=
'author'
>" + dataItem.from_user + " | </
span
>" + dataItem.created_at + "</
div
></
div
>";
if (currentItems[i]) {
currentItems[i].get_element().innerHTML = htmlString;
}
else {
//create and add a new item in case there is no such in the rotator - e.g in this demo this will be needed only on first show but in more complex scenario, when the returned by twitter records have different length
var radRotatorItemData = {};
radRotatorItemData.Html = htmlString;
rotator.addRotatorItem(radRotatorItemData, i);
}
});
});
}
function ShowNotification() {
var notification = $find("<%= RadNotification1.ClientID %>");
notification.show();
}
</
script
>