Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
61 views
This is a small thing, and we've lived with it for 8 months, but can anyone shead any light on this.

To enabme be to make tweaks to the looks of the controls I routinely make a copy of the skin I want, and rename it to match my project. This all works fine, except...With the Slider if I use the embedded skin it looks fine, but if I copy the skin rename it to match my project, and change the markup such that externalSkin = true I get the slider cut off 1px short.

I have included 2 images that show the 1px problem along with the markup and the CSS. you can see in the 2 images that the CSS is rendered slightly differently and the internal skin has a width of 9px, and the copy has a width of 8.
This width comes from the webresource file so I cant just change it in the copied CSS file.

Andy
Andy Green
Top achievements
Rank 2
 answered on 05 Aug 2011
5 answers
269 views
Hi @

We are using Radbuttons through out the application. But we have a reusable component which has asp:buttons and <input type="button".

Is there anyway by which I can make these buttons looks similar to Telerik Buttons?

Thanks In advance.
Bozhidar
Telerik team
 answered on 05 Aug 2011
2 answers
99 views
Hi

How can I Set Value and Text members from DataSource in Bound RadGrid?

The code:
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;


Tks
Bruno
Top achievements
Rank 1
 answered on 05 Aug 2011
1 answer
121 views
I know there are a couple examples of this but none of them fit my exact situation and I need to solve this problem quickly.  Please help.

I have a page with a a radwindow that pops up.  Inside the radwindow are a few controls but the ones that come into play are an image button, a combobox and a listbox.  The combobox is filled with a list of many items that can be easily searched using the autofill feature.  The listbox has the same list of items.  Once the user finds the item he is looking for, the user clicks the image button and the list box is supposed to selects the same item and autoscroll to that item so the user can then select multiple items after the selected item.

I am able to do all of this except have the listbox autoscroll to the item and show it visibly in the list box.

The code I found that I think is close to what I need uses this javascript:

        Sys.Application.add_load(function (e) {
            var item = $find("lstAllGroups").get_selectedItem();
 
            if (item)
                item.scrollIntoView();

The problem I am having is the control called lstAllGroups can't be found and I don't know how to activate the javascript from the code behind.

If you would be able to supply a complete example of this, I would be grateful.

RJ
Ivan Zhekov
Telerik team
 answered on 05 Aug 2011
1 answer
96 views
Hi,

I was wondering if the set_text() client API call is intended to persist that value to the server on a postback.  I am working on an adaptation of the single-click button example in the demonstrations.  In the sample, the button text is set to something like "Processing..." in the OnClientClicked event, and then is returned to the previous value by the OnReponseEnd function of the RadAjaxManager.

The example we are trying to write is not Ajax enabled, so we expect the button to be placed back to its original value by virtue of the postback resetting the value to whatever was defined on the server side.  We have been using this method with a standard ASP button that works fine when setting the .value property on the client side.

Using RadButton, though, setting set_text() appears to persist this value back to the server, and so then it is not changed back to the server-defined value when the post refreshes.  Is there a way to keep that value from being posted back to the server or some other workaround?

Thanks,
Joel
Kevin
Top achievements
Rank 2
 answered on 05 Aug 2011
1 answer
85 views
Hi every one.

I had Telerik 2009 before, and now i update it to 2011.
i have some projects in 2009 and i Change one of them to telerik 2011 manualy.(I Deleted Telerik.Web.UI.dll From BIn and refrences and Put one component in one page that made 2011 DLL and then i add id to refrence manualy from bin folder. but when i create new website it has Telerik.Web.UI.dll.refresh file, but in my previews web applications, Telerik didnt make this file. just Telerik.Web.UI.dll )

I have a strange problem in my menu. in one page of the project that i have a menu in it, it dont show submenus and shows a script error in IE!

its my menu :

 

 

<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>

 


Its my SqlDataSource :

<

 

 

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>

 



And it is FarsiMenu_PreRender function :

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.

Dimitar Terziev
Telerik team
 answered on 05 Aug 2011
1 answer
100 views
I am using the radrotator control to move through a static group of images.  I have defined them each as items and have set the rotatortype to coverflow.  I like the effect as it moves through each image in turn, but when it gets to the last image I'm not sure how to make it start over at the beginning.  Is this possible?

Thanks.
Niko
Telerik team
 answered on 05 Aug 2011
5 answers
154 views

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

Giuseppe
Telerik team
 answered on 05 Aug 2011
1 answer
101 views
Hi, I am urgently looking for solution for implementing the Application Scenario(twitter). I wouldnt wan't to hard code to search for the keywords for the tweets.


But i want to pass in from a textbox/Session. Need help urgently.

Regards
  <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>
Svetlina Anati
Telerik team
 answered on 05 Aug 2011
1 answer
87 views
Hi, I am urgently looking for solution for implementing the Application Scenario(twitter). I wouldnt wan't to hard code to search for the keywords for the tweets.


But i want to pass in from a textbox/Session. Need help urgently.

Regards
  <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>
Svetlina Anati
Telerik team
 answered on 05 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?