Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
174 views
I have a RadWindow with a page inside of it. There is a javascript function on this page which (using RadAjaxManager) asynchronously updates another control every 10 seconds.  It does this through calling setTimeout on itself every time it fires.  This is working the way I want it to.  The problem is that once I close the window the javascript function is still firing every 10 seconds calling the the ajax postback.

I want to be able to cancel the timeout when the window is closed but I have no idea how to detect that event from the page inside the window.  Any help?

All of this code is in the page that is contained in the radwindow

Javascript:
    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"
        <script language="javascript" type="text/javascript"
            function UpdateComments() { 
                var ajaxManager = $find("<%= WorkbinItemAjaxManager.ClientID%>");   
                ajaxManager.ajaxRequestWithTarget('<%= RefreshListBttn.UniqueID%>', ''); 
                updatingComments = setTimeout ( "UpdateComments()", 10000 );   
            } 
 
            var updatingComments = setTimeout ( "UpdateComments()", 10000 ); 
 
        </script> 
    </telerik:RadScriptBlock> 

AjaxManager
    <telerik:RadAjaxManager ID="WorkbinItemAjaxManager" runat="server"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RefreshListBttn"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="CommentsListBox" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="InsertCommentBttn" > 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="NewComment" /> 
                    <telerik:AjaxUpdatedControl ControlID="CommentsListBox" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 

Controls
<asp:TextBox ID="NewComment" runat="server" TextMode="MultiLine" EmptyMessage="Add Comment Here..." 
        Rows="3" Width="95%" style="margin-top:5px;"  /> 
 
<asp:Button ID="InsertCommentBttn" runat="server" Text="Add Comment" OnClick="InsertComment" /> 
<asp:Button ID="RefreshListBttn" runat="server" Text="Refresh List" OnClick="RefreshList" /> 
 
 
<telerik:RadListBox ID="RadListBox1" runat="server" Height="100%" Width="100%"  
    DataSourceID="CommentsDataSource" DataKeyField="Comment_ID" OnItemDataBound="Comments_ItemDataBound" > 
</telerik:RadListBox> 


Every 10 seconds the javascript fires the RefreshButton onclick event which refreshes the ListBox.  When the window is closed I want to run some javascript like      clearTimeout(updatingComments);   which will stop the javascript from firing when the window is closed.


On an unrelated note, but still something that's bothering me,  When I added the ListBox into the UpdatedControls on the AjaxManager the height=100% attribute of the list box stops working.  Whats the best way around this?  Thanks for any help.
Georgi Tunev
Telerik team
 answered on 21 Oct 2009
4 answers
157 views
We have a RadCombobox in an updatepanel. There is also a fileupload control in another updatepanel. The Radcombobox displays correctly until a file is uploaded. But after the file is uploaded, the Radcombobox displays only a text box and a "select" link which is not clickable.  I am lost what could be the reason for this rendering. There is no modifcation in the RadcomboBox display from the code behind except for filling the combobox items. Please advise. This has become a critical issue. Any quick help is greatly appreciated.
PMR IN
Top achievements
Rank 1
 answered on 21 Oct 2009
1 answer
299 views
Has anybody else got this error when using the RadGrid.
This line fixes the problem but creates new problems
RadGrid1.EnableLinqExpressions = false;

This style of code continues to work
           GridBoundColumn boundColumnCompany;
            boundColumnCompany = new GridBoundColumn();
            RadGrid1.MasterTableView.Columns.Add(boundColumnCompany);
            boundColumnCompany.DataField = "CompanyName";
            boundColumnCompany.HeaderText = "Store Name";
            boundColumnCompany.Aggregate = GridAggregateFunction.None;
            boundColumnCompany.ShowFilterIcon = true;
            boundColumn.HeaderStyle.Width = 120;
but GridCalculatedColumn stop working
            GridCalculatedColumn calculatedColumnRepeater;         
            calculatedColumnRepeater = new GridCalculatedColumn();
            RadGrid1.MasterTableView.Columns.Add(calculatedColumnRepeater);
            calculatedColumnRepeater.HeaderText = "<b>" + question.GroupBy + "</b><br/>" + question.DisplayText;
            calculatedColumnRepeater.ShowFilterIcon = false;
            calculatedColumnRepeater.HeaderStyle.VerticalAlign = VerticalAlign.Top;
            calculatedColumnRepeater.Aggregate = GridAggregateFunction.Custom;
            calculatedColumnRepeater.DataFields = question.Fields.Split(new char[] { ',' });
            calculatedColumnRepeater.Aggregate = GridAggregateFunction.Custom;
            calculatedColumnRepeater.Expression = question.AggregrateFormulae;
            calculatedColumnRepeater.DataType = new System.Double().GetType();
            calculatedColumnRepeater.DataFormatString = question.DisplayString;

i need to set EnableLinqExpressions to true so i can drag columns into the group by box which stops working once i disable this line.

Cheers


Yavor
Telerik team
 answered on 21 Oct 2009
1 answer
156 views
hello.

I'm using three radTextBox and want to update one of them using javascript.
I'm using the "clinet - onblur" and after updating textbox 1 and text box 2 with numbers - when I leave one of them it should update textbox 3.

the problem is like this: I enter numver to textbox 1 and go to textbox2.
now I enter number to textbox2 and go to textbox 3 and its seems OK.
but if I'm leaving textbox1 or 2 and not focus with my mouse on textbox3 - it doesn't update.
its look like only when I'm focusing on it with the mouse or TAB the value is updated.

Do u know this problem?
Dimo
Telerik team
 answered on 21 Oct 2009
3 answers
121 views
Hi,

Using the example code for a download facility with the FileExplorer I note that you turn off httpCompression. Is this necessary, or can one try to take advantage of compression?

Andrew
Fiko
Telerik team
 answered on 21 Oct 2009
2 answers
300 views

Using RadWindowManager, I pop up an aspx page. And when i close it from (X ) i just wantto fire and event and clear/abondon session. How can i do that?

Thanks...
Kem Arda
Top achievements
Rank 1
 answered on 21 Oct 2009
1 answer
293 views
I doesn't look like set_visible(true) works.  I tried the latest release as well as the current beta.

set_visible(false) seems to work fine.

I have the following code:

var txt = $find('<%= pnl.Items[0].FindControl( "txt" ).ClientID %>'); 
 
if(cb.checked) { 
   txt.set_visible(true); 
} else { 
   txt.set_visible(false); 

pnl is a radpanelbar.  txt is a radtextbox.
Dimo
Telerik team
 answered on 21 Oct 2009
6 answers
198 views
Hi,

   I want to show the IMAGE instead of "Text" in ROOT Item of the RadMenu...

[Image] in Root - if i click , will show the Items....


If any one can suggest me will be more apprict...


Thanks & Regards,
Suresh Kannan P

  
Suresh Kannan
Top achievements
Rank 1
 answered on 21 Oct 2009
5 answers
373 views
Hi,

Grid(as like cascading grid) has button column.while clicking expend icon, it is displaying detail table records.
If am clicking the button, can we display the inline create form of detail table(inline grid)?


I put the following code for your reference

  <telerik:RadGrid ID="grdAllQuestions"
                                                            AllowPaging="True"
                                                            AllowSorting="False"  
                                                            GridLines="None"  
                                                            runat="server"
                                                            Width="700px"
                                                            Skin="Web20"
                                                            PageSize="4" onitemdatabound="grdAllQuestions_ItemDataBound"
                                                            AutoGenerateColumns="False" onitemcreated="grdAllQuestions_ItemCreated"  
                                                                ondetailtabledatabind="grdAllQuestions_DetailTableDataBind"  OnItemCommand="grdAllQuestions_ItemCommand"
                                                                onneeddatasource="grdAllQuestions_NeedDataSource"  oninsertcommand="grdAllQuestions_InsertCommand"                                                                 
                                                                >
                                                             <MasterTableView ShowHeadersWhenNoRecords="true" NoMasterRecordsText="No records to display"
                                                             Width="700px"   DataKeyNames="TrackerId" TableLayout="Fixed">
                                                             
                                                             <ExpandCollapseColumn HeaderText="Answer"  ExpandImageUrl="../../../../Images/Icons/Plus.png" CollapseImageUrl="../../Images/Icons/Plus.png" Visible="true"></ExpandCollapseColumn>
                                                                <Columns>
                                                               
                                     
                                                                 
                                                             
                                <telerik:GridBoundColumn HeaderText="Asked By" DataField="CreatedBy" UniqueName="CreatedBy" >
                                </telerik:GridBoundColumn>
                                <telerik:GridButtonColumn Text="Answer" UniqueName="Answer"  CommandName="Answer" ButtonType="PushButton">
                                 </telerik:GridButtonColumn>
                               
                                                                    
                                                                 
                                                                </Columns>
                                                                
                                                                 <DetailTables>
                                                                     
                                                                    <telerik:GridTableView    CommandItemDisplay="Top"  Width="100%"
                                                                        runat="server" Name="answers"
                                                                        AutoGenerateColumns="false" DataKeyNames="TrackerDtlId" TableLayout="Fixed">
                                                                        <CommandItemSettings AddNewRecordText="Add new answer" />
                                                           
                                                                       
                                                                        <Columns>
                                                                       
                                                                            
                                                                               <telerik:GridDateTimeColumn HeaderText="Date Answered" HeaderButtonType="TextButton"
                                                                DataField="CreatedDate" UniqueName="CreatedDate">
                                                             </telerik:GridDateTimeColumn>
                                                             
                                <telerik:GridBoundColumn HeaderText="Answered by" DataField="CreatedBy" UniqueName="CreatedBy" >
                                </telerik:GridBoundColumn>
                                                                              
                                                                             
                                                                         
                                                                       </Columns>
                                                                        
                                                                       
                                                                    </telerik:GridTableView>
                                                                 </DetailTables>
                                                               
                                     
                                                            </MasterTableView>
                                                        </telerik:RadGrid>


In this example, Can we open the inline create/edit form for the inner grid by clicking answer button?
answer button is in the master table, i want to show the inline create of childgrid while clicking answer button

Thanks for your  help,

sabarishbabu
Top achievements
Rank 1
 answered on 21 Oct 2009
3 answers
118 views

Hi,

I have requirement to create an PDF from RadGrid along with some additional information. The target requirement is something like below
I have a logo and some additional banners(Label/Images) in starting of the page followed by RadGrid and followed by other aditional banners(labels/Images). I want to export total all these three parts into PDF.

In simple words..I like to export total page as it is to PDF

Please give me the suggession. It is little urget for me

Thanks in advance.

Regards,
Satya





Princy
Top achievements
Rank 2
 answered on 21 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?