Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
116 views
Hi All,

We found the issue with the Rad control not able to pick up any dates of a month with 30 days when the current date is 31 st of the month.

While trying to find a solution/workaround for the same found the suggestion to upgrade to the latest version of the rad controls.Followed the steps suggested in the LINK,  But now the issue is that the project does not get compiled as there seems to be confilct with the chart controls.And while trying to find a solution, found that steps in the link and link2.Implemented the steps for ensuring the the reference to the charting dll is set to the latest 'Telerik.Web.UI.dll' with the below mentioned expections.

1.There is no existing 'Telerik.Charting' either in the bin folder or the GAC.
2.There is no existing assmebly reference to the 'Telerik.Charting' in the web.config.
3.The code behind referes to the namespce as 'ByRef RadChart1 As Telerik.WebControls.RadChart' and as 'RadChart1.YAxis.AddRange'.

The project does not compile still and so cannot see if the initial problem of the datepicker not being able to pick up the any date on the 31 st of the month is fixed.

Please suggest if any thing is missed out or if there is a workaround to resolve the issue.

Thanks,
Arun

Georgi Krustev
Telerik team
 answered on 06 Apr 2009
4 answers
170 views
Hi,

I am using 2 level heirarchy in my radgrid. The detail table is displayed with the click of an expansion sign (I guess it depends on the skin) we are using. Is there any way I can add a text to this column such as 'Select' so that it is more visible to the user.

Also, is it possible that the detail table gets displayed by selecting anywhere on the row?

I really appreciate any help!

regards,

Anu
Anu
Top achievements
Rank 1
 answered on 06 Apr 2009
9 answers
216 views
Has the bug mentioned in this post: http://www.telerik.com/community/forums/thread/b311D-babhha.aspx been fixed? Specifically, none of the settings on the ExpandCollapseColumn appear to have any effect.  For example:
<ExpandCollapseColumn HeaderText="Foo"
    <HeaderStyle Width="50px" HorizontalAlign="Center" /> 
    <ItemStyle Width="50px" HorizontalAlign="Center" /> 
</ExpandCollapseColumn> 

The above does nothing. The ExpandCollapse column's width is unchanged and the header text is not set in FF3.0, IE7 or Safari 3.12 for Windows. I realize I can set this is code behind using the ColumnCreated event. However, that is really a workaround for markup that should work.
Sebastian
Telerik team
 answered on 06 Apr 2009
1 answer
106 views
I am trying to insert a record into a Grid and set that record to "IsInEditMode" so that I can display my custom template. 

I have tried the FireCommand via javascript but the "InitInsert" and "PerformInsert" aren't being caught by the Grid's OnItemCommand.  If I use the same FireCommand to "Edit" an item, the OnItemCommand is triggered.

I have also tried:

Grid.MasterTableView.IsItemInserted = True
Grid.Rebind()

Any Suggestions??

Daniel
Telerik team
 answered on 06 Apr 2009
3 answers
305 views

We are building a website that has RadTreeView with nodes that are calling aspx pages via NavigateUrl. Below is the website code and three sample aspx pages. It uses RadTreeView, RadMultiPage, RadSplitters and RadPanelBars.

 

 

 

To make it simple, I stripped out all of our software to just have aspx pages with just titles.

I have noticed 2 issues.

1. If the splitter bar is moved over the text associated with a RadTreeNode, our main pane,  rpContent, does not over-ride the text. This causes the pane to contain both its text and the text associated with the RadTreeNode.

2. When going from one aspx page to another aspx page, the website flutters and goes blank before showing the new aspx page. I have used an ajaxmanager to keep stop a aspx page from going blank when interfacing between the aspx page and an api.
Can an ajaxmanager be used for the type of master page we are using so that transitioning between pages will not causing the website to go blank?

Thanks
Kevin

 

 

website code

 

<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %> 
 
<%@ 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>Policy Administration Support Site (PASS)</title> 
    <link rel="stylesheet" href="styles/cof.css" type="text/css" /> 
    <asp:ContentPlaceHolder ID="head" runat="server">  
    </asp:ContentPlaceHolder> 
</head> 
<body scroll="no" id="cfbody">  
 
    <script type="text/javascript" src="scripts/cof.js"></script> 
 
    <form runat="server" style="height: 100%;">  
    <telerik:RadScriptManager ID="ScriptManager" runat="server" /> 
    <telerik:RadSplitter ID="spltWrapper" runat="server" Skin="Office2007" Orientation="Horizontal" 
        Width="100%" Height="100%" VisibleDuringInit="false">  
        <telerik:RadPane runat="server" ID="pnTop" Height="31px">  
            <asp:Panel ID="pnlTop" runat="server" CssClass="pnlTop">  
            </asp:Panel> 
        </telerik:RadPane> 
        <telerik:RadPane runat="server" ID="pnBottom" Height="100%" Width="100%" Scrolling="None">  
            <telerik:RadSplitter ID="spltMain" runat="server" Skin="Outlook" Orientation="Vertical" 
                Width="100%" Height="100%">  
                <telerik:RadPane ID="Pane1" runat="server" Width="200px" Scrolling="None">  
                    <div id="pageWrapper">  
                        <telerik:RadMultiPage ID="rmpNav" runat="server" SelectedIndex="0" Width="100%" BackColor="White">  
                            <telerik:RadPageView ID="rpvPolicy" runat="server">  
                                <div class="pnlHeader">  
                                    Policy Owner Services</div> 
                                <telerik:RadTreeView ID="rtvPolicy" runat="server" Skin="Office2007">  
                                    <Nodes> 
                                        <telerik:RadTreeNode Text="Beneficiary Maintenance" Expanded="true" runat="server">  
                                            <Nodes> 
                                                <telerik:RadTreeNode Text="Maintain Benes" NavigateUrl="AddBeneficiaries.aspx" ImageUrl="Img/notes.gif" 
                                                    runat="server" /> 
                                                <telerik:RadTreeNode Text="Maintain Bene Classes" NavigateUrl="BeneClasses.aspx" 
                                                    ImageUrl="Img/notes.gif" runat="server" /> 
                                                <telerik:RadTreeNode Text="Maintain Bene Relationships" NavigateUrl="BeneRelationships.aspx" 
                                                    ImageUrl="Img/notes.gif" runat="server" /> 
                                            </Nodes> 
                                        </telerik:RadTreeNode> 
                                    </Nodes> 
                                </telerik:RadTreeView> 
                            </telerik:RadPageView> 
                        </telerik:RadMultiPage> 
                        <telerik:RadPanelBar ID="rpbNav" runat="server" ExpandMode="SingleExpandedItem" OnClientItemClicking="OnClientItemClicking" 
                            Skin="Office2007" Width="100%" CssClass="pnlBarStyle">  
                            <Items> 
                                <telerik:RadPanelItem Text="Policy Owner Services" Expanded="True" ImageUrl="Img/notes.gif">  
                                </telerik:RadPanelItem> 
                            </Items> 
                        </telerik:RadPanelBar> 
                    </div> 
                </telerik:RadPane> 
                <telerik:RadSplitBar ID="spBarMain" runat="server" CollapseMode="Forward" /> 
                <telerik:RadPane ID="rpContent" runat="server" Width="100%">  
                    <asp:Panel runat="server" ID="pnlContent">  
                        <asp:ContentPlaceHolder ID="ContentBody" runat="server" /> 
                    </asp:Panel> 
                </telerik:RadPane> 
            </telerik:RadSplitter> 
        </telerik:RadPane> 
    </telerik:RadSplitter> 
    </form> 
</body> 
</html> 
 

 aspx pages

<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="AddBeneficiaries.aspx.vb" Inherits="AddBeneficiaries" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> 
   
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">  
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentBody" Runat="Server">  
    <asp:Label ID="Label1" runat="server" Text="Maint. Benes" Font-Bold="True" 
        Font-Size="Large"></asp:Label> 
    <br /> 
    <br /> 
    <br />          
</asp:Content> 
 
 
<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="BeneClasses.aspx.vb" Inherits="BeneClasses" %> 
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">  
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentBody" Runat="Server">  
    <asp:Label ID="Label1" runat="server" Text="Maintain Bene Classes" Font-Bold="True"   
        Font-Size="Large" ></asp:Label> 
</asp:Content> 
 
 
<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="BeneRelationships.aspx.vb" Inherits="BeneRelationships" %> 
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">  
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentBody" Runat="Server">  
    <asp:Label ID="Label1" runat="server" Text="Maintain Bene Relationships" Font-Bold="True" 
        Font-Size="Large"></asp:Label> 
</asp:Content> 
 
 

aspx.vb

 
Imports System.Data  
Imports System.Data.SqlClient  
Imports Telerik.Web.UI  
Partial Class AddBeneficiaries  
    Inherits System.Web.UI.Page  
 
    Protected Shadows Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load  
    End Sub  
   
 
End Class  
 
 
Imports System.Data  
Imports Telerik.Web.UI  
Partial Class BeneClasses  
    Inherits System.Web.UI.Page  
 
    Protected Shadows Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load  
    End Sub  
 
End Class  
 
 
Imports System.Data  
Imports Telerik.Web.UI  
Partial Class BeneRelationships  
    Inherits System.Web.UI.Page  
 
    Protected Shadows Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load  
    End Sub  
 
End Class  
 

Yana
Telerik team
 answered on 06 Apr 2009
1 answer
237 views
Hi,
I use Telerik's web controls 2009 Q1.
At web site I use RadPanelBar to organize layout with collapsible panels and I have met a little problem that I can't fix by myself: some indent appears in RadPanelItem when html table occurs at the end of ItemTemplate. That indent appears right after table. It occurs only in IE 7. Please see code example in IE 7 and in FireFox 3 and you will notice my problem.
Thank you,
Dmitry

 

<telerik:RadPanelBar runat="server" ID="panel" Skin="WebBlue" EnableEmbeddedSkins="true">  
    <Items> 
        <telerik:RadPanelItem runat="server" Text="Panel table" Expanded="true">  
            <Items> 
                <telerik:RadPanelItem runat="server" Expanded="true">  
                    <ItemTemplate> 
                        <table cellpadding="0" cellspacing="0" border="0" style="background:red;">  
                            <tr> 
                                <td> 
                                    text text text text text text text text text   
                                    text text text text text text text text text   
                                    text text text text text text text text text   
                                    text text text text text text text text text   
                                </td> 
                            </tr> 
                        </table> 
                    </ItemTemplate> 
                </telerik:RadPanelItem> 
            </Items> 
        </telerik:RadPanelItem> 
        <telerik:RadPanelItem runat="server" Text="Panel div" Expanded="true">  
            <Items> 
                <telerik:RadPanelItem runat="server" Expanded="true">  
                    <ItemTemplate> 
                        <div style="background:red;">  
                            text text text text text text text text text   
                            text text text text text text text text text   
                            text text text text text text text text text   
                            text text text text text text text text text   
                        </div> 
                    </ItemTemplate> 
                </telerik:RadPanelItem> 
            </Items> 
        </telerik:RadPanelItem> 
    </Items> 
</telerik:RadPanelBar> 
 

 

 

 

Kamen Bundev
Telerik team
 answered on 06 Apr 2009
1 answer
115 views
Hi,

I'm using the RadEditor v. 5.3.2 (I can't change) and I have to strip the Text links. I'm adding the editor programatically (eg. MOSSRadEditor editor = new MOSSRadEditor();) and I am trying to add the link using the default link manager (<tool name="MOSSLinkManager" shortcut="CTRL+K" />). However, when I try to add the link on a text, it changes the link to a absolute path instead of a relative path, but I need a RELATIVE path. I tried to use the StripFormatingOptions property setting it to ALL, but It just strip Image paths and not the links. The link are just relatives when I try to add a link on a image, but not when I try to add on a text.

I have some restrictions:

I can't change the ToolsFile.xml
I can't add a javascript in the page
I have to do it in the code-behind, like before, when I was setting the property StripAbsoluteAnchorPaths in the older versions (It was working with the version 4.3.4).

Thank you,

Thomas.
Stanimir
Telerik team
 answered on 06 Apr 2009
2 answers
71 views
Hi, Please let me know if it is possible to have different usercontrol for insert and edit.  It seems like that RadGrid is using same usercontrol for both insert and edit. 
Many Thanks,
aung maw
Top achievements
Rank 1
 answered on 06 Apr 2009
2 answers
174 views
Hi,

I am programmaticaly creating RadGrid columns. This works fine and the data is right, but when I change the page of the RadGrid my columns disappear. Please advise either what I am doing wrong, or what the problem is.

public partial class ListAdvertisements : System.Web.UI.Page 
    { 
        static DataSet ds; 
        static DataSet ds2; 
        static DataSet ds3; 
        static string UserID; 
 
        protected void Page_Load(object sender, EventArgs e) 
        { 
            if (!IsPostBack) 
            { 
                UserID = Request.QueryString["userid"]; 
 
                SubSonic.SqlQuery sql = new SubSonic.Select("ProfileID"
                                                        "Title as Profile"
                                                    .From(Tables.Ma_Profiles) 
                                                    .Where(Ma_Profiles.InactiveColumn) 
                                                    .IsEqualTo(0); 
                ds = sql.ExecuteDataSet(); 
 
                GridBoundColumn bound; 
                bound = new GridBoundColumn(); 
                grdAdvertisements.MasterTableView.Columns.Add(bound); 
                bound.DataField = "ProfileID"
                bound.Visible = false
                bound = new GridBoundColumn(); 
                grdAdvertisements.MasterTableView.Columns.Add(bound); 
                bound.DataField = "Profile"
                bound.Visible = true
                bound.HeaderText = "Profile"
 
                SubSonic.SqlQuery sql2 = new SubSonic.Select("ID"
                                                         "Description"
                                                .From(Tables.Vacancy_Advert_Types) 
                                                .Where(Vacancy_Advert_Types.InactiveDateColumn) 
                                                .IsNull() 
                                                .Or(Vacancy_Advert_Types.InactiveDateColumn) 
                                                .IsGreaterThan(DateTime.Now); 
                ds2 = sql2.ExecuteDataSet();                 
 
                foreach (DataRow dr in ds2.Tables[0].Rows) 
                { 
                    DataColumn dc = new DataColumn(); 
                    bound = new GridBoundColumn(); 
                    grdAdvertisements.MasterTableView.Columns.Add(bound); 
                    bound.DataField = dr[1].ToString() + "id"
                    bound.Visible = false
                    dc.ColumnName = dr[1].ToString() + "id"
                    ds.Tables[0].Columns.Add(dc); 
 
                    DataColumn dc2 = new DataColumn(); 
                    dc2.ColumnName = dr[1].ToString(); 
                    ds.Tables[0].Columns.Add(dc2); 
                    string colname = "Advert"
                    GridTemplateColumn templateColumn = new GridTemplateColumn(); 
                    templateColumn.ItemTemplate = new MyTemplate(colname, UserID); 
                    templateColumn.HeaderText = colname; 
                    grdAdvertisements.MasterTableView.Columns.Add(templateColumn); 
                } 
 
                GridButtonColumn button = new GridButtonColumn(); 
                grdAdvertisements.MasterTableView.Columns.Add(button); 
                button.ButtonType = GridButtonColumnType.ImageButton; 
                button.CommandName = "Edit"
                button.Visible = true
                button.HeaderText = "View all"
                button.ImageUrl = "~/Images/Buttons/S03edit32.gif"
            } 
        } 
 
        protected void FillGrid() 
        { 
 
            SubSonic.SqlQuery sql = new SubSonic.Select("ProfileID"
                                                        "Title as Profile"
                                                    .From(Tables.Ma_Profiles) 
                                                    .Where(Ma_Profiles.InactiveColumn) 
                                                    .IsEqualTo(0); 
            ds = sql.ExecuteDataSet(); 
 
            SubSonic.SqlQuery sql2 = new SubSonic.Select("ID"
                                                         "Description"
                                                .From(Tables.Vacancy_Advert_Types) 
                                                .Where(Vacancy_Advert_Types.InactiveDateColumn) 
                                                .IsNull() 
                                                .Or(Vacancy_Advert_Types.InactiveDateColumn) 
                                                .IsGreaterThan(DateTime.Now); 
            ds2 = sql2.ExecuteDataSet(); 
 
            foreach (DataRow dr in ds2.Tables[0].Rows) 
            { 
                DataColumn dc = new DataColumn(); 
                dc.ColumnName = dr[1].ToString() + "id"
                ds.Tables[0].Columns.Add(dc); 
 
                DataColumn dc2 = new DataColumn(); 
                dc2.ColumnName = dr[1].ToString(); 
                ds.Tables[0].Columns.Add(dc2); 
            } 
 
            foreach (DataRow dr in ds.Tables[0].Rows) 
            { 
                string sql3 = "select a.adverttype, c.description from vacancy_advert a " + 
                              "inner join vacancy_advert_to_profiles b on a.id = b.advertid " + 
                              "inner join vacancy_advert_types c on a.adverttype = c.id " + 
                              "where b.profileid = @profileid"
 
                QueryCommand qc = new QueryCommand(sql3, "SSBASE"); 
 
                qc.AddParameter("profileid", Convert.ToInt32(dr[0]), DbType.Int32, ParameterDirection.Input); 
 
                DataSet ds4 = DataService.GetDataSet(qc); 
 
                if (ds4.Tables[0].Rows.Count > 0) 
                { 
                    int j = 0; 
                    for (int i = 0; i < ds4.Tables[0].Rows.Count * 2; i = i + 2) 
                    { 
                        dr[2 + i] = ds4.Tables[0].Rows[j][0].ToString(); 
                        dr[3 + i] = ds4.Tables[0].Rows[j][1].ToString(); 
                        j++; 
                    } 
                } 
            } 
 
            grdAdvertisements.DataSource = ds.Tables[0]; 
        } 
 
        protected void grdAdvertisements_NeedDataSource(object source, GridNeedDataSourceEventArgs e) 
        { 
            FillGrid(); 
        } 
 
        protected void grdAdvertisements_PreRender(object sender, EventArgs e) 
        { 
             
            GridSortExpression sortExpr = new GridSortExpression(); 
            sortExpr.FieldName = "ProfileID"
            sortExpr.SortOrder = GridSortOrder.Ascending; 
            grdAdvertisements.MasterTableView.SortExpressions.AddSortExpression(sortExpr); 
        } 
 
        protected void btnNewAdvert_Click(object sender, ImageClickEventArgs e) 
        { 
            Response.Redirect("~/Recruitment/Advertisements/CreateAdvert.aspx?userid=" + UserID); 
        } 
 
        protected void grdAdvertisements_ItemCommand(object source, GridCommandEventArgs e) 
        { 
            if (e.CommandName == "Edit"
            { 
                Response.Redirect("~/Recruitment/Advertisements/EditAdverts.aspx?userid=" + UserID + "&profileid=" + e.Item.Cells[2].Text); 
            } 
        } 
 
        protected void grdAdvertisements_ItemDataBound(object sender, GridItemEventArgs e) 
        { 
            if (e.Item.DataItem != null
            { 
                for (int i = 0; i < e.Item.Cells.Count; i++) 
                { 
                    if (e.Item.Cells[i].Controls.Count == 1) 
                    { 
                        if (e.Item.Cells[i].Controls[0] is ImageButton) 
                        { 
                            if (((ImageButton)e.Item.Cells[i].Controls[0]).ID == "imgAdvert"
                            { 
                                if (e.Item.Cells[i - 1].Text == "&nbsp;"
                                {                                     
                                    ((ImageButton)e.Item.Cells[i].Controls[0]).ImageUrl = "~/Images/Buttons/S12edit32.gif"
                                    ((ImageButton)e.Item.Cells[i].Controls[0]).Enabled = false
                                } 
                            } 
                        } 
                    } 
                } 
            } 
        } 
 
        protected void grdAdvertisements_ItemCreated(object sender, GridItemEventArgs e) 
        { 
 
        } 
    } 
 
    public partial class MyTemplate : ITemplate 
    { 
        protected ImageButton img; 
        private string colname; 
        static string UserID2; 
 
        public MyTemplate(string cName, string UserID) 
        { 
            colname = cName; 
            UserID2 = UserID; 
        } 
 
        public void InstantiateIn(System.Web.UI.Control container) 
        { 
            img = new ImageButton(); 
            img.Click += new ImageClickEventHandler(img_Click); 
            img.ID = "imgAdvert"
            img.ImageUrl = "~/Images/Buttons/S06preview32.gif"
            img.Enabled = true
            container.Controls.Add(img); 
        } 
 
        void img_Click(object sender, ImageClickEventArgs e) 
        { 
 
        } 
    } 

CBARS
Top achievements
Rank 2
 answered on 06 Apr 2009
2 answers
116 views
Hi, I have a fileexplorer and details view on a page in edit mode, along with radwindowmanager. The fileexplorer is using Vista skin, the radwindowmanager is set to use the default skin and also have an iconUrl specified.

When a user causes an update, I am giving confirmation using a radalert like this:

(simplied)

if e.exception is nothing then

radajaxmanager1.responsescripts.add(string.format("radalert('update successful');"))

Now this works fine, and I use the code elsewhere in the application without an issue. However, it appears that FileExplorer is forcing the radalert to use the Vista skin (or whatever skin I apply to fileexplorer) and radalert is ignoring the skin specified in the radwindowmanager on the page. It is also ignoring the iconUrl I am specifying and using the default. This does not happen on any other page in the application (I use radalert quite a lot), so my url is fine.) If I remove fileexplorer, the problem goes away, so fileexplorer must be interfering with radalert/radwindowmanager in some way!

Thanks,
Matt
Adam Hubble
Top achievements
Rank 1
 answered on 06 Apr 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
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
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?