Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
539 views
Hello,

  I have a grid where I want to access the object containing the data at client side, in order to present details of the object
  in another panel of the page. I have tried several variations to access the underline object and dataitem values without success.
  I maybe overlooking the solutions somehow.

  Here is a portion of my javascript . Nothing that I tried worked yet. I tried many variations of the below without success. Only the index value shows correctly on my page.

 
               function OnRowSelected(sender, eventArgs)
                    {
                        var grid = $find("<%=TradesGrid.ClientID %>");

                        var index = eventArgs.get_itemIndexHierarchical();   
                        var master = grid.get_masterTableView();         
                        var row = master.get_dataItems()[index];
                        var newValues = master.extractValuesFromItem(index);
                        var newValuesSB = new Sys.StringBuilder();
                       
                        newValuesSB.append("this is a test </br>");
                        for(var property in newValues)
                        {          
                        newValuesSB.append(String.format("<b>{0}</b> : {1} <br/>", property,newValues[property]));
                        }  
                        document.getElementById("<%= QuantityDetail.ClientID %>").innerHTML = "123" + index;
                        document.getElementById("<%= PriceDetail.ClientID %>").innerHTML = newValuesSB.toString();                      
                        document.getElementById("<%= InitialLoan.ClientID %>").innerHTML =row["InitialLoan"];

   

  Thanks.

Joao,
Princy
Top achievements
Rank 2
 answered on 19 Oct 2009
2 answers
153 views
Hi Folks,

I am working on a wizard where I have an informative radsplitter with muliple vertical panes in it. As I navigate through the wizard I want the panes to highlight, thus giving the  user  a status as to where they are in the wizard.

at the moment I am setting the background colour of the radpanes via an ajaxrequest method. Ideally I would like to do this on the clientside

I am assuming its something like this
RadPane.style.backgroundColor = "red"

I would be grateful if someone could give me an insight into a snippet of code     that would achieve this

thanks

Mark
mark
Top achievements
Rank 1
 answered on 19 Oct 2009
1 answer
129 views
Hello,

I have a RadGrid  (Q1 2008).. it has 1 detail Table...

I am capturing the ItemDatabound event as such:

Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound  
 
     If e.Item.OwnerTableView.Name = "ClientTable" Then  
          If e.Item.ItemType = GridItemType.Item Then  
(...) 

The event seems to run fine for the first record of the details table, but doesn't fire on any other records in the detail...  the records show fine, but nothing I have set in the event affects them...  ie..

I set the tooltip text for an image button to "Whuzzle"...   tool tip on the first row of the detail table is correct.. but empty on all the remaining rows.

My whole code looks like this..
Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As _ Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound  
     
   If e.Item.OwnerTableView.Name = "ClientTable" Then  
        If e.Item.ItemType = GridItemType.Item Then  
            Dim DGI As GridItem = DirectCast(e.Item, GridItem)  
            Dim rttEdit As Telerik.Web.UI.RadToolTip = _ 
                 DirectCast(DGI.FindControl("rttEdit"), RadToolTip)  
            Dim rttDelete As Telerik.Web.UI.RadToolTip = _ 
                 DirectCast(DGI.FindControl("rttDelete"), RadToolTip)  
 
            rttEdit.Text = "Edit Client" 
            rttDelete.Text = "Delete Client" 
         End If  
      End If  
End Sub  
 
 
Thanks!

Matt
Matt
Top achievements
Rank 1
 answered on 19 Oct 2009
1 answer
139 views
Hi

I'm having difficulties persisting  a special day style have now moved over to using DayRender function.

I'm using a RadCalendar inside a asp:repeater item. In the serverside DayRender, how can I reference values in my RepeaterItem (row) where I have a databound key or hidden label?
I thought I could do that through the dayRender Sender parent but no luck.

Axel
Axel
Top achievements
Rank 2
 answered on 18 Oct 2009
1 answer
354 views
Hello

I have a web user control that fires 2 events - Event1 and Event2 and I want when the control fires Event1 then Event1Panel to postback, and the same when Event2 fires then Event2Panel postbacks. Here is some code:

Default.aspx

<%@ Register Src="WebUserControl.ascx" TagName="WebUserControl" TagPrefix="uc1" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title></title>  
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
        </telerik:RadScriptManager> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="WebUserControl1" EventName="Event1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="Event1Panel" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="WebUserControl1" EventName="Event2">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="Event2Panel" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    </div> 
    <uc1:WebUserControl ID="WebUserControl1" runat="server" /> 
    <asp:Panel ID="Event1Panel" runat="server">  
        Event1Panel<br /> 
        <%= DateTime.Now.ToString() %> 
    </asp:Panel> 
    <asp:Panel ID="Event2Panel" runat="server">  
        Event2Panel<br /> 
        <%= DateTime.Now.ToString() %> 
    </asp:Panel> 
 
    </form> 
</body> 
</html> 
 


WebUserControl.ascx

 

<asp:Button ID="btn1" runat="server" Text="Event1" /> 
<asp:Button ID="btn2" runat="server" Text="Event2" /> 
 
public partial class WebUserControl : System.Web.UI.UserControl  
{  
    public event EventHandler<EventArgs> Event1;  
 
    protected virtual void OnEvent1(EventArgs args)  
    {  
        if (Event1 != null)  
        {  
            Event1(this, args);  
        }  
    }  
 
 
    public event EventHandler<EventArgs> Event2;  
 
    protected virtual void OnEvent2(EventArgs args)  
    {  
        if (Event2 != null)  
        {  
            Event2(this, args);  
        }  
    }  
 
    protected void Page_Load(object sender, EventArgs e)  
    {  
        btn1.Click += delegate(object o, EventArgs args)  
        {  
            OnEvent1(EventArgs.Empty);  
        };  
 
        btn2.Click += delegate(object o, EventArgs args)  
        {  
            OnEvent2(EventArgs.Empty);  
        };  
 
    }  
}  
 

 

 

 

 

Why this is not working??

 

 

Iana Tsolova
Telerik team
 answered on 18 Oct 2009
5 answers
184 views
I want to make a Drag n Drop grid where the user can drag line items to from the Primary Grid to a 2nd Grid which they will then use the 2nd Grid to export to XLS/PDF.

Grid 1 contains a all the line items of orders from our ERP system, I want them to be able to filer this etc and drag individual lines to another grid and when they have brought over all the lines they want then export it to xls/pdf (I dont want to store any of the information in a database for the items in Grid2.  I just basically want a place holder so they can add diffrent lines from mutiple orders/po/customers and then be able to export them insted of having to copy/paste each time they would do a search.

I looked over the examples currently and they all appear to be storeing the information in another database
Carl
Telerik team
 answered on 18 Oct 2009
0 answers
118 views
Hello All...

I have a combobox which is filled on demand (by ItemsRequested). On page load, I need to fill the combobox initially with some value (which exists on the items that will be filled if ItemsRequested fired)..

Let's say I have the following code snippet for ASPX

<asp:ScriptManager ID="ScriptManager" runat="server"></asp:ScriptManager> 
 
<telerik:RadComboBox ID="cmbo" runat="server" AutoPostBack="true" EnableLoadOnDemand="true"></telerik:RadComboBox> 


And I have a method: cmbo_ItemsRequested which handles cmbo.ItemsRequested, this methods (for simplicity) fills the combobox with 100 items in the form: '#-Item' and the value of #

Protected Sub cmbo_ItemsRequested(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs) Handles cmbo.ItemsRequested 
 
  cmbo.Items.Clear() 
  For i As Integer = 1 To 100 
            cmbo.Items.Add(New RadComboBoxItem(i & "-Item", i)) 
        Next 
        cmbo.DataBind() 
 
End Sub 


And on Page Load I need to fill the combobox initially with some value (Let's say "5-Item")

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 
 
        If Not Page.IsPostBack Then 
            cmbo.Items.Add(New RadComboBoxItem("5-Item")) 
        End If 
 
End Sub 


After running this code:
On page load, "5-Item" is displayed on the combobox. Clearing the text of the combobox will open the combobox and the combobox will be filled the combobox with the 100 items, now select any item (for example: "10-Item") , the combobox will be closed, reopen the combobox, the only item will be displayed in the items list is "5-Item" (as the snapshot attached)... 

What I need is to display all items after selecting "10-Item"....

PS: You may ask why I didn't use LoadOnDemand feature provided from Telerik....that's because I don't need to load ALL items on page load, because the method cmbo_ItemsRequested  makes a query from database and depending on the entered text in the combobox it retrieves the data (I have thousands of records to be filled) also I have about 5 other comboboxes like this one on the same page, so filling it with all data on page load will not be effecient (will be slow)..

Note: I am using version: 2009.1.402.35 , and IE7 (I tried the latest version of Telerik, but it didn't fix the issue)

I am waiting any suggestion ASAP...

Thank you.

idwaikat
Top achievements
Rank 2
 asked on 18 Oct 2009
1 answer
144 views
We are now evaluating whether our application(certain part of our app uses telerik components) can run on Microsoft Azure platform, the experience turns out to be quite satisfactory so far.

The only complaint is the file size of the JavaScript get really big, our users have to take quite a long time to download the js file to get a page loaded. We know that there are some tricks to improve the performance, one is compression. We tried to enable Rad Compression for the UI components, but it seems like it doesn't work.

Any help would be appreciated, thanks!
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 18 Oct 2009
2 answers
148 views

Hi,

We are using the ASP.Net AJAX RadEditor (v 2007.3.1425.35)and we are experienced two issues:

1)      “ApplyClass”tool button does not work with Chrome v2.0.172.39

The “ApplyClass” tool button itworks great in IE (v6.0 and v8.0) and FireFox (v 3.0.13), but it does not work inChrome (v2.0.172.39).  When you selectsome text and then click on a style in the “ApplyClass” drop down, instead of aspan tag having class="SelectedClass” being wrapped around the selectedtext, the selected text gets deleted and the following HTML is inserted at thebeginning of the editor field:

<span><span class="SelectedClass"> </span></span> 

I downloaded atrial version of the RadEditor v 2009.2.701.35 and tested this.  In this case, the ApplyClass tool button onlyworks in Chrome when it is clicked twice.  Again, it works fine in IE and FireFox.

2)Extra space being inserted at the bottom of the editorwindow

                                                                                                                               

I have a RadEditor with aspecified height in pixels.  Duringcertain circumstances, the three tab buttons at the bottom of the control (Design,HTML, and Preview) move up and the bottom portion of the editor is filled witha blank rectangle.  If I have resizingenabled and click on the resizing glyph at the lower right corner, the threetab buttons move to the bottom of the editor, and the blank rectangledisappears.

There are two circumstances inwhich I can get this to occur:

a)When I expand the editor to full-screen mode via the “ToggleScreenMode”in IE 6.0 or IE8.0, and then click it again to return to normal size, the threetab buttons move up and the bottom 25% of the editor is filled with a blankrectangle. (Chrome and FireFox work fine).This issue occurs for both the 2007.3.1425.35 and the trial 2009.2.701.35versions of the RadEditor

b)When I do a server postback and the page reloads, theissue occurs again and this time about half of the window is filled by thisblank rectangle.  This happens across allthree browsers.   This issue occurs for only the 2007.3.1425.35 versionsof the RadEditor

The only module I am using is theStatistics module:

  <modules> 
    <module name="RadEditorStatistics" dockingZone="Bottom" enabled="true" visible="true" /> 
  </modules> 
 

Thank you very much for your assistance.  Please let me know if you require any more information.

Joe

Ramjet
Top achievements
Rank 1
 answered on 18 Oct 2009
2 answers
159 views
I'm getting this error when I try to mimic the demo code.  I have Telerik.Web.UI imported.  Do I need another namespace to use the AppointmentToolTip object?
Joel R
Top achievements
Rank 1
 answered on 17 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?