Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
103 views
Hi
I want to get the destination zone of a dock after it's movement on client side,
I use [OnClientDragEnd(sender,arg)] event and try to use [sender.get_dockZoneID()] to get the destination zoneID but I get the source zoneID of the dock before it's drag.
How can I get the destination zoneID ?

Thank you very much for your feedback.


this is the sample code that I use :


<telerik:RadScriptBlock ID="asdaSD" runat="server">
        <script type="text/javascript">
            function drag_end(sender, eventArgs) {
                alert(sender.get_dockZoneID());
                
            }

            
        </script>
        </telerik:RadScriptBlock>
    <telerik:RadDockLayout ID="RadDockLayout1" runat="server">
    <table>
            <tr>
                <td style="vertical-align: top">
                zone 1
                    <telerik:RadDockZone ID="RadDockZone1" runat="server" Orientation="Vertical" Width="250px"
                        MinHeight="400px">
                        <telerik:RadDock ID="RadDock1" runat="server" Title="Blogs" Width="250px" EnableAnimation="true"
                            EnableRoundedCorners="true" Resizable="true" OnClientDragEnd="drag_end">
                            <ContentTemplate>
                                <asp:Label ID="Label1" runat="server" Text="dock1"></asp:Label>
                            </ContentTemplate>
                        </telerik:RadDock>
                    </telerik:RadDockZone>
                </td>
                <td style="vertical-align: top">
                zone 2
                    <telerik:RadDockZone ID="RadDockZone2" runat="server" Orientation="Vertical" Width="560px"
                        MinHeight="400px">
                        <telerik:RadDock ID="RadDock2" runat="server" Title="News" Width="250px" EnableAnimation="true"
                            EnableRoundedCorners="true" Resizable="true">
                            <ContentTemplate>
                                <asp:Label ID="Label2" runat="server" Text="dock2"></asp:Label>
                            </ContentTemplate>
                        </telerik:RadDock>
                    </telerik:RadDockZone>
                </td>
            </tr>
        </table>
    </telerik:RadDockLayout>
reza
Top achievements
Rank 1
 answered on 05 Nov 2011
3 answers
93 views
Hi there...

The controls are RadGrid, RadButton, RadPanelBar, RadTextBox, RadComboBox, RadDatePicker using the Hay and Web20 skins.

I have 3 images in RadRotator but it's show just one image.

Please note the difference between developping and published... 

The site is running on Windows Webserver 2008 R2 SP1 with IIS 7.5

I'm using the product version 2011.2.920.35

Could help me guys?   I would be very grateful!...

Thanks
Marcos Perez
Top achievements
Rank 1
 answered on 05 Nov 2011
3 answers
92 views
Hello everyone, I really need help. I'm trying to fire up the edit mode after an item is added after a click event.
Is there a way to do this ?

I've been searching and all I see is to default the edit mode on initial load.
Please help

Thanks
aj
Top achievements
Rank 1
 answered on 04 Nov 2011
5 answers
1.7K+ views
Hi All,

I have a RadGrid that you can edit and add a new record in. when I click on Edit, it show the edit form and works fine, and when I click on Add new record it also works fine because I added this code in the commandItem of the grid:
    Protected Sub rgResidentAdmin_ItemCommand(ByVal source As Object, ByVal e As Telerik.WebControls.GridCommandEventArgs) Handles rgResidentAdmin.ItemCommand  
        If (e.CommandName = RadGrid.InitInsertCommandName) Then 
            e.Canceled = True 
            Dim newValues As System.Collections.Specialized.ListDictionary = New System.Collections.Specialized.ListDictionary()  
            newValues("ResIndic") = "1" 
            e.Item.OwnerTableView.InsertItem(newValues)  
        End If 
    End Sub 
Now if I click on Add new record and without clicking on Insert or Cancle then click on edit for one of the other record, it give me this error: Conversion from type 'DBNull' to type 'Boolean' is not valid.
That is because I have a checkbox in the EditItemTemplate:
                          <radG:GridTemplateColumn DataField="ResIndic" HeaderText="Active" UniqueName="ResIndic" AllowFiltering="False">  
                                <ItemTemplate> 
                                    <asp:CheckBox ID="cbResIndic" runat="server" Enabled="false" /> 
                                </ItemTemplate> 
                                <EditItemTemplate> 
                                    <asp:CheckBox ID="ResIndicCB" runat="server" Checked='<%# Bind("ResIndic")%>' /> 
                                </EditItemTemplate> 
                          </radG:GridTemplateColumn> 
Is there a way to fix this by adding a line of code or a way around it by disabling the user to click edit when Add new record button is clicked(inserting a new record)?

Thank you in advance
Shehab
Steve Boulanger
Top achievements
Rank 1
 answered on 04 Nov 2011
4 answers
198 views
Hi,

I am trying to customize the CSS classes availalble on both the Image Properties Dialog and the Hyperlink Manager.
I've tried following the instructions here:
http://www.telerik.com/help/aspnet-ajax/editor-css-styles.html


By adding:
<CssClasses>
       
<telerik:EditorCssClass Name="Clear Class" Value="" />
       
<telerik:EditorCssClass Name="link" Value="a.link" />
       
<telerik:EditorCssClass Name="img" Value=".img" />
       
<telerik:EditorCssClass Name="redtext" Value=".redtext" />
   
</CssClasses>

But the only CSS class is the built in "Clear Class". I've tried adding via the tools file, external css file, and using the .Add Method. 
No luck with any. 
Any help would be appreciated.
Craig Tarr
Top achievements
Rank 2
 answered on 04 Nov 2011
1 answer
124 views
The new ConvertInlineStylesToAttributes property is causing trouble with the alignment tools. You can see this in the content filter demo.

Modify the filters to apply ConvertInlineStylesToAttributes. Then center the paragraph below the header. Switch to html and back to design - the centering is gone. Without the filter, it works properly.

Testedd in IE 8
Rumen
Telerik team
 answered on 04 Nov 2011
7 answers
263 views
I use one RadScriptManager as a user control with my menu. Everything has worked fine for weeks. Suddenly I am getting the following error all over the place.

Server Error in '/' Application.
--------------------------------------------------------------------------------
  
Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
  
Exception Details: System.ArgumentException: Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
  
Source Error: 
  
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  
  
Stack Trace: 
  
  
[ArgumentException: Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.]
   System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) +8627289
   System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) +72
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +35
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
  
   
  
  
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618

This is occuring ever ytime  I am updating a record across multiple RadGrids. If I put error trapping within the procedures I won't get this message. The data is being inserted and updated properly but the web app is failing afterwards. the weird part is that it runs fine on my machine but suddenly when published to another web it fails.

Is there some property that might have inadvertantly gotten changed? I haven't touched it, but it sure seems strange.
Simon
Telerik team
 answered on 04 Nov 2011
2 answers
124 views
See picture attached, I'd like to remove the "Cell Properties" button, is it possible?
jc mag
Top achievements
Rank 1
 answered on 04 Nov 2011
14 answers
857 views
Hi,

I am trying use radwindow with contenttemplate but it is showing scrollbars in popup,although it doesn't show scrollbar when I take that content in separate page & open it with radopen function  providing it's navaigation url.But I don't want use separate page for it.

Here is my code,

       
<telerik:RadWindow runat="server" ID="dlgEditPage" Modal="true" AutoSize="true" Width="506" MaxWidth="510" Top="50" Height="258" MaxHeight="260"><br>
        <ContentTemplate><br>
        <div id="EditTitle"><br>
<br>
        <div class="creat-survey-link-main" style="width:500px;"><br>
          <div><br>
            <div class="header-secondtop-line border-grey"></div><br>
            <div class="creat-survey-link-header-main" style="width:500px;"><br>
              <h3 class="creat-survey-link-green-heading float-lt" style="color:#405d0b;">Edit Page</h3><br>
              <div class="float-rt creat-survey-link-close" onclick="javascript:CloseRadWindow()" > <a href="javascript:void(0)"> <img src="../images/Close_icon.png" class="float-lt" /><br>
                <div class="float-lt" style="margin-top:2px; margin-left:2px;">Close</div><br>
                </a><br>
                <div class="clear"></div><br>
              </div><br>
              <div class="clear"></div><br>
              <div style="padding:20px 30px; background:#fff"><br>
                  <div><br>
                    <div class="title float-lt" style="padding:5px; width:80px; text-align:left;">Page Title:</div><br>
                    <div class="float-lt"><input type="text"  value="Change Your Title Here" style="width:200px;" /></div><br>
                        <div class="clear"></div><br>
                </div><br>
                <div class="marTop"><br>
                      <div class="title float-lt" style="padding:5px; width:80px; text-align:left;">Page Description:</div><br>
                    <div class="float-lt"><textarea type="text" style="width:330px;">Change Your Title Here </textarea></div><br>
                        <div class="clear"></div><br>
                </div>       <br>
                    <div class="clear"></div> <br>
            <br>
                <div style="float:left; margin:20px 0px 0px 90px;"><br>
                <div class="creat-folder-button-curve"><img src="../images/Save.png" style="padding-left:25px;" class="float-lt" width="16" /> <strong style="font-size:14px; padding:0px 10px; display:block; float:left;">Save</strong></div><br>
                             <div class="creat-folder-button-curve" onclick="javascript:CloseRadWindow()"><img src="../images/close.png" style="padding-left:20px;" class="float-lt" width="16" /> <strong style="font-size:14px; padding:0px 10px; display:block; float:left;">Cancel</strong></div><br>
              </div><br>
               <div class="clear"></div>   <br>
            </div><br>
                    <br>
                    <br>
                          </div>   <br>
          </div><br>
        </div><br>
<br>
        </div><br>
        </ContentTemplate><br>
        </telerik:RadWindow>



& it's rendered html



<div id="RadWindowWrapper_ctl00_MainContent_EditSurvey_G3_dlgEditPage" class="RadWindow RadWindow_Default rwNormalWindow rwTransparentWindow popupDialog rwNoTitleBar" style="width: 506px; height: 260px; position: absolute; visibility: visible; left: 250px; top: 516px; z-index: 3002;" unselectable="on">

& this is main content

<td class="rwWindowContent" valign="top">
<div id="ctl00_MainContent_EditSurvey_G3_dlgEditPage_C" style="overflow: auto; border: 0px none; width: 490px; height: 260px;">

as you can see there is difference in width of those divs.

I have also attached the screenshot.
Marin Bratanov
Telerik team
 answered on 04 Nov 2011
1 answer
150 views
Hi Telerik,

Got another question for you guys. I've got my own RadWindow class, and it has a design-time control on my page:

<cs:GlobalSettingsRadWindow ID="DashboardGlobalSettingsWindow" Runat="Server" >
                    <ContentTemplate>
                        <div ID="GlobalSettingsDecorationZone">
                            <fieldset id="RefreshProperties">
                                <legend>Refresh Settings</legend>
                                <div id="RefreshArea">
                                    <div id="RefreshLeftSide">
                                        Auto-Refresh Enabled:
                                        <asp:CheckBox ID="AutoRefreshCheckBox" Runat="Server" />
                                    </div>
                                    <div id="RefreshRightSide">
                                        <telerik:RadNumericTextBox ID="AutoRefreshNumericTextBox" Runat="Server" Label="Auto-Refresh Interval (Minutes):" MaxValue="60" MinValue="1" ShowSpinButtons="True" Value="1" Width="225px" Enabled="False" LabelCssClass="riLabel LabelDisabled" DataType="System.Int32">
                                            <NumberFormat DecimalDigits="0" AllowRounding="False" />
                                        </telerik:RadNumericTextBox>
                                    </div>
                                </div>
                            </fieldset>
 
                            <fieldset id="TabProperties">
                                <legend>Tab Settings</legend>
                                    <div id="TabPropertiesArea">
                                        <div id="TabLeftSide">
                                            <telerik:RadListBox ID="TabsListBox" Runat="Server" AllowDelete="True" AllowReorder="True" EnableDragAndDrop="True" Height="95px" OnClientSelectedIndexChanged="OnClientSelectedIndexChanged" Width="150px" OnClientLoad="OnClientLoad" TabIndex="1" />
                                        </div>
                                        <div id="TabRightSide">
                                            <telerik:RadTextBox ID="TabTextBox" Runat="Server" EmptyMessage="Enter tab name" Width="150px" />
                                            <div id="TabButton">
                                                <telerik:RadButton ID="TabTextApplyButton" Runat="server" Text="Add Tab" AutoPostBack="False" OnClientClicked="OnButtonClicked">
                                                </telerik:RadButton>
                                            </div>
                                        </div>  
                                    </div>
                            </fieldset>
 
                            <fieldset id="CycleProperties">
                                <legend>Tab Cycle Settings</legend>
                                <div id="CycleArea">
                                    <div id="CycleLeftSide">
                                        Auto-Cycle Enabled:
                                        <asp:CheckBox ID="AutoCycleCheckBox" runat="server" />
                                    </div>
                                    <div id="CycleRightSide">
                                        <telerik:RadNumericTextBox ID="AutoCycleNumericTextBox" Runat="server" Label="Auto-Cycle Interval (Minutes):" MaxValue="60" MinValue="1" ShowSpinButtons="True" Value="1" Width="225px" Enabled="False" LabelCssClass="riLabel LabelDisabled" DataType="System.Int32">
                                            <NumberFormat DecimalDigits="0" AllowRounding="False" />
                                        </telerik:RadNumericTextBox>
                                    </div>
                                </div>
                            </fieldset>
 
                            <div id="BottomButton">
                                <telerik:RadButton ID="ApplyGlobalSettingsButton" Runat="server" Text="Apply" AutoPostBack="False" OnClientClicked="CloseAndSave"/>
                            </div>
                        </div>
                    </ContentTemplate>
                </cs:GlobalSettingsRadWindow>

Now, I work on it's children controls in Page_Init:

private void InitializeGlobalSettings()
{
    //Global Settings Window Code.
    GlobalSettings globalSettings = StateManager.GetStates<GlobalSettings>();
 
    if (globalSettings.RefreshEnabled)
    {
        AutoRefreshCheckBox.Checked = true;
        AutoRefreshNumericTextBox.Value = globalSettings.RefreshInterval;
        AutoRefreshNumericTextBox.LabelCssClass = "LabelEnabled";
        AutoRefreshNumericTextBox.Enabled = true;
    }
 
    TabsListBox.Items.Clear();
    foreach (RadTab tab in LayoutManager.Instance.TabStrip.Tabs)
    {
        TabsListBox.Items.Add(new RadListBoxItem {Text = tab.Text, Value = tab.Value});
    }
 
    if (globalSettings.CycleEnabled)
    {
        AutoCycleCheckBox.Checked = true;
        AutoCycleNumericTextBox.Value = globalSettings.CycleInterval;
        AutoCycleNumericTextBox.LabelCssClass = "LabelEnabled";
        AutoCycleNumericTextBox.Enabled = true;
    }
}

This function is defined in MyPage.aspx.cs, not GlobalSettingsRadWindow.cs. This is necessary because I need to be able to have a handle on the CheckBoxes and various other controls.

I'd really like to fix this, though, as the controls are relevant to the RadWindow and not to the page.

Is there an easy way to do something like this without coupling the Page to the RadWindow class? Thinking along the lines of adding the controls to the RadWindow inside of its constructor, but how can I handle all of the various HTML markup which is not a System.Web.UI control?

Thanks

Sean


Marin Bratanov
Telerik team
 answered on 04 Nov 2011
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?