Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
151 views
I'm using RAD Calender with Multiselect = 'False'.
When I click on an already selected date, the date get deselected.
I want to stop that.

Is there any property to do that or How Can I do that?
Marin
Telerik team
 answered on 10 Feb 2011
4 answers
125 views
hi we are using web user control with rad grid and getting following error is there any way to resolve this error
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EditStudentDetails.ascx.cs"
    Inherits="AdminPortal.Admin.WebUserControl1" %>
<table>
    <tr>
        <td align="right" colspan="2">
            <asp:Button ID="btnUpdate" Text="Update" runat="server" CommandName="Update" Visible='<%# Not (TypeOf DataItem Is Telerik.Web.UI.GridInsertionObject) %>'>
            </asp:Button>
            <asp:Button ID="btnInsert" Text="Insert" runat="server" CommandName="PerformInsert"
                Visible='<%# (TypeOf DataItem Is Telerik.Web.UI.GridInsertionObject) %>'></asp:Button>
              
            <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                CommandName="Cancel"></asp:Button>
        </td>
    </tr>
</table>
<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminMaster.Master" AutoEventWireup="true"
    CodeBehind="StudentDetails.aspx.cs" Inherits="AdminPortal.Admin.StudentDetails" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <%--<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />--%>
    <!-- content start -->
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
    <telerik:RadCodeBlock runat="server" ID="radCodeBlock">
        <script type="text/javascript">
            function showFilterItem() {
                $find('<%=RadGrid1.ClientID %>').get_masterTableView().showFilterItem();
            }
            function hideFilterItem() {
                $find('<%=RadGrid1.ClientID %>').get_masterTableView().hideFilterItem();
            }
 
 
 
 
            function RowDblClick(sender, eventArgs) {
                sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
            }
        
        </script>
    </telerik:RadCodeBlock>
    <telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" AllowPaging="True"
        DataSourceID="EntityDataSource1" AllowSorting="True" AutoGenerateColumns="False"
        ShowStatusBar="true" CssClass="RadGrid">
        <MasterTableView Width="100%" DataKeyNames="StudentID">
            <Columns>
                <telerik:GridEditCommandColumn UniqueName="EditCommandColumn">
                </telerik:GridEditCommandColumn>
                <telerik:GridBoundColumn DataField="StudentID" DataType="System.Int32" HeaderText="StudentID"
                    ReadOnly="True" SortExpression="StudentID" UniqueName="StudentID" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="StudentName" HeaderText="StudentName" SortExpression="StudentName"
                    UniqueName="StudentName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ParentsName" HeaderText="ParentsName" SortExpression="ParentsName"
                    UniqueName="ParentsName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Gender" HeaderText="Gender" SortExpression="Gender"
                    UniqueName="Gender" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="EmailId" HeaderText="EmailId" SortExpression="EmailId"
                    UniqueName="EmailId">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="PhoneNumber" HeaderText="PhoneNumber" SortExpression="PhoneNumber"
                    UniqueName="PhoneNumber">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="MobileNumber" HeaderText="MobileNumber" SortExpression="MobileNumber"
                    UniqueName="MobileNumber">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Subject" HeaderText="Subject" SortExpression="Subject"
                    UniqueName="Subject" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="TimeZone" HeaderText="TimeZone" SortExpression="TimeZone"
                    UniqueName="TimeZone">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Address" HeaderText="Address" SortExpression="Address"
                    UniqueName="Address">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Country" HeaderText="Country" SortExpression="Country"
                    UniqueName="Country" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="State" HeaderText="State" SortExpression="State"
                    UniqueName="State" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="City" HeaderText="City" SortExpression="City"
                    UniqueName="City" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ZipCode" HeaderText="ZipCode" SortExpression="ZipCode"
                    UniqueName="ZipCode" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="SkypeId" HeaderText="SkypeId" SortExpression="SkypeId"
                    UniqueName="SkypeId" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Status" HeaderText="Status" SortExpression="Status"
                    UniqueName="Status" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridButtonColumn UniqueName="DeleteColumn" Text="Delete" CommandName="Delete" />
            </Columns>
            <EditFormSettings UserControlName="EditStudentDetails.ascx" EditFormType="WebUserControl">
                <EditColumn UniqueName="EditCommandColumn1">
                </EditColumn>
            </EditFormSettings>
            <ExpandCollapseColumn ButtonType="ImageButton" Visible="False" UniqueName="ExpandColumn">
                <HeaderStyle Width="19px"></HeaderStyle>
            </ExpandCollapseColumn>
        </MasterTableView>
        <ClientSettings>
            <ClientEvents OnRowDblClick="RowDblClick" />
        </ClientSettings>
    </telerik:RadGrid>
    <%--<telerik:RadGrid AutoGenerateColumns="false" ID="RadGrid1" DataSourceID="EntityDataSource1"
        AllowFilteringByColumn="True" AllowSorting="True" CssClass="RadGrid" GridLines="None"
        AllowPaging="True" PageSize="20" runat="server" EnableLinqExpressions="false"
        Width="500px" OnItemDeleted="RadGrid1_ItemDeleted" OnItemUpdated="RadGrid1_ItemUpdated"
        OnItemCommand="RadGrid1_ItemCommand" OnPreRender="RadGrid1_PreRender">
        <PagerStyle Mode="NextPrevAndNumeric" ShowPagerText="true" />
        <GroupingSettings CaseSensitive="false" />
        <MasterTableView AutoGenerateColumns="false" AllowFilteringByColumn="True" TableLayout="Auto"
            DataKeyNames="StudentID" DataSourceID="EntityDataSource1" EditMode="InPlace"
            ShowFooter="true">
            <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
            <Columns>
               <telerik:GridEditCommandColumn UniqueName="EditCommandColumn">
                </telerik:GridEditCommandColumn>
                <telerik:GridButtonColumn UniqueName="DeleteColumn" CommandName="Delete" ButtonType="ImageButton" /> 
                <telerik:GridEditCommandColumn>
                </telerik:GridEditCommandColumn>
                <telerik:GridBoundColumn DataField="StudentID" DataType="System.Int32" HeaderText="StudentID"
                    ReadOnly="True" SortExpression="StudentID" UniqueName="StudentID" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="StudentName" HeaderText="StudentName" SortExpression="StudentName"
                    UniqueName="StudentName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ParentsName" HeaderText="ParentsName" SortExpression="ParentsName"
                    UniqueName="ParentsName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Gender" HeaderText="Gender" SortExpression="Gender"
                    UniqueName="Gender" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="EmailId" HeaderText="EmailId" SortExpression="EmailId"
                    UniqueName="EmailId">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="PhoneNumber" HeaderText="PhoneNumber" SortExpression="PhoneNumber"
                    UniqueName="PhoneNumber">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="MobileNumber" HeaderText="MobileNumber" SortExpression="MobileNumber"
                    UniqueName="MobileNumber">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Subject" HeaderText="Subject" SortExpression="Subject"
                    UniqueName="Subject" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="TimeZone" HeaderText="TimeZone" SortExpression="TimeZone"
                    UniqueName="TimeZone">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Address" HeaderText="Address" SortExpression="Address"
                    UniqueName="Address">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Country" HeaderText="Country" SortExpression="Country"
                    UniqueName="Country" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="State" HeaderText="State" SortExpression="State"
                    UniqueName="State" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="City" HeaderText="City" SortExpression="City"
                    UniqueName="City" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ZipCode" HeaderText="ZipCode" SortExpression="ZipCode"
                    UniqueName="ZipCode" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="SkypeId" HeaderText="SkypeId" SortExpression="SkypeId"
                    UniqueName="SkypeId" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Status" HeaderText="Status" SortExpression="Status"
                    UniqueName="Status" Visible="false">
                </telerik:GridBoundColumn>
            </Columns>
            <EditFormSettings EditFormType="Template">
                <FormTemplate>
                    <table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none"
                        style="border-collapse: collapse; background: white;">
                        <tr class="EditFormHeader">
                            <td colspan="2" style="font-size: small">
                                <b>Student Details</b>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <table id="Table3" cellspacing="1" cellpadding="1" width="250" border="0" class="module">
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Country:
                                        </td>
                                        <td>
                                            <asp:TextBox ID="TextBox7" runat="server" Text='<%# Bind("Country") %>'>
                                            </asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            City:
                                        </td>
                                        <td>
                                            <asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind("City") %>' TabIndex="1">
                                            </asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Region:
                                        </td>
                                        <td>
                                            <asp:TextBox ID="TextBox9" runat="server" Text='<%# Bind("State") %>' TabIndex="2">
                                            </asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Home Phone:
                                        </td>
                                        <td>
                                            <telerik:RadMaskedTextBox ID="HomePhoneBox" runat="server" SelectionOnFocus="SelectAll"
                                                Text='<%# Bind("PhoneNumber") %>' PromptChar="_" Width="300px" Mask="(###) ###-####"
                                                TabIndex="3">
                                            </telerik:RadMaskedTextBox>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td>
                                <table id="Table1" cellspacing="1" cellpadding="1" width="250" border="0" class="module">
                                    <tr>
                                        <td>
                                            Address:
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:TextBox ID="TextBox6" Text='<%# Bind("Address") %>' runat="server" TextMode="MultiLine"
                                                Rows="2" Columns="40" TabIndex="6">
                                            </asp:TextBox>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <b>Personal Info:</b>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <table id="Table4" cellspacing="1" cellpadding="1" width="250" border="0" class="module">
                                    <tr>
                                        <td>
                                            Student Name:
                                        </td>
                                        <td>
                                            <asp:TextBox ID="TextBox2" Text='<%# Bind( "StudentName") %>' runat="server" TabIndex="8">
                                            </asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Parent Name:
                                        </td>
                                        <td>
                                            <asp:TextBox ID="TextBox3" Text='<%# Bind( "ParentsName") %>' runat="server" TabIndex="9">
                                            </asp:TextBox>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" colspan="2">
                                <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                    runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                </asp:Button
                                <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                    CommandName="Cancel"></asp:Button>
                            </td>
                        </tr>
                    </table>
                </FormTemplate>
            </EditFormSettings>
        </MasterTableView>
        <ClientSettings EnableRowHoverStyle="true">
            <Selecting AllowRowSelect="True" />
            <Scrolling AllowScroll="false" />
        </ClientSettings>
    </telerik:RadGrid>--%>
    <asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=AdminPortalEntities"
        DefaultContainerName="AdminPortalEntities" EnableDelete="True" EnableFlattening="False"
        EnableUpdate="True" EntitySetName="StudentInfoes">
    </asp:EntityDataSource>
    <!-- content end -->
</asp:Content>
Ajay
Top achievements
Rank 1
 answered on 10 Feb 2011
4 answers
101 views
I just want to use RadEditor as plain textbox without the user able to use ctrl-b to make certain characters bold because I will only be saving the text and not the formatting in the database.
Lenny_shp
Top achievements
Rank 2
 answered on 10 Feb 2011
5 answers
103 views
Hi to all,

I have a grid binded with data. The data has some foreign key feilds too. For some F.K fields sorting is working fine and for some its giving this error:

Server Error in '/' Application.

Room is neither a DataColumn nor a DataRelation for table Categories.

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: Room is neither a DataColumn nor a DataRelation for table Categories.

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: Room is neither a DataColumn nor a DataRelation for table Categories.]
   System.Data.DataRowView.get_Item(String property) +1789622
   lambda_method(Closure , DataRowView ) +41
   System.Linq.EnumerableSorter`2.ComputeKeys(TElement[] elements, Int32 count) +88
   System.Linq.EnumerableSorter`1.Sort(TElement[] elements, Int32 count) +21
   System.Linq.<GetEnumerator>d__0.MoveNext() +153
   System.Linq.Enumerable.Count(IEnumerable`1 source) +201
   lambda_method(Closure ) +315
   System.Linq.EnumerableExecutor`1.Execute() +94
   System.Linq.EnumerableExecutor`1.ExecuteBoxed() +23
   System.Linq.EnumerableQuery`1.System.Linq.IQueryProvider.Execute(Expression expression) +94
   Telerik.Web.UI.GridDynamicQueryable.Count(IQueryable source) +296
   Telerik.Web.UI.GridDataTableFromEnumerable.FillData35() +4333
   Telerik.Web.UI.GridDataTableFromEnumerable.FillData() +1064
   Telerik.Web.UI.GridResolveEnumerable.Initialize() +58
   Telerik.Web.UI.GridResolveEnumerable.EnsureInitialized() +45
   Telerik.Web.UI.GridResolveEnumerable.get_DataTable() +31
   Telerik.Web.UI.GridEnumerableFromDataView..ctor(GridTableView owner, DataView dataView, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields) +222
   Telerik.Web.UI.GridDataSourceHelper.CreateGridEnumerable(GridTableView owner, IEnumerable enumerable, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields) +97
   Telerik.Web.UI.GridDataSourceHelper.GetResolvedDataSource(GridTableView owner, Object dataSource, String dataMember, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields) +165
   Telerik.Web.UI.GridTableView.get_ResolvedDataSource() +225
   Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +73
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +66
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +128
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +33
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +143
   Telerik.Web.UI.GridTableView.PerformSelect() +38
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74
   Telerik.Web.UI.GridTableView.DataBind() +367
   Telerik.Web.UI.GridSortCommandEventArgs.ExecuteCommand(Object source) +318
   Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e) +200
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) +61
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) +170
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +125
   System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +169
   System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +9
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +176
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1


I dont know what is the problem in it. Here is my code:
<telerik:RadGrid ID="grvUsers" runat="server" Skin="Sunset" GridLines="None" AllowPaging="True"
                    PageSize="20" AllowSorting="True" Width="90%" OnItemCommand="grvUsers_ItemCommand"
                    OnNeedDataSource="grvUsers_NeedDataSource" OnColumnCreated="grvUsers_ColumnCreated">
                    <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
                    <ItemStyle Height="30px" />
                    <AlternatingItemStyle Height="30px" />
                    <HeaderStyle Font-Bold="true" />
                    <CommandItemStyle Height="30px" VerticalAlign="Middle" />
                    <MasterTableView DataKeyNames="Id" CommandItemDisplay="Bottom">
                        <Columns>
                            <telerik:GridTemplateColumn HeaderText="Action">
                                <ItemStyle Width="50px" />
                                <ItemTemplate>
                                    <asp:ImageButton ID="lnkEdit" runat="server" CommandName="Modify" AlternateText="Edit"
                                        ToolTip="Edit" ImageUrl="~/Content/Images/Buttons/edit_icon.png" CommandArgument='<%# Eval("Id") %>' />  
                                    <asp:ImageButton ID="lnkDelete" runat="server" AlternateText="Remove" ToolTip="Remove"
                                        ImageUrl="~/Content/Images/Buttons/remove_icon.png" OnClientClick="return confirm('Are you sure you want to delete?')"
                                        CommandName="Delete" CommandArgument='<%# Eval("Id") %>' />
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                        </Columns>
                        <CommandItemTemplate>
                            <asp:ImageButton ID="lnkAdd" runat="server" CommandName="Add" ImageUrl="~/Content/Images/Buttons/add_new_user_bttn.png">
                                <%--<img style="border:0px" alt="" src="../Content/Images/AddRecord.GIF" />Add New User--%>
                            </asp:ImageButton>
                        </CommandItemTemplate>
                    </MasterTableView>
                </telerik:RadGrid>

code behind:
protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                BindData();
            }
        }
 
        private void BindData()
        {
            DataTable Users;
 
            using (UsersServiceClient s = new UsersServiceClient())
            {
                Users = s.GetUserTable();
            }
            grvUsers.DataSource = Users;
            grvUsers.DataBind();
        }
        protected void grvUsers_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            DataTable Users;
 
            using (UsersServiceClient s = new UsersServiceClient())
            {
                Users = s.GetUserTable();
            }
            grvUsers.DataSource = Users;
        }
 
        protected void grvUsers_ColumnCreated(object sender, GridColumnCreatedEventArgs e)
        {
            if (e.Column.UniqueName == "id")
            {
                e.Column.Visible = false;
            }
        }

Please assist me....

thanks Rohan
Pavlina
Telerik team
 answered on 10 Feb 2011
4 answers
72 views
Hi

I have a  similar front-end to the Outlook Navigation demo for the panelbar using mutlipage controls, the different is they are separated by a splitter because we needed the splitter functionality.

In the solution we have we are using RenderSelectedPageOnly="true" on the multipage and using an AjaxManager so we can change the page the page when the panelbar is clicked. This was done because some of the pages called by the multipage can take a while to load and we didn't want them all loading at once.

However now each page is loaded when it is needed, which is all well and good but some of the users change page many times and others will stay on the same page.

Is there a way to have load on demand similar to the Tabstrip Demo that has the JS

<script type="text/javascript">
function onTabSelecting(sender, args)
{
    if (args.get_tab().get_pageViewID())
    {
        args.get_tab().set_postBack(false);
    }
}
</script>

So once a page is loaded it is not loaded again?

Thanks

tri
Top achievements
Rank 1
 answered on 10 Feb 2011
1 answer
33 views

I'm experiencing an odd behavior from RadRotator.
I'm using the rotator control to build a custom Menu, but i'm having several problems.
The menu its defined in a .ascx file and some of items are being hide in .cs if the current user don't have de necessary permissions to view some of the items.

The problem is that if i set the visibility of the unwanted buttons (RadRotatorItem) to false, after de postback, the content of all the RadRotatorItems disapear.
Other strange behavior in the rotator that seems to cause all this problems, its the fact that de ID assigned to de RadRotatorItem in the .ascx its being overrided by other value. I have notice this in debug mode.

The only way i have found so far to acomplish the desired menu, was by creating in runTime in the OnInit event of the user control, the desired items in menu, but this is not very practical and it lacks in performance. 

Had you or someone else already notice this strange behavior?
Can you provide some help or the best workAround? 

Best Regards.

Niko
Telerik team
 answered on 10 Feb 2011
8 answers
187 views
Does anyone know if it is possible to use the RAD menu control in conjunction with the chart? I'd like to be able to perform a particular operation depending on which bar is right clicked...

Any ideas / suggestions would be greatly appreciated.

Thanks!
-Brian
Yana
Telerik team
 answered on 10 Feb 2011
1 answer
45 views
Hi. I'm programming an application that works weekly, setting the raddatepicker mindate and maxdate between monday and next sunday (I'm from Spain). All works fine for me with the exception when weeks are between two months (i.e. mindate 01/31/2011 and maxdate 02/06/2011). I view in the calendar the final month selected (i.e. february), I can select the previous days of january but I want to view these days "active" (in bold style) like the rest of february days in the same week. How can I do that?

Thanks in advance.
Maria Ilieva
Telerik team
 answered on 10 Feb 2011
3 answers
281 views
Hello,

Let me explain my situation I can not solve that contains a RadGrid.

In the name WebUserControl ListTable.ascx I put inside a RadGrid that lists my records and a select button and Delete.

Then I create a control named ViewModules.ascx.

Inside ViewModules.ascx I create dynamically in my div PlaceHolder and using a variable in my QueryString, add dynamically in my ListTable.ascx PlaceHolder.

I put in my Session variable control ListTable.ascx then replaced in the page when I press a Delete event of RadGrid is within ListTable.ascx.

You find my code below because I can not provide an example as it uses several library of our platform.

Have you any idea how to make my event the delete button or trigger and be able to see more control in my page?

You will find 3 screenshots that show you the steps to view my shares.

This error only happens with all Telerik controls. If I use Microsoft's control that we have by default with Visual Studio, my control works without error.

Private Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
    If Me.IsPostBack AndAlso Not Session.Item("ViewModule") Is Nothing Then
        ModuleItemPlaceHolder.Controls.Add(DirectCast(Session.Item("ViewModule"), Control))
        Session.Remove("ViewModule")
    End If
End Sub
 
Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    If Not Me.IsPostBack Then
        Dim site As CMS.Site.Item = CMS.Site.Provider.GetSite(Application)
        If Not site Is Nothing Then
            InitHeader(site)
            If Me.ModuleType = [Module].Enumeration.ModuleType.None Then
                ' Loading module icons
                ViewIcons(site)
            Else
                ' Loading module
                ViewModule(site)
            End If
        End If
    End If
End Sub
 
Private Sub ViewModule(ByVal site As CMS.Site.Item)
    Session.Remove("ViewModule")
    If Me.ModuleType = [Module].Enumeration.ModuleType.None Then
        Response.Redirect(String.Concat(site.Url, "/Gestion/"))
    Else
        Select Case True
            Case Me.ModuleType = [Module].Enumeration.ModuleType.News OrElse Me.ModuleType = [Module].Enumeration.ModuleType.SlideShows OrElse _
                 Me.ModuleType = [Module].Enumeration.ModuleType.Testimonials OrElse Me.ModuleType = [Module].Enumeration.ModuleType.User
 
                If Me.RecordID Is Nothing OrElse Not IsNumeric(Me.RecordID) Then
                    Dim ctrl As CMS.Controls.ListTable = DirectCast(LoadControl("~/CMSControls/Generic/ListTable.ascx"), CMS.Controls.ListTable)
                    ctrl.Module = Me.ModuleType
                    ctrl.EnableNewRecord = True
 
                    Dim handled As Boolean = False
                    RaiseEvent InitListTable(ctrl, handled)
 
                    Session.Add("ViewModule", ctrl)
                    ModuleItemPlaceHolder.Controls.Add(ctrl)
                Else
 
                End If
        End Select
    End If
End Sub
Maxime Bellemare
Top achievements
Rank 2
 answered on 10 Feb 2011
4 answers
199 views
Hi,
I'm having problem with calculated column in RadGrid (2010-02).  Code:
...
<telerik:GridBoundColumn DataField="Quantity" HeaderText="Quantity" SortExpression="Quantity" UniqueName="colQuantity"></telerik:GridBoundColumn>
<
telerik:GridBoundColumn DataField="Price" HeaderText="Price" SortExpression="Price" UniqueName="colPrice" DataFormatString="{0:C}"></telerik:GridBoundColumn>
                           
<
telerik:GridCalculatedColumn  HeaderText="Total Cost" UniqueName="colTotalCost" DataType="System.Double" DataFields="Quantity, Price" Expression="{0}*{1}" />
...

Columns Price and Quantity are correct, without calculated column it is grid OK, but when I add it, I got cryptic error:

')' or ',' expected

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: Telerik.Web.UI.ParseException: ')' or ',' expected


Can anybody tell me, what's wrong?

Thank you,
Zdenek
Pavlina
Telerik team
 answered on 10 Feb 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?