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

I'm struggling to set the visible property on elements located on the page where the radtabstrip/radmultipage are located through server side code.

In my example I have a page 'PreApp.aspx' which has the tabs/multipage on it as well as a button which enables you to move to the next tab. When you click on the tabs or the button the RadMultiPage_Load sub is executed correctly and btnNext.visible property is set, however it has no effect and the button state never changes.

Can I do it this way, or do I have to use javascript on each page rather than server-side programming?

Cheers,
- Will

PreApp.aspx.vb
Imports Telerik.Web.UI
Imports System.Data
 
Partial Class _Default
    Inherits System.Web.UI.Page
 
Protected Sub btnNext_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnNext.Click               
        If RadTabStrip1.SelectedIndex = 4 Then
            'MsgBox("Do you wish to apply for your selected loan using these details?")
        Else
            RadTabStrip1.SelectedIndex = RadTabStrip1.SelectedIndex + 1
            RadMultiPage1.SelectedIndex = RadTabStrip1.SelectedIndex
        End If
    End Sub
 
    Private Sub RadMultiPage1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadMultiPage1.Load
        If RadTabStrip1.SelectedTab.PageViewID = "Results" Or RadTabStrip1.SelectedTab.PageViewID = "Wizard" Then
            btnNext.Visible = False
        Else
            btnNext.Visible = True
        End If
    End Sub
 
End Class


PreApp.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeBehind="PreApp.aspx.vb" Inherits="RadControlsWebApp1._Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
        <link rel="stylesheet" type="text/css" href="Styles.css" />
</head>
<body style="width: 950px">
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadTabStrip1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>                       
        </AjaxSettings>
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadTabStrip1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                </UpdatedControls>
            </telerik:AjaxSetting>                       
        </AjaxSettings>
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="btnNext">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>                       
        </AjaxSettings>
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="btnNext">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                </UpdatedControls>
            </telerik:AjaxSetting>                       
        </AjaxSettings>
    </telerik:RadAjaxManager>
     
        <telerik:RadTabStrip SelectedIndex="1" ID="RadTabStrip1" runat="server"
                MultiPageID="RadMultiPage1" Skin="Black" CssClass="RadTabStrip"
        ScrollButtonsPosition="Left" AutoPostBack="True">
            <Tabs>
                <telerik:RadTab runat="server" Text="Wizard" PageViewID="Wizard" Selected="True">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Basic Details" PageViewID="Basic">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Income" PageViewID="Income">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Assets/Liabilities" PageViewID="Assets">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Credit" PageViewID="Credit">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Results" PageViewID="Results">
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>
         
        <telerik:RadMultiPage ID="RadMultiPage1" Runat="server" SelectedIndex="0" ScrollBars="Hidden">
            <telerik:RadPageView ID="Wizard" runat="server" ContentUrl="Wizard.aspx"  Height="550" Width="950" Selected="True">
                Wizard
            </telerik:RadPageView>
            <telerik:RadPageView ID="Basic" runat="server" ContentUrl="Basic.aspx"  Height="550" Width="950">
                BasicDetails
            </telerik:RadPageView>
            <telerik:RadPageView ID="Income" runat="server" ContentUrl="Income.aspx" Height="550" Width="950">
                Income
            </telerik:RadPageView>
            <telerik:RadPageView ID="Assets" runat="server" ContentUrl="Assets.aspx" Height="550" Width="950">
                Assets
            </telerik:RadPageView>
            <telerik:RadPageView ID="Credit" runat="server" ContentUrl="Credit.aspx" Height="550" Width="950">
                Credit
            </telerik:RadPageView>
            <telerik:RadPageView ID="Results" runat="server" ContentUrl="Results.aspx" Height="550" Width="950">
                Results<br />
            </telerik:RadPageView>
        </telerik:RadMultiPage>  
          
        <telerik:RadButton ID="btnNext" runat="server" Skin="Black"
        style="left: 820px; position: fixed; top: 520px;" Text="Save/Next">
        </telerik:RadButton>
 
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">       
    </telerik:RadAjaxLoadingPanel>
    </form>
</body>
</html>
Kevin
Top achievements
Rank 2
 answered on 22 Dec 2011
1 answer
92 views
Hello,

In the code below you can see that I'm trying to disable 1 of the 2 hyperlinks. If I do this outside a RadGrid there is no problem and it will be disabled, but if I use it inside the RadGrid, it looks like that it just get ignored. This is exactly the same with visible. is there any solution for this problem?

<telerik:GridTemplateColumn UniqueName="TLastPostInfo" HeaderText="last Post Info">
    <ItemStyle Width="80px" />
    <ItemTemplate>
        <div>
            Post Date:
            <%# DataBinder.Eval(Container.DataItem, "LAST_POST_DATE")%>
            <br />
            in:
            <asp:HyperLink ID="HLLastTopic" Style="text-decoration: none" runat="server" NavigateUrl='<%# "TopicView.aspx?cat="+ Eval("ID").ToString() +"&top="+ Eval("LAST_TOPIC_ID").ToString()%>'><%# Eval("LAST_TOPIC_NAME")%></asp:HyperLink>
            by:
            <asp:HyperLink ID="HLLastPersonPost" Style="text-decoration: none" runat="server"
                NavigateUrl='<%# "ProfileView.aspx?id=" +  Eval("LAST_PERSON_ID").ToString()%>' Text='<%# Eval("LAST_PERSON_NAME")%>' Enabled="false" />
        </div>
    </ItemTemplate>
</telerik:GridTemplateColumn>
Folmer
Top achievements
Rank 1
 answered on 22 Dec 2011
1 answer
76 views
I am putting together a grid with an expanding details grid. When a row is expanded that is near the bottom, the details chart expands beyond the limits of the grid as shown in the attached image.

How can I make the expansion stay within the boudaries of the grid and give scroll bars when needed.
Andrey
Telerik team
 answered on 22 Dec 2011
4 answers
91 views
I am using telrik RAD ASP.net control asp.net 2.0
This conotrols are not working on safari ? Is that rad controls dont provide safari support?
What we need to do for same ? to support safari ?
Ritesh
Top achievements
Rank 1
 answered on 22 Dec 2011
8 answers
482 views
Hi,  im creating a GridEditCommandColumn in the Page_Init and I have AutoGenerateEditColumn = false set for my grid.   When I run the page the edit command shows but when I hit edit I get the following error.  The rad grid tag is in the aspx page so im not creating the grid programiclly just the columns and settings the values for the radgrid.

[HttpException (0x80004005): Multiple controls with the same ID 'EditButton' were found. FindControl requires that controls have unique IDs.]
   System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +273
   System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +320
   System.Web.UI.Control.EnsureNamedControlsTable() +61
   System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +222
   System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +327
   System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +327
   System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +327
   System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +327
   System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +327
   System.Web.UI.Page.FindControl(String id) +38
   System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +629
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1743

Here is the code.  If I remove this and set AutoGenerateEditColumn to true it works.

       GridEditCommandColumn editCommandColumn = new GridEditCommandColumn(); 
        RG1.MasterTableView.Columns.Add(editCommandColumn); 
        editCommandColumn.HeaderText = ""
        editCommandColumn.UniqueName = "EditCol"
        editCommandColumn.Display = true
        editCommandColumn.HeaderStyle.Width = Unit.Pixel(30); 
        editCommandColumn.ItemStyle.Width = Unit.Pixel(30); 
        editCommandColumn.FooterStyle.Width = Unit.Pixel(30); 
        editCommandColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center; 
        editCommandColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center; 

Why am i getting this error when the grid goes into edit mode.

Thanks in advance
-Keith


Tsvetina
Telerik team
 answered on 22 Dec 2011
1 answer
122 views
I am exporting to Excel using HTML format from a radGrid and I am trying to:

1. Put the columns in a certain order, is this possible?
2. I need to add a column that just puts the increment on 1. So row 1 would have 1 and row 2 would be 2 and so on. Is this possible?

These are the two things I'm stuck on, so any help would be great!

Thanks!
Andrey
Telerik team
 answered on 22 Dec 2011
7 answers
353 views
Hi,

My requirement is to highlight the entire row when user hovers over any part of the row( i.e. either at plus/minus icon or node image or node text or even the empty space left in the row). But, the problem is that row is highlighted only when user hovers over the input text of the node, when user hovers over any other part of node the row is not highlighted.
I am using this style
.RadTreeView_Default .rtHover
{
color: #000;
border-color: #a79d87 #b89f73;
background-color: #FFE086;
padding: 0px 2px 0px 2px;
}
.RadTreeView_Default .rtSelected
{
color: #000;
border: 0;
background-color: #fcdb89;
}

Is there a way to achieve this?
Pooja
Top achievements
Rank 1
 answered on 22 Dec 2011
1 answer
91 views
Dear Telerik,

Could you please help me with the following problem:

I use web wervice binding for my RadScheduler. It has only day view and uses only one resource type. But the exact set of resource values is different for each day.

Thus, when I first load the page the data I see is correct. But when I walk to the next day and further I see the wrong data because the set of resource remains the same, becoming incorrect...

How can I fix this?

I use ResourcePopulationMode="ServerSide"

Many thanks!

- Stepan.
Peter
Telerik team
 answered on 22 Dec 2011
3 answers
321 views
Hi,

I'm getting this error when I do the following :
var events = App.WorkWith().Events()
.Where( n => ( n.Status == ContentLifecycleStatus.Live ) && ( n.Owner == Base.BrokerInformation.BrokerId ) )
.Get()
.ToList();

The inner exception is :
line 1:152: expecting "TOK_UNSIGNED_INTEGER", found '3.' ("3." is a reserved word.)
Original Query: DEFINE EXTENT extnt FOR Telerik.Sitefinity.Events.Model.Event; SELECT * FROM extnt AS t1  WHERE t1.appName =  $1 AND (t1.status =  $2 AND t1.owner =  $3.BrokerId )

The stacktrace is :
   at Telerik.Sitefinity.Data.Linq.Oql.OqlQueryProvider`2.ExecuteKnownType[TResult](IObjectScope scope, String queryText, Boolean isEnumerable, Int32 skip, Int32 take, IList parameters, ElementOperator op)
   at Telerik.Sitefinity.Data.Linq.Oql.OqlQueryProvider`2.Execute[TResult](Expression expression)

I did check, the "Base.BrokerInformation.BrokerId" is a valid Guid.

What is wrong? How do I fix this error?

I'm Using Sitefinity 4.0.

Thanks for your help in advanced.

Kind Regards,
Gerrit
Gerrit
Top achievements
Rank 2
 answered on 22 Dec 2011
2 answers
81 views
Hello,
   We have recently started testing our web application that uses RadControls for ASP.NET Ajax, version 2011.2.915.35, in IE9.  In one of our pages, we have a RadGrid scenario with row selection enabled. The user can select a row and move it up/down through server-side logic. When the server-side operation completes, we are aiming to keep the moved row selected, so we mark it as selected. This works fine in all browsers except IE9, where the selected row does not show as selected anymore after postback, even if it seems to preserve its selected row style:
<tr class="rgRow rgSelectedRow" id="grdChecklistItems_ctl00_ctl06_Detail10__0:0_2">

.RadGrid_Office2007 .rgSelectedRow {
  background: url("/WebResource.axd?d=8HlVixFI-spNm-i_LFPasnVS_PojK2TSIabUxEYpUsHu5V57kdDAVYkjLodU_glW8AsQ5_hjFOFKnXEPtCIPa3WhlhM761rRfCedIlI8jhRSX9aSuc9w_zw1S9OGOkzz6r1EQIaZIJYmuoGaFYFFHdz17Lk1&t=634516086000000000") repeat-x scroll 0 -3900px #FFCB60;
}  

Are you aware of this kind of problems in IE9 and do you know what could fix it?
 
Thank you.
Alan
Top achievements
Rank 1
 answered on 22 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?