Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
79 views
Hi,
im having two page views. When the page loads for the first time, im able to set the focus on the first control, which is an normal text box. when im clicking an button, im loading the second page view. In this page view i need to set focus on the rad date picker.
I cannot set the focus on this control. Can anyone help me on this.

Pavlina
Telerik team
 answered on 09 Mar 2009
1 answer
135 views
To whom it may concern:

I have downloaded a trial version of RadControls for ASPNET AJAX Q1 2009 and come acoss of the following issues, just wantt o confirm whether it is related to the trial:

1. "Error: Sys.WebForms.PageRequestManagerParserErrorException: The

message received from the server could not be parsed. Common

causes for this error are when the response is modified by calls to

Response.Write(), response filters, HttpModules, or server trace is

enabled."

 

2. Cannot load a user control with embedded RadGrid in the content page:

"Control 'ctl00_ctl01_RadGridRolesPanel' of type 'OurUpdatePanel' must be placed inside a form tag with runat=server."

The code is as below:

 

UserControl ctrl = this.LoadControl("~/User Controls/Roles.ascx") as UserControl;

this.Page.Controls.Add(ctrl);

3. If I move the javascript from the master page to the .js file:

function InitiateAsyncRequestComboBox(sender, eventArgs) {

var ajaxPanel = $find("<%= RadAjaxPanel1.ClientID %>");

ajaxPanel.ajaxRequest("SelectedApplication:" + eventArgs.get_item().get_text());

}

function InitiateAsyncRequestPanelBar(sender, eventArgs) {

var ajaxPanel = $find("<%= RadAjaxPanel1.ClientID %>");

ajaxPanel.ajaxRequest("ClickedItem:" + eventArgs.get_item().get_text());

}

the above ajaxPanel returns null. However, leaving it into the site.master file is not debugable.

Cheers

William

 

Pavlina
Telerik team
 answered on 09 Mar 2009
2 answers
98 views
I just noticed that when I place the RadGrid in Edit or Insert mode and the MasterEditTemplate shows the grid has paged down to the last page.  Can this be prevented?
Reid
Top achievements
Rank 2
 answered on 09 Mar 2009
3 answers
122 views
Hello Admin,

Well I am a newbie so it might possible that I might be unable to search what i needed..

Actually I needed a feature or want help in revealing feature. with RAD Edit

I want to read external html file in rad edit and want to save data in same file when a button click event fired....

sorry for poor english

code below i tried
using System.Text; 
using System.IO; 
 
 
public partial class wm_editor : System.Web.UI.Page 
     
    string qs = ""
    string filepath = ""
    protected void Page_Load(object sender, EventArgs e) 
    { 
        qs = Request.QueryString["e"]; 
        if (qs == "cdtls"
        { 
            string add = "contactus.htm"
            filepath = Server.MapPath(add); 
            RadEditor1.Content = ReadFile(filepath); 
            // edit contact details 
        } 
    } 
public string ReadFile(string path) 
    { 
        if (System.IO.File.Exists(path)) 
        { 
            System.IO.StreamReader sr = new System.IO.StreamReader(path); 
            return sr.ReadToEnd(); 
        } 
        else 
        { 
            return string.Empty; 
        } 
    } 
protected void btnupd_Click(object sender, EventArgs e) 
    { 
        System.IO.StreamWriter externalfile = new System.IO.StreamWriter(filepath, false, Encoding.UTF8); 
        externalfile.Write(RadEditor1.Content);       
    } 

but does not getting any result

Please Help me out
Rumen
Telerik team
 answered on 09 Mar 2009
1 answer
75 views
When I call via server side RadEditor which is inside a standard update I get an error in Firefox 3.0 as below. Does it need to be inside a RadUpdatePanel?

 Reditor.Controls.Add(r);
[Exception... "Component returned failure code: 0x80004002 (NS_NOINTERFACE) [nsISupports.QueryInterface]" nsresult: "0x80004002 (NS_NOINTERFACE)" location: "JS frame :: chrome://snipit/content/snipitOverlay.js :: anonymous :: line 150" data: no]
this._upperAbbrMonths = this...s.dateTimeFormat.AbbreviatedMonthNames);

This the server side code:
        protected void btEditor_Click(object sender, EventArgs e)
        {
            Telerik.Web.UI.RadEditor r = new Telerik.Web.UI.RadEditor();
            r.Width = 740;
            r.Height = 600;
            r.ID = "RadEditor1";
            
            Reditor.Controls.Add(r);
}
Rumen
Telerik team
 answered on 09 Mar 2009
1 answer
75 views
Hi,
  Currently I am working with self referential grid, I want to get first level of nodes once and when user clicks expand button, I want to get the second level of nodes from DB. To acheive this I want to set flag GridDataItem.CanExpand to true (since all the nodes may not be expandable).Unfortunately It says that the property "canexpand" is read only.

This is the blocker for my requirement.

Additionally I should be able to change the rows in detail tables and, in fact detail tables insertion and removal based on some external link clicks.

Please do let me know if following are possible.
Insert and Delete detail tables of self referential grid based on some external link clicks.
Instead of getting all levels of self-referential grid at time, if I can get only top most nodes and work on getting rest of nodes based on the expansion of grid rows(HierarchyLoadMode="serverOnDemand").

Any help would on this would really be a great favour.
Georgi Krustev
Telerik team
 answered on 09 Mar 2009
1 answer
96 views
In Rad Editor 2008.3.1314.35.
 

It appears that Icon Possitions in the Editor style sheet  for the Save and Cancel Buttons are incorrect.  

The Save button is rendering as a tiny arrow and the Cancel Button is rendering as a Envelope with a Lock over it.  
..\RadControls for ASPNET AJAX Q3 2008\Skins\editor.css
Contains


.Cancel

{

background-position: -1687px center;

}


.FileSave,

.FileSaveAs,

.Save,

.SaveLocal

{

background-position: -1407px center;

}


These position appear to be the Icon locations in the previous version of the Style Sheet. 

How should I edit the editor.css to reflect the correct locations? 
Rumen
Telerik team
 answered on 09 Mar 2009
1 answer
122 views
I've tried placing radMenu items inside a rotator (as described here: http://blogs.telerik.com/KevinBabcock/Posts/09-02-28/RadRotator_and_RadMenu_for_ASP_NET_AJAX_Building_an_Interactive_Menu_Together.aspx) and have found that if the menu has a dropdown - it gets cutoff at the edge of the rotator.

I've tried setting the z-index, changing the CSS overflow settings - but nothing seems to work.  Any way around this?
Fiko
Telerik team
 answered on 09 Mar 2009
1 answer
195 views
I want to freeze first few cloumns while horizontal scrolling in radgrid
Daniel
Telerik team
 answered on 09 Mar 2009
1 answer
194 views
I am working with a load on demand version within a tabbed view and within a splitter. I create my first node with the idea that when you click on the plus sign you can expand to the next node, but my plus signs do not show up in this example. It seems that the ExpandMode="ServerSideCallBack" is not working at all. I am finding simple formats are working but even the imageurl I have passed is not showing either. Thoughts on what I might be doing wrong or am missing?

See code here:

 

<%@ Control Language="VB" AutoEventWireup="false" CodeFile="TabTwoVB.ascx.vb" Inherits="Admin_TabTwoVB" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<link href="../smart.css" rel="stylesheet" type="text/css" />
<table cellspacing="0" cellpadding="15" width="100%" border="1">
    </tr>
    <tr>
        <td  style="background-color: #f3f3f3">
            <telerik:RadSplitter ID="RadSplitter1" runat="server" Height="700" Width="820">
                <telerik:RadPane ID="LibraryPane" BackColor="#f3f3f3" BorderColor="#f3f3f3" runat="server" Width="60%"><br /><br />
                    <telerik:RadTreeView ID="RadTreeViewEP" runat="server" Skin="Outlook" AllowNodeEditing="True"
                        OnContextMenuItemClick="RadTreeViewEP_ContextMenuItemClick" OnClientContextMenuItemClicked="onClientContextMenuItemClicked"
                        OnClientContextMenuShowing="onClientContextMenuShowing"
                        OnNodeEdit="RadTreeViewEP_NodeEdit"
                        Font-Bold="True" Font-Names="Arial" Font-Size="10pt" ForeColor="#732928"
                        DataSourceID="SqlDataSource1" DataTextField="blkbkName"
                        DataValueField="blkbkID">
                        <Nodes>
                            <telerik:RadTreeNode runat="server" Expanded="False"
                                ExpandMode="ServerSideCallBack"
                                Font-Bold="True" Font-Names="Arial" Font-Size="10pt" ForeColor="#732928"
                                Height="22px">
                                <Nodes>
                                    <telerik:RadTreeNode runat="server" Font-Names="Arial" Font-Size="10pt"
                                        ForeColor="#732928" Height="22px" ImageUrl="~/Images/booksx.gif" ExpandMode="ServerSideCallBack">
                                        <Nodes>
                                            <telerik:RadTreeNode runat="server" Font-Names="Arial" Font-Size="9pt"
                                                ForeColor="#732928" Height="22px" ImageUrl="~/Images/books2x.gif">
                                            </telerik:RadTreeNode>
                                        </Nodes>
                                    </telerik:RadTreeNode>
                                </Nodes>
                            </telerik:RadTreeNode>
                        </Nodes>
                    </telerik:RadTreeView>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
                        ConnectionString="<%$ ConnectionStrings:SMARTConnectionString %>"
                        SelectCommand="INDSearchV5" SelectCommandType="StoredProcedure">
                        <SelectParameters>
                            <asp:SessionParameter DefaultValue="1" Name="SID" SessionField="CTECAdmin"
                                Type="String" />
                            <asp:SessionParameter DefaultValue="1" Name="NH" SessionField="NewHorizons"
                                Type="String" />
                            <asp:ControlParameter ControlID="ViewBy" DefaultValue="0" Name="TY"
                                PropertyName="SelectedValue" Type="Byte" />
                            <asp:ControlParameter ControlID="ViewBy" DefaultValue="0" Name="BR"
                                PropertyName="SelectedValue" Type="Byte" />
                            <asp:ControlParameter ControlID="txtContent" DefaultValue="0" Name="SrchX"
                                PropertyName="Text" Type="String" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                </telerik:RadPane>
                <telerik:RadSplitBar ID="RadSplitbar1" runat="server" CollapseMode="Forward"></telerik:RadSplitBar>
                <telerik:RadPane ID="DetailPane" runat="server" Scrolling="y" Height="30%">
                    <telerik:RadSplitter ID="RadSplitter2" runat="server" Orientation="Horizontal">
                        <telerik:RadPane ID="FilterPane" BackColor="#f3f3f3" runat="server">
                            <br />
                            <table>
                                <tr>
                                    <td align="left" colspan="2"><br /><br />
                                        &nbsp;<font face="Arial, Helvetica, sans-serif" color="#732928" size="2">View By:</font></td>
                                </tr>
                                <tr>
                                    <td align="left" colspan="2">
                                        <asp:RadioButtonList AutoPostBack="True" runat="server" ID="ViewBy"
                                            Font-Size="10pt" Font-Names="Arial" ForeColor="#732928"
                                            DataSourceID="SqlDataSource2" DataTextField="blkbkName"
                                            DataValueField="blkbkView">
                                            <asp:ListItem Selected="True" Value="0"></asp:ListItem>
                                        </asp:RadioButtonList>
                                        <asp:SqlDataSource ID="SqlDataSource2" runat="server"
                                            ConnectionString="<%$ ConnectionStrings:SMARTConnectionString %>"
                                            SelectCommand="INDRoles" SelectCommandType="StoredProcedure">
                                            <SelectParameters>
                                                <asp:SessionParameter DefaultValue="1" Name="SID" SessionField="ctecadmin"
                                                    Type="String" />
                                            </SelectParameters>
                                        </asp:SqlDataSource>
                                    </td>
                                </tr>
                           </table>
                       </telerik:RadPane>
                        <telerik:RadSplitBar ID="RadSplitbar2" runat="server" CollapseMode="Forward"></telerik:RadSplitBar>
                        <telerik:RadPane ID="ContentPane" BackColor="#f3f3f3" runat="server" Scrolling="Both" Height="70%">
                            <br />&nbsp;&nbsp;<font face="Arial, Helvetica, sans-serif" color="#732928" size="2">Hover Over Content</font>
                            &nbsp;&nbsp;&nbsp;<asp:textbox ID="txtContent2" runat="server" BorderColor="AliceBlue" Height="90%" Width="90%" Text="n.a." ></asp:textbox>
                        </telerik:RadPane>
                    </telerik:RadSplitter>
                </telerik:RadPane>
            </telerik:RadSplitter>
        </td>
    </tr>
</table>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
    DefaultLoadingPanelID="RadAjaxLoadingPanel1">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="ViewBy">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadTreeViewEP" />
                <telerik:AjaxUpdatedControl ControlID="ViewBy" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server"
    height="75px" width="75px" HorizontalAlign="Center">
    <img alt="Loading..."
        src='../images/loading.gif'
        style="border:0px;" />
</telerik:RadAjaxLoadingPanel>

 

Imports System
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Data
Imports System.Data.SqlClient
Imports Telerik.Web.UI
Imports Microsoft.VisualBasic

Partial Class Admin_TabTwoVB
  Inherits System.Web.UI.UserControl

  Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load, Me.Load
    'Put user code to initialize the page here

    If Not Page.IsPostBack Then
      Session("CtecAdmin") = 1
      Session("NewHorizons") = 1
    End If
  End Sub

  Protected Sub RadTreeViewEP_ContextMenuItemClick(ByVal sender As Object, ByVal e As RadTreeViewContextMenuEventArgs)
    Select Case e.MenuItem.Value
      Case "Copy"
        e.Node.InsertAfter(CloneNode(e.Node, String.Format("Copy of {0}", e.Node.Text)))
      Case "NewFolder"
        Dim newNodeTitle As String = String.Format("New Folder", e.Node.ParentNode.Nodes.Count + 1)
        e.Node.Nodes.Add(New RadTreeNode(newNodeTitle))
        e.Node.Expanded = True
    End Select
  End Sub

  Private Function CloneNode(ByVal original As RadTreeNode, ByVal text As String) As RadTreeNode
    Dim cloned As RadTreeNode = New RadTreeNode()
    cloned.Text = text
    cloned.Font.Bold = original.Font.Bold
    cloned.Font.Italic = original.Font.Italic
    cloned.ImageUrl = original.ImageUrl

    For Each node As RadTreeNode In original.Nodes
      cloned.Nodes.Add(CloneNode(node, original.Text))
    Next
    Return cloned
  End Function

  Protected Sub RadTreeViewEP_NodeEdit(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEditEventArgs) Handles RadTreeViewEP.NodeEdit
    Dim nodeEdited As RadTreeNode = e.Node
    Dim newText As String = e.Text

    nodeEdited.Text = newText
  End Sub

  Protected Sub RadTreeViewEP_NodeExpand(ByVal sender As Object, ByVal e As RadTreeNodeEventArgs) Handles RadTreeViewEP.NodeExpand
    'SQL Database connection
    Dim sConnect As New SMARTCB.ConnectSMART.Connections
    Dim cn As New SqlConnection
    cn.ConnectionString = sConnect.GetConnectionString

    If e.Node.Level = 0 Then    'Get EP Indicator Topics (Functions)
      Dim myCMDf As New SqlDataAdapter
      Dim myCMf As New SqlCommand
      myCMf.Connection = cn
      myCMf.CommandType = CommandType.StoredProcedure
      myCMf.CommandText = "FuncSearchV4"

      Dim myParmF As New SqlParameter("@Key", SqlDbType.Int)

      myParmF.Value = e.Node.Value
      myParmF.Direction = ParameterDirection.Input
      myCMf.Parameters.Add(myParmF)

      myParmF = New SqlParameter("@SID", SqlDbType.VarChar)
      myParmF.Value = "1"
      myParmF.Direction = ParameterDirection.Input
      myCMf.Parameters.Add(myParmF)

      myParmF = New SqlParameter("@NH", SqlDbType.VarChar)
      myParmF.Value = "1"
      myParmF.Direction = ParameterDirection.Input
      myCMf.Parameters.Add(myParmF)

      myParmF = New SqlParameter("@SrchX", SqlDbType.VarChar)
      myParmF.Value = "0"
      myParmF.Direction = ParameterDirection.Input
      myCMf.Parameters.Add(myParmF)

      myCMDf.SelectCommand = myCMf

      Dim FUNC As DataSet = New DataSet
      myCMDf.Fill(FUNC, "dFunc")
      Dim mydatatablefunc As New DataTable
      mydatatablefunc = FUNC.Tables("dFunc")

      'myCMDf.Parameters.AddWithValue("parentId", e.Node.Value)
      'Dim adapter As New SqlDataAdapter(selectCommand)
      'Dim data As New DataTable()
      'adapter.Fill(data)

      Dim myRowF As DataRow
      Dim currRowsF() As DataRow = mydatatablefunc.Select(Nothing, Nothing, DataViewRowState.CurrentRows)
      For Each myRowF In currRowsF 'build new table for positioning skill topics
        Dim node As New RadTreeNode()
        node.Text = myRowF("bbfuncname")
        node.Value = myRowF("bbfuncId")
        node.ImageUrl = "../images/booksx.gif"
        node.Height = Unit.Pixel(22)
        node.ForeColor = Drawing.Color.FromName("#732928")
        node.Font.Size = "10"
        'If CInt(myRowF("ChildCount")) > 0 Then
        node.ExpandMode = TreeNodeExpandMode.ServerSideCallBack
        'End If
        e.Node.Nodes.Add(node)
      Next
      e.Node.Expanded = True
    End If

    If e.Node.Level = 1 Then 'Get EP Indicator SubTopics (Categories)
      Dim myCMDc As New SqlDataAdapter
      Dim myCMc As New SqlCommand
      myCMc.Connection = cn
      myCMc.CommandType = CommandType.StoredProcedure
      myCMc.CommandText = "CatSearchV4"

      Dim myParmC As New SqlParameter("@Key", SqlDbType.Int)

      myParmC.Value = e.Node.Value
      myParmC.Direction = ParameterDirection.Input
      myCMc.Parameters.Add(myParmC)

      myParmC = New SqlParameter("@SID", SqlDbType.VarChar)
      myParmC.Value = "1"
      myParmC.Direction = ParameterDirection.Input
      myCMc.Parameters.Add(myParmC)

      myParmC = New SqlParameter("@NH", SqlDbType.VarChar)
      myParmC.Value = "1"
      myParmC.Direction = ParameterDirection.Input
      myCMc.Parameters.Add(myParmC)

      myParmC = New SqlParameter("@SrchX", SqlDbType.VarChar)
      myParmC.Value = "0"
      myParmC.Direction = ParameterDirection.Input
      myCMc.Parameters.Add(myParmC)

      myCMDc.SelectCommand = myCMc

      Dim CAT As DataSet = New DataSet
      myCMDc.Fill(CAT, "dCat")
      Dim mydatatablecat As New DataTable
      mydatatablecat = CAT.Tables("dCat")

      'myCMDf.Parameters.AddWithValue("parentId", e.Node.Value)
      'Dim adapter As New SqlDataAdapter(selectCommand)
      'Dim data As New DataTable()
      'adapter.Fill(data)

      Dim myRowC As DataRow
      Dim currRowsC() As DataRow = mydatatablecat.Select(Nothing, Nothing, DataViewRowState.CurrentRows)
      For Each myRowC In currRowsC 'build new table for positioning skill topics
        Dim node As New RadTreeNode()
        node.Text = myRowC("bbcatname")
        node.ImageUrl = "../images/books2x.gif"
        node.Height = Unit.Pixel(22)
        node.ForeColor = Drawing.Color.FromName("#732928")
        node.Font.Size = "9"
        node.Value = myRowC("bbcatId")
        'If CInt(myRowC("ChildCount")) > 0 Then
        node.ExpandMode = TreeNodeExpandMode.ServerSideCallBack
        'End If
        e.Node.Nodes.Add(node)
      Next
      e.Node.Expanded = True
    End If

 

  End Sub

 

End Class

 

Yana
Telerik team
 answered on 09 Mar 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?