Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
191 views

When a RadEditor is inside a RadDock that is collapsed by default the editor control isn't drawn correctly when the dock is expanded.  We setup the editor to display in a very basic fashion (no toolbars, displaying statistics and spell check).  It appears that the code that runs to size the various parts of the control doesn't execute if the containing dock is collapsed by default and expanding the dock after that doesn't trigger a redraw.  Is there a fix or workaround I can implement to correct the behavior?

See the code below (Default.aspx and the ToolFile referenced by the Editor).  There is nothing in the code-behind.

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!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>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
        </telerik:RadScriptManager> 
        <telerik:RadDockLayout ID="RadDockLayout1" runat="server">  
            <telerik:RadDockZone ID="RadDockZone1" runat="server" Width="900px">  
                <telerik:RadDock ID="RadDock1" runat="server" Width="900px" Height="300px" DockMode="Docked" DefaultCommands="ExpandCollapse" Title="Collapsed" 
                    Collapsed="true">  
                    <ContentTemplate> 
                        <telerik:RadEditor ID="RadEditor1" runat="server" 
                            AutoResizeHeight="true" Height="55px" Width="800px"   
                            EnableResize="false" ToolbarMode="Default" EditModes="Design" 
                            ToolsFile="ToolFile.xml">  
                            <Modules> 
                                <telerik:EditorModule Name="RadEditorStatistics" Enabled="true" Visible="true" /> 
                            </Modules>                              
                        </telerik:RadEditor> 
                    </ContentTemplate> 
                </telerik:RadDock> 
                <telerik:RadDock ID="RadDock2" runat="server" Width="900px" Height="300px" DockMode="Docked" DefaultCommands="ExpandCollapse" Title="Expanded">  
                    <ContentTemplate> 
                        <telerik:RadEditor ID="RadEditor2" runat="server" 
                            AutoResizeHeight="true" Height="55px" Width="800px" 
                            EnableResize="false" ToolbarMode="Default" EditModes="Design" 
                            ToolsFile="ToolFile.xml">  
                            <Modules> 
                                <telerik:EditorModule Name="RadEditorStatistics" Enabled="true" Visible="true" /> 
                            </Modules> 
                        </telerik:RadEditor> 
                    </ContentTemplate> 
                </telerik:RadDock>                  
            </telerik:RadDockZone> 
        </telerik:RadDockLayout> 
    </div> 
    </form> 
</body> 
</html> 

 

<root> 
    <tools name="SpellCheck" enabled="true" DockingZone="Right">  
        <tool name="AjaxSpellCheck" /> 
    </tools> 
</root> 

 

Yeroon
Top achievements
Rank 2
 answered on 08 Nov 2011
1 answer
165 views
I am using CustomProvider to show files from a shared network drive in a web application.

when user 'Open' a file from the FileExplorer, modify the file and hit 'save' they will expect to save the file back to the Server directly( Ignoring the file was actually stored in internet temporary folder).

does anybody have solution or suggestion on it?

Thanks


Dobromir
Telerik team
 answered on 08 Nov 2011
1 answer
88 views
hi
AsyncUpload not well formed in opera when document is Right-to-left
please fix it!
http://demos.telerik.com/aspnet-ajax/asyncupload/examples/rtl/defaultcs.aspx
thanx
Kate
Telerik team
 answered on 08 Nov 2011
1 answer
80 views
Hi,

Does anybody have experience with the ASP.NET AJAX  components on CEHTML (Consumer Electronics HTML).
We have some inquiries regarding Smart TV apps and of course :-) we want to use Telerik.

please let me know.

BR Marc

Sebastian
Telerik team
 answered on 08 Nov 2011
4 answers
597 views
I am simply calling radConfirm which opens up the default "OK" and "Cancel" buttons. However the "Cancel" button does not have focus.
   Is there a property or client side code that can set focus on "Cancel" button
Marin Bratanov
Telerik team
 answered on 08 Nov 2011
3 answers
879 views
I am trying to figure out how to set Checked values in a databound Combobox, using the Q2-2011 version of the control - as seen in this demo:
http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/checkboxes/defaultvb.aspx

the code below does not seem to be setting the checked values correctly, specifically this line: 

UDFControl.FindItemByValue(tItem).Checked = 
True

The scenario - I am inserting RadComboBoxes into a Placeholder in a Repeater on ItemCreated.  This all works great, I get the comboboxes, the data shows up in the drop down, and I have the Checkboxes, can multi-select, etc.  I just can't seem to set the initial values with the .checked = true

col1.DataType = GetType(String)
col2.DataType = GetType(String)
tData.Columns.Add(col1)
tData.Columns.Add(col2)
 
Dim tCodes As String() = UDF_Data.Rows(currentIndex)("Codes").ToString.Split(uSVM)
Dim tDescriptions As String() = UDF_Data.Rows(currentIndex)("Descriptions").ToString.Split(uSVM)
 
For i = 0 To tCodes.Count - 1
    Dim row As DataRow = tData.NewRow
    row(col1) = tCodes(i)
    row(col2) = tDescriptions(i)
    tData.Rows.Add(row)
Next
 
Dim UDFControl As New Telerik.Web.UI.RadComboBox
UDFControl.ID = UDF_Data.Rows(currentIndex)("ID").ToString.Replace("*", "_")
e.Item.FindControl("UDF").Controls.Add(UDFControl)
UDFControl.DataSource = tData
UDFControl.DataTextField = "Desc"
UDFControl.DataValueField = "ID"
UDFControl.DataBind()
UDFControl.Width = "204"
 
UDFControl.CheckBoxes = True
UDFControl.EnableCheckAllItemsCheckBox = True
UDFControl.EmptyMessage = "Select One or More Values"
Dim tValues As String() = UDF_Data.Rows(currentIndex)("Value").ToString.Split(uSVM)
For Each tItem As String In tValues
    If UDFControl.FindItemByValue(tItem) IsNot Nothing Then
        UDFControl.FindItemByValue(tItem).Checked = True
    End If
Next

Any ideas?

I understand this is a new feature of the Combobox and can't seem to find any examples of how this should be done.
Jayesh Goyani
Top achievements
Rank 2
 answered on 08 Nov 2011
2 answers
166 views
Hello, Telerik Team,

I have a question about hierarchical RadGrids. I have a hierarchical RadGrid, called RadGrid1. Inside RadGrid1.MasterTableView.NestedViewTemplate I have another grid, RadGrid2. Both of the RadGrids are created from code behind. I've defined this relation:

RadGrid1.MasterTableView.NestedViewSettings.ParentTableRelation.Add(New Telerik.Web.UI.GridRelationFields() With {.DetailKeyField = "ID", .MasterKeyField = "ID"})

My question is: How can I get the ID of the parent table in RadGrid2.NeedDatasource event?

Thank you in advance,
Lajos Arpad.
Lajos
Top achievements
Rank 1
 answered on 08 Nov 2011
3 answers
135 views
Rad grid horizontal scroll bar does not move on clicking on the empty area on either right or left side.
Pavlina
Telerik team
 answered on 08 Nov 2011
2 answers
588 views
Hi there,

On an ajaxified button press, I'm adding dynamically-created RadButtons to an asp:Panel control contained within a RadAjaxPanel on a ASP.Net page using a Master Page but no RadAjaxManager.

foreach (CrmSAWorkflowButton wfb in workflowButtons)
{
    RadButton rb = new RadButton();
    rb.ID = "uxWfb" + wfb.UniqueName;
    rb.CausesValidation = false;
    rb.CssClass = "smallSpaceRightAndBelow";
    rb.CommandArgument = wfb.ID.ToStringGuid();
    rb.Text = wfb.Title;
    rb.Click += new EventHandler(rb_Click);
    uxWorkflowButtonsP.Controls.Add(rb);
}

However, when I click the dynamically-created buttons, the server-side postback event does not fire, which I kinda need.

I have tried "ajaxifying" the asp:Panel by adding a RadAjaxManager and adding a new AjaxSetting for the dynamically-created button which updates the asp:Panel, but to no avail: I click the button once, no server-side event and the button stays on the page. I click it again, still no server-side event, the button disappears from the page.

I've also tried using the AjaxRequest method on the AjaxPanel via OnClientClicked on the dynamically-created button, but that (oddly) blows away some underlying data so that's no good.

Any thoughts?
Mike
Top achievements
Rank 1
 answered on 08 Nov 2011
3 answers
280 views

When using both OnUpdateCommand and ClientEvents OnCommand ,  Hierarchy expand and collapse is broken. It will only expand and collapse the first item no matter what row you try to expand. When I remove the <ClientEvents OnCommand="RaiseCommand" /> everything starts working again.

I need to use both because one does the update and the other refreshes the changes in another area.


<
telerik:RadGrid ID="RadGrid1" runat="server" OnPreRender="RadGrid1_PreRender" AutoGenerateEditColumn="True" DataSourceID="SqlDataSourceMain" GridLines="None" OnUpdateCommand="UpdateCommand" Skin="Web20">

 

 

 

<ClientSettings>
<ClientEvents OnCommand="RaiseCommand" />
</ClientSettings>

Any ideas on how I can get this to work?

FULL CODE --------------

 

 

<

 

telerik:RadGrid ID="RadGrid1" runat="server" OnPreRender="RadGrid1_PreRender" AutoGenerateEditColumn="True"

 

 

 

 

 

 

 

 

DataSourceID="SqlDataSourceMain" GridLines="None" OnUpdateCommand="UpdateCommand" Skin="Web20">

 

 

 

 

 

 

 

 

<ClientSettings>

 

 

 

 

 

 

 

 

<ClientEvents OnCommand="RaiseCommand" />

 

 

 

 

 

 

 

 

</ClientSettings>

 

 

 

 

 

 

 

 

 

<MasterTableView AutoGenerateColumns="False" DataKeyNames="Pageid" DataSourceID="SqlDataSourceMain"

 

 

 

 

 

 

 

 

EditMode="InPlace">

 

 

 

 

 

 

 

 

<DetailTables>

 

 

 

 

 

 

 

 

<telerik:GridTableView runat="server" AllowAutomaticUpdates="True" AutoGenerateColumns="False"

 

 

 

 

 

 

 

 

BorderColor="#99CCFF" DataKeyNames="Pageid" DataSourceID="SqlDataSourceSub" EditMode="InPlace"

 

 

 

 

 

 

 

 

GridLines="Both" ShowHeader="False" Name="SubMenus">

 

 

 

 

 

 

 

 

<ParentTableRelation>

 

 

 

 

 

 

 

 

<telerik:GridRelationFields DetailKeyField="Pageid" MasterKeyField="Pageid" />

 

 

 

 

 

 

 

 

</ParentTableRelation>

 

 

 

 

 

 

 

 

<RowIndicatorColumn>

 

 

 

 

 

 

 

 

<HeaderStyle Width="20px" />

 

 

 

 

 

 

 

 

</RowIndicatorColumn>

 

 

 

 

 

 

 

 

<NoRecordsTemplate>

 

 

 

 

 

 

 

 

</NoRecordsTemplate>

 

 

 

 

 

 

 

 

<ExpandCollapseColumn>

 

 

 

 

 

 

 

 

<HeaderStyle Width="20px" />

 

 

 

 

 

 

 

 

</ExpandCollapseColumn>

 

 

 

 

 

 

 

 

<Columns>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="ID" HeaderText="ID" UniqueName="ID" Visible="False">

 

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="HitCount" HeaderText="Hit Count" ReadOnly="True"

 

 

 

 

 

 

 

 

UniqueName="HitCount">

 

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridTemplateColumn HeaderText="Link" UniqueName="DirectLink">

 

 

 

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

 

 

 

<a href="javascript:directlink('<%# Eval("id") %>', '<%# Eval("mediaType") %>')">

 

 

 

 

 

 

 

 

<img src="./globalgraphics/Link.gif" alt="Direct Link" border="0" /></a>

 

 

 

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="Pageid" HeaderText="Pageid" UniqueName="Pageid"

 

 

 

 

 

 

 

 

Visible="False">

 

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="Title" HeaderText="Title" UniqueName="Title">

 

 

 

 

 

 

 

 

<HeaderStyle Width="220px" />

 

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="mediaType" HeaderText="mediaType" UniqueName="mediaType"

 

 

 

 

 

 

 

 

Visible="False">

 

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridCheckBoxColumn UniqueName="MapStatus" HeaderText="MapStatus" DataField="MapStatus">

 

 

 

 

 

 

 

 

</telerik:GridCheckBoxColumn>

 

 

 

 

 

 

 

 

</Columns>

 

 

 

 

 

 

 

 

<AlternatingItemStyle BackColor="#D0DAF3" Font-Bold="False" Font-Italic="False" Font-Overline="False"

 

 

 

 

 

 

 

 

Font-Strikeout="False" Font-Underline="False" Wrap="True" />

 

 

 

 

 

 

 

 

<EditItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"

 

 

 

 

 

 

 

 

Font-Underline="False" Wrap="False" />

 

 

 

 

 

 

 

 

</telerik:GridTableView>

 

 

 

 

 

 

 

 

</DetailTables>

 

 

 

 

 

 

 

 

<RowIndicatorColumn>

 

 

 

 

 

 

 

 

<HeaderStyle Width="20px" />

 

 

 

 

 

 

 

 

</RowIndicatorColumn>

 

 

 

 

 

 

 

 

<ExpandCollapseColumn Visible="True">

 

 

 

 

 

 

 

 

<HeaderStyle Width="20px" />

 

 

 

 

 

 

 

 

</ExpandCollapseColumn>

 

 

 

 

 

 

 

 

<Columns>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="id" DataType="System.Int32" HeaderText="id" ReadOnly="True"

 

 

 

 

 

 

 

 

SortExpression="id" UniqueName="id" Visible="False">

 

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="ClickCount" HeaderText="Counter" ReadOnly="True"

 

 

 

 

 

 

 

 

UniqueName="ClickCount">

 

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="DestinationId" HeaderText="DestinationId" SortExpression="DestinationId"

 

 

 

 

 

 

 

 

UniqueName="DestinationId" Visible="False">

 

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="Title" HeaderText="Title" SortExpression="Title"

 

 

 

 

 

 

 

 

UniqueName="Title">

 

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="Pageid" HeaderText="Pageid" SortExpression="Pageid"

 

 

 

 

 

 

 

 

UniqueName="Pageid" Visible="False">

 

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="PageOrder" DataType="System.Int32" HeaderText="PageOrder"

 

 

 

 

 

 

 

 

SortExpression="PageOrder" UniqueName="PageOrder">

 

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridCheckBoxColumn UniqueName="MapStatus" HeaderText="Map On/Off" DataField="MapStatus">

 

 

 

 

 

 

 

 

</telerik:GridCheckBoxColumn>

 

 

 

 

 

 

 

 

</Columns>

 

 

 

 

 

 

 

 

</MasterTableView>

 

 

 

 

 

 

 

 

<FilterMenu EnableTheming="True" Skin="Web20">

 

 

 

 

 

 

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

 

 

 

 

 

 

</FilterMenu>

 

 

 

 

 

 

 

 

</telerik:RadGrid>

 

 

 

 

 

 

Vasil
Telerik team
 answered on 08 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?