Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
307 views
Hi,

I have a set of links in one of the usercontrol. The same usercontrol contains two RadWindows. I am binding another usercontrol within the ContentTemplate section of RadWindow. When the user clicks on the link a radwindow should be opened. When the user clicks on the button that present in the radwindow, i need to perform some process and close the radwindow. Then show the second radwindow with a success message. I am unable to close the first radwindow from usercontrol button click event. How to achieve this?

Thanks in advance.
UserControl 1
<script type="text/javascript">
function closeAndOpen() {
        $find("<%= modalWindow.ClientID %>").close();
        $find("<%= confirmationWindow.ClientID %>").show()
    }
</script>
<div class="links">
                <asp:LinkButton ID="changeProfile" runat="server" meta:resourcekey="changeUsername"
                    CssClass="fontUnderline linkFont noLink" CausesValidation="False" OnClick="changeProfile_Click"></asp:LinkButton>
            </div>
  
<telerik:RadWindowManager ID="radWindowManager" runat="server" DestroyOnClose="false"
        EnableShadow="true" ShowContentDuringLoad="false" VisibleStatusbar="false" ReloadOnShow="true"
        Opacity="100">
        <Windows>
            <telerik:RadWindow ID="modalWindow" runat="server" Visible="false" VisibleOnPageLoad="true" VisibleStatusbar="false" Behaviors="None">
                <ContentTemplate>
                    <uc:Profile ID="changeProfileControl" runat="server" Visible="false" />                    
                </ContentTemplate>
            </telerik:RadWindow>
            <telerik:RadWindow ID="confirmationWindow" runat="server" Visible="false" VisibleOnPageLoad="true" VisibleStatusbar="false" Behaviors="None">
                <ContentTemplate>
                    <uc:successmessage ID="confirmation" runat="server" />
                </ContentTemplate>
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
  
UserControl 2:
  
In my button click event I am registering the script
  
Protected Button_Click()
{
  
//Do some process
  
ScriptManager.RegisterStartupScript(this, this.GetType(), "Testing Script", "closeAndOpen();", true);
  
}
rdmptn
Top achievements
Rank 1
 answered on 07 Mar 2013
1 answer
116 views
Hello.

I have a tree with n columns. n-1 columns have fix size and one column does not have fix size ("Name"). On a high resolution, the tree appears ok, the "Name" columns fills all the remaining space. When the resolution is small, the column "Name" is completely hidden. I would like to have the posibility of setting MinWidth to the "Name" column.

What can I do?
Thank you.
Galin
Telerik team
 answered on 07 Mar 2013
6 answers
274 views
I would like to insert one row at the top of a spreadsheet when using RadGrid1_BiffExporting, and possibly turn on filtering on the actual header column now in row 2.

How do I go about this as I cannot find any documentation on this?

I tried the following but it does not seem to do anything as I cannot find an add or insert method.

using eis = Telerik.Web.UI.ExportInfrastructure;
   
protected void RadGrid1_BiffExporting ( object sender, GridBiffExportingEventArgs e )
{
  eis.Table tbl = e.ExportStructure.Tables [ 0 ];
    
  eis.Row row = new eis.Row ( tbl );
    
  eis.Cell newCell = row.Cells [ 1, 1 ];
  
  newCell.Value = "Default text used in this cell.";
  newCell.Colspan = tbl.Columns.Count - 1;
  newCell.Style.Font.Bold = true;
  newCell.Style.Font.Size = 15;
    
  ... there is no Add()/Insert(...) method that I can find.
}

thanks in advance.
Alex
Top achievements
Rank 1
 answered on 07 Mar 2013
2 answers
289 views
Hi there

Does anyone know how I can resize the image proportionally to whatever image is in the editor at the time and then save it?

To Clarify:
What I would like to be able to do is:
When the user clicks my save button (outside the image editor) whatever image is in the editor would be automatically resized proportionally to whatever image is in the editor (just in case it has been cropped or rotated or whatever) to width and/or height that I would specify and then saved with the new dimensions. i.e. if I specify width of 200, the height would be worked out proportionally so that the image would retain the same aspect ratio as it had at the time of saving and save with a width of 200 and a height of ?
All of this, server side (VB)

I am able to save edited images with my save button, but don't know how to do the resizing bit.
Resizing must be proportional so that the image isn't distorted in any way because of my new dimensions

Any help gratefully received :-)
Sauge
Top achievements
Rank 1
 answered on 07 Mar 2013
1 answer
98 views

I am running into an issue with Y-axis scales in combination chart .I have 2 measures as 2 series items represented on Y axis with data ranging from 2 to 3 and x-axis has months, left the measures box field empty. The y-axis scale after the report is run is giving multiple values like 0,0,1,1,2,2,3,3..so on instead of 0,1,2,3,4.. I have tried changing the scale interval number under the properties but it's causing the data skewed

Petar Kirov
Telerik team
 answered on 07 Mar 2013
4 answers
343 views
I have tried to create a Horizontal Rule <hr /> separator and it outputs the text <hr /> or <hr>  instead of a  HR line  -------------------

RadComboBoxItem seperator = new RadComboBoxItem("<hr />", "<hr />") { IsSeparator = true };


I figure this has to do with encoding and etc.. Suggestions on how to do this?

Wired_Nerve
Top achievements
Rank 2
 answered on 07 Mar 2013
7 answers
234 views
http://www.telerik.com/registration-

i'm using telerik gridview like here http://demos.telerik.com/aspnet-ajax/grid/examples/overview/defaultcs.aspx but in that demo when filter data it shows a loding with blue background in my case it reloads my page everytime i filter it, maybe because i'm getting the data from different tables into the rad gridview?

i have enabled ajax so why it reloads? is there a way to not refresh the page like that

by the way how to activate pdf export?
choose default id panel is empty , why? i'm using metro skin

also how can i edit some fields only when we are at edit template i dont see the textboxes in designtime...

also filter options are not getting translates nor filter when we set culture why?

Eyup
Telerik team
 answered on 07 Mar 2013
5 answers
106 views
Hello Telerik team,

After we enter text in a RadTextbox, pressing the Enter key is triggering click event of Submit button. In order to avoid this, we included below dummy button logic within the aspx page:

<form id="frm" runat="server" defaultbutton="btnIgnore">
<asp:Button ID="btnIgnore" runat="server" Style="Position:Absolute; Top:-200px" Text="Ignore" Width="90px" EnableViewState="False" OnClientClick="javascript:return false;" />

This change resolved Enter key issue but the side effect has been with AJAX repost like radio button or dropdown click taking the display to the top of the page.

Could you please let us know if you have a workaround for resolving this issue i.e., to keep the display at the same place instead of moving to the top?


Regards,
Sameer
Eyup
Telerik team
 answered on 07 Mar 2013
7 answers
361 views
Hi,

I'm posting this under grid, but it probably applies to other controls as well.

I'm working on a routine which changes labels on ASP.Net pages to configure terminology for various customers. In order to do this I iterate through all controls on screen recursively and change the label text if needed.

I was wondering is it possible to do the same with the elements of a RadGrid such as the header text?

The core of the replacement routine at present is:

Public Sub ReplaceText(ByRef myControls As ControlCollection)
        Dim ReplacementText As String = HttpContext.Current.Session("ReplacementText")
        If String.IsNullOrEmpty(ReplacementText) Then Exit Sub
        Dim ReplacementTextUpper As String = ReplacementText.ToUpper
        For Each myControl As Control In myControls
            If TypeOf myControl Is Label Then
                Dim lbl As Label = CType(myControl, Label)
                Dim labelText As String = String.Format("[{0}", lbl.Text.Trim.ToUpper)
                Dim textPosition As Integer = InStr(ReplacementTextUpper, labelText)
                If labelText <> "[" And textPosition > 0 Then
                    'Parse ReplacementText for = and > sign and get string between
                    Dim Pos1 = ReplacementText.IndexOf("=", textPosition)
                    Dim Pos2 = ReplacementText.IndexOf("]", Pos1)
                    Dim ReplaceWith As String = ReplacementText.Substring(Pos1 + 1, (Pos2 - Pos1) - 1)
                    lbl.Text = ReplaceWith
                End If
            End If
            If myControl.HasControls Then
                ReplaceText(myControl.Controls)
            End If
        Next
    End Sub

I have tried accessing a RadGrid as a control, but it is defined as a Telerik.Web.UI control. Would that mean I need another routine that passes the Rad Controls for parsing? Is what I am trying to do even possible?

David Penny
Kostadin
Telerik team
 answered on 07 Mar 2013
9 answers
132 views
Hi Team,

Here is my Design. I Have a RadDockZone inside a Layout and 4 docks placed inside RadDockZone oriented horizontal and width=100% ,So the Zone occupies whole width of screen.Each RadDock is 25% width so 4 docks perfectly fit in.

Problem goes here ,
On Page Load it looks perfectly fine 4 docks together in one Row of Zone. If i try to move one of the Dock then one of the Dock goes to Next row of Zone which i want to restrict. Can you please help me Resolving this ?

Thanks,
Mady
Slav
Telerik team
 answered on 07 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?