Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
117 views
Hello,

I have one page e.g. New Item Create Page. on which there is combo for Category and next to it button to add new category. on clicking on button RAD window is opened as modal window for adding new category. But when I close this modal window the main page refreshes which whole page and clears the values in the controls.
I need to keep this controls to keep their values.
So, I want such help like onClientClose of the modal window only combobox gets refreshed.


Thanks in Advance.
Zinith Patel
Top achievements
Rank 1
 answered on 10 Feb 2010
1 answer
196 views

Hi

I have a content page (main.aspx) which launches rad windows through a RadWindowManager.  Each of these child windows can also launch "grandchild" RadWindows, but by using the RadWindowManager on the parent page.  This is essential as I want each "grandchild" window to be freely moveable outside the bounds of the child window.

The content of each RadWindow is a separate .ASPX page which runs from a Master Page.  This MasterPage has its own RadAjaxManager and the window content page has a RadAjaxManagerProxy. 

The parent page and the child windows have RadGrids, and I want to rebind these when the "grandchild" editing window is closed. A typical sequence might involved:

1. Button clicked on main.aspx to launch child.aspx in window
2. Button clicked on child.aspx to launch grandchild.aspx in window
3. Data edited on grandchild.aspx and grandchild.aspx closed
4. Grid in child.aspx rebound when grandchild.aspx is closed.
5. Data edited in child.aspx and child.aspx closed.
6. Data grid in main.aspx rebound.

Rebinding is done using the OnClientClose JavaScript method and a RadAjaxManager. Essentially, the jS method generates a Ajax Request which is handled in a code-behind handler function which performs the  necessary rebinding. 

Here is the problem - the OnClientClose JS function MUST be on the main.aspx as this is where the RadWindowManager is.  Whenever the child.aspx windows or grandchild.aspx windows are closed, this OnClientClose function fires as expected - BUT the AjaxRequest is ALWAYS handled by main.aspx - this is presumably because the RadAjaxManager.GetCurrent(Page) method always returns the manager on the main.aspx page.

function Window_OnClientClose(oWnd, eventArgs) {  
 
            var Rebind = oWnd.get_contentFrame().contentWindow.GetRefreshValue();  
            var Argument = oWnd.get_contentFrame().contentWindow.GetArgumentValue();  
 
            if (typeof (Rebind) !== 'undefined' && Rebind != null) {  
                if (Rebind == "True") {  
                    var AjaxManager = $find("<%=RadAjaxManager.GetCurrent(Page).ClientID %>");  
                    if (AjaxManager) {  
                        AjaxManager.ajaxRequest(Argument);  
                    }  
                }  
            }  
        } 

The Rebind and Argument variables above are for dealing with the rebinding and not important to the basic functionality.  I am using code similar to this on the main.aspx page and in the child windows for dealing with the AjaxRequest:

        Public Sub Page_Load(ByVal Sender As ObjectByVal e As EventArgs) Handles MyBase.Load  
 
            Dim Manager As RadAjaxManager = RadAjaxManager.GetCurrent(Page)  
            AddHandler Manager.AjaxRequest, AddressOf AjaxManager_AjaxRequest  
 
        End Sub 

Protected Sub AjaxManager_AjaxRequest(ByVal sender As ObjectByVal e As AjaxRequestEventArgs)  
 
            Select Case e.Argument.ToString  
 
                Case "Product" 
                    ProductsGrid.Rebind()  
 
            End Select 
 
        End Sub 


If a window has a radgrid that needs to be rebound (or any other action when its child window is closed), then I need to be able to handle an AjaxRequest on this page that is generated from the main.aspx in the window, NOT on the main.aspx page.

Essentially, I need to be able to reference the RadAjaxManager in the child windows from the main page

How can I do this?

Iana Tsolova
Telerik team
 answered on 10 Feb 2010
1 answer
78 views

   When i used radwindow using javascript i phase 1 problem i.e when i take value from the radwindow to my radtextbox at that time it is not assigned but when i click on that textbox than it is assigned. why it is happened?.
Reply me

Sadhna
 
Shinu
Top achievements
Rank 2
 answered on 10 Feb 2010
1 answer
140 views
According to the documentation the OnRowSelected client event fires after the row is selected. There is a defect becuase when you call the rebind() method on the grid inside of this client side function the currently selected row (client side) is not reflected server-side.

The work around is to use the OnRowClick event instead. When calling the rebind() on the grid inside this client side function the currently selected row is properly reflected server-side.

 
        function onUserSelected(sender, eventArgs) {  
            var mTable = sender.get_masterTableView();  
            mTable.rebind(); // after this is called check the server-side needs data source event and the row currently selected client-side is not what is reflected server-side  
        }  
 
...  
 
<telerik:RadGrid ID="UsersGroupsGrid" runat="server"  OnNeedDataSource="UsersGroupsGrid_NeedDataSource">  
   <ClientSettings EnableRowHoverStyle="True">  
      <Selecting AllowRowSelect="True" /> 
      <ClientEvents OnRowSelected="onUserSelected" /> 
   </ClientSettings> 
</telerik:RadGrid> 

Thanks,
Joey
Tsvetoslav
Telerik team
 answered on 10 Feb 2010
3 answers
126 views
Hi

Should the editor ever change the content from something like this:
 "This is the name of an <actor type='test'>Actor</actor> and this is the name of <movie>Movie</movie>"

 


to this:
"This is the name of an <actor type=\"test\" />Actor and this is the name of <movie />Movie"

This is happening in my current project, however, I created a second test project and do not see that behavior exibited. 

In both projects I am setting the content with a button (the real project is in an XMLHttpPanel, the test one is just using a normal postback).  If I look at the content in both projects after the load, they are both set correctly.

I then retrieve the content using a second button (again, real one is doing a partial page postback), the test one is doing a normal postback, and if I look at the content from the real project, it changes to <actor type="\test\"/> while the test project correclty shows <actor type='test'>Actor</actor>..

I copied the radeditor from the real project to the test one, except for the toolsfile, to ensure that there wasn't something set on the editor which might be causing this. 

Any ideas?

Rumen
Telerik team
 answered on 10 Feb 2010
1 answer
86 views
Any reason why RadInputManager doesn't work with standard HTML controls?  For AJAX sites not doing postbacks, there's no reason to have server controls...which unnecessarily cause extra work for because of control IDs.
Dimo
Telerik team
 answered on 10 Feb 2010
3 answers
250 views

 


 

<

 

telerik:RadGrid ID="gvSort" runat="server" >

 

 

<

 

telerik:GridTemplateColumn HeaderText="Column" HeaderStyle-Width="180px">

 

 

<ItemTemplate>

 

 

<telerik:RadComboBox runat="Server" Width="175px" ID="ColName" CssClass="ddlClass" AutoPostBack="true" EnableViewState="true"/>

 

 

</ItemTemplate>

 

 

<HeaderStyle Width="180px"></HeaderStyle>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:RadGrid >

I have a RadCombo box inside Radgrid , i need to get that Control in CodeBehind and Populate it Programatically ,
I tried using the Radgrid.FindControl() method but it is returning Nothing ..

 

Dim Cmb As New Telerik.Web.UI.RadComboBox

 

Cmb =

CType(gvSort.FindControl("ColName"), RadComboBox)

 




Iana Tsolova
Telerik team
 answered on 10 Feb 2010
1 answer
119 views

Hi,

I use RadUpload to implement a upload files feature in my application. 
I found a strange behavior in the component.
When I try to upload an empty file, the event "ValidatingFile" is not fired and the number of select files is 0.
How can I solve this problem?

Thanks.

Best regards,
Paulo Silva

Genady Sergeev
Telerik team
 answered on 10 Feb 2010
2 answers
115 views
hi,

i have strange problem with the rendering result of the radTooltip (look at the attachment)... i believe to know the source of the problem, but i don't know why the rendering is influenced of it..

i overwritten the css styles of the radGrid:

.RadGrid_Web20 .rgRow td, .RadGrid_Web20 .rgAltRow td, .RadGrid_Web20 .rgEditRow td, .RadGrid_Web20 .rgFooter td  
    padding-bottom:1px !important; 
    padding-top:2px !important;  
 
.RadGrid_Web20 .rgRow td, .RadGrid_Web20 .rgAltRow td, .RadGrid_Web20 .rgSelectedRow td, .RadGrid_Web20 .rgActiveRow td, .RadGrid_Web20 .rgHoveredRow td, .RadGrid_Web20 .rgEditRow td  
    border-left1px solid #CFD9E7 !important; 
    border-right0px none #CFD9E7 !important; 
     
    padding-left:4px !important; 
    padding-right:4px !important; 
 
 
.RadGrid_Web20 .rgRow td, .RadGrid_Web20 .rgAltRow td, .RadGrid_Web20 .rgEditRow td, .RadGrid_Web20 .rgFooter td, .RadGrid_Web20 .rgFilterRow td, .RadGrid_Web20 .rgHeader, .RadGrid_Web20 .rgResizeCol, .RadGrid_Web20 .rgGroupHeader td  
    padding-left:3px !important; 
    padding-right:3px !important; 
 
.RadGrid_Web20 .rgRow > td:first-child, .RadGrid_Web20 .rgAltRow > td:first-child 
    border-left: 0 none !important; 

looks very noobi, but it worked all the time perfect..

so when i show the tooltip from a column of the grid, the left and right side are looking very strange..

the question is: is the rendering function of the tooltip influenced by the underlying control? in this case, the grid... if its true, i could imagine that the rendering function doesn't recognize the style change of the grid...

are there other opinions
thx and greets,
basti




Farouk
Top achievements
Rank 1
 answered on 10 Feb 2010
3 answers
90 views
Hi,
I noticed that if I type in <script> tag within the spell-checked texts, it doesn't show up in the SpellChecker Dialog. Is there any way to have it show up? I know it's bit of a silly question, but a bug has been filed about it and I have to investigate. :(

FYI, I am using this technique for spellchecking.
http://www.telerik.com/help/aspnet-ajax/spell_howtomutlipletextareas.html

Thank you!!
Kate
Lini
Telerik team
 answered on 10 Feb 2010
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?