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

I have a RadScheduler in my project and I want to style the appointment based on the resource type. I got three companies apointment in my RadScheduler and based on these company names, I want the appointments to be displayed with different styles from CS. Please help.

Thanks in advance,
Antony.
Princy
Top achievements
Rank 2
 answered on 08 Mar 2013
4 answers
245 views
I have a scheduler that is configured to use timeline view.
<TimelineView UserSelectable="true" GroupBy="Driver" GroupingDirection="Vertical" ShowInsertArea="false" />

Is it possible to freeze the timeline header row?  I would like to be able to see the timeline when scrolling through a long list of resources.

Could someone please let me know if this is possible?

Thank you.
Brett
Top achievements
Rank 1
 answered on 08 Mar 2013
3 answers
200 views
Hi!

This may be obvious but I am missing it. I created a button in the CommandItemTemplate to toggle the filter. It is in javascript and works fine. However, I would prefer to display the grid with the filter hidden from the start. Is there a property in the aspx definition or in the code behind that can set that?

Using CSS seems to hide it permantly:
.radGrid .rgFilterRow
{
    display: none !important;
}

Thanks for your help!
Michael
Michael O'Flaherty
Top achievements
Rank 2
 answered on 07 Mar 2013
6 answers
260 views
I get the following error when trying to view the Grid demo:

The database 'C:\PROGRAM FILES (X86)\TELERIK\RADCONTROLS FOR ASP.NETAJAX Q3 2012\LIVE DEMOS\APP_DATA\NORTHWIND.MDF' cannot be opened because it is version 655. This server supports version 612 and earlier. A downgrade path is not supported.
Could not open new database 'C:\PROGRAM FILES (X86)\TELERIK\RADCONTROLS FOR ASP.NETAJAX Q3 2012\LIVE DEMOS\APP_DATA\NORTHWIND.MDF'. CREATE DATABASE is aborted.
An attempt to attach an auto-named database for file C:\Program Files (x86)\Telerik\RadControls forASP.NET AJAX Q3 2012\Live Demos\App_Data\Northwind.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.



Please advise
Vasil
Telerik team
 answered on 07 Mar 2013
4 answers
180 views
I have a RadGrid with an Edit Form Template. Inside the template I have a RadioButtonList that has javascript attached that will hide or show elements within the form template depending on what is selected. It have it working as I expected; however, when I add a RadAjaxManager to the page, then the javascript stops working, as it no longer seems to be able to find the inner elements of the form template. Everything else on the grid seems to work with the ajax though.

The RadGrid markup is here:
            <telerik:RadGrid ID="grdWorkflow" Skin="Outlook" AutoGenerateColumns="False" GridLines="None" Width="890px"
                OnNeedDataSource="grdWorkflow_NeedDataSource" OnItemDataBound="grdWorkflow_ItemDataBound"
                OnItemCommand="grdWorkflow_ItemCommand" OnRowDrop="grdWorkflow_RowDrop" runat="server">
                <ClientSettings AllowColumnsReorder="false" EnableRowHoverStyle="true" Selecting-AllowRowSelect="false">
                </ClientSettings>
                <MasterTableView Caption="List of workflows" EditMode="EditForms" CommandItemDisplay="Top"
                    Summary="Add Step/Step Maintenance" CommandItemSettings-AddNewRecordText="Add New Step" CommandItemSettings-RefreshText="Refresh Workflow">
                    <NoRecordsTemplate>
                        <div class="bold">
                            No workflows to display. Please select the link above to add a new workflow step.
                        </div>
                    </NoRecordsTemplate>
                    <GroupByExpressions>
                        <telerik:GridGroupByExpression>
                            <SelectFields>
                                <telerik:GridGroupByField FieldAlias="Workflow" FieldName="WorkflowName" />
                            </SelectFields>
                            <GroupByFields>
                                <telerik:GridGroupByField FieldName="ArtificialSortingField" />
                            </GroupByFields>
                        </telerik:GridGroupByExpression>
                    </GroupByExpressions>
                    <Columns>
                        <telerik:GridBoundColumn UniqueName="WorkflowID" DataField="WorkflowID" Display="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn UniqueName="WorkflowName" DataField="WorkflowName" Display="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn UniqueName="StepID" DataField="StepID" Display="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn UniqueName="StepType" DataField="StepType" Display="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn UniqueName="StepTypeIcon" HeaderText="Type" ItemStyle-Width="30px"
                            HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:Image ID="btnEdit" ImageUrl="<%# GetFileTypeIcon(((NAVIDAS.Core.WorkflowStep)Container.DataItem).StepType) %>"
                                    ImageAlign="Middle" AlternateText='<%# (((NAVIDAS.Core.WorkflowStep)Container.DataItem).StepType == "C") ? "Decision Point" : "Approval Step" %>'
                                    ToolTip='<%# (((NAVIDAS.Core.WorkflowStep)Container.DataItem).StepType == "C") ? "Decision Point" : "Approval Step" %>'
                                    runat="server" />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn UniqueName="StepName" HeaderText="Step Name" DataField="StepName">
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn UniqueName="Calculation" HeaderText="Show Path if:" ItemStyle-Width="105px">
                            <ItemTemplate>
                                <asp:RadioButtonList ID="rblCalculation" RepeatDirection="Horizontal" AutoPostBack="true"
                                    OnSelectedIndexChanged="rblCalculation_SelectedIndexChanged" Visible='<%# (((NAVIDAS.Core.WorkflowStep)Container.DataItem).StepType == "C") %>'
                                    runat="server">
                                    <asp:ListItem Text="Yes" Value="1" Selected></asp:ListItem>
                                    <asp:ListItem Text="No" Value="0"></asp:ListItem>
                                </asp:RadioButtonList>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridEditCommandColumn UniqueName="Edit" HeaderText="Edit" HeaderStyle-Width="30px" ItemStyle-Width="30px" ButtonType="ImageButton"
                            HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                        </telerik:GridEditCommandColumn>
                    </Columns>
                    <EditFormSettings EditFormType="Template">
                        <FormTemplate>
                            <div style="margin-left:5px;">
                                <asp:Label ID="lblStepID" Text='<%# Bind("StepID") %>' Visible="false" runat="server"></asp:Label>
                                <asp:Label ID="lblWorkflowID" Text='<%# Bind("WorkflowID") %>' Visible="false" runat="server"></asp:Label>
                                <asp:Label ID="lblNextStepID" Text='<%# Bind("NextStepID") %>' Visible="false" runat="server"></asp:Label>
                                <asp:Label ID="lblFalseStepID" Text='<%# Bind("FalseStepID") %>' Visible="false" runat="server"></asp:Label>
                                <fieldset>
                                    <ol>
                                        <li>
                                            <label for="ctl00_ContentPlaceHolder1_grdWorkflow_ctl00_ctl06_txtWorkflowName">
                                                Workflow Name:
                                            </label>
                                            <asp:TextBox ID="txtWorkflowName" Width="350px" MaxLength="50" Text='<%# Bind("WorkflowName") %>' runat="server" />
                                        </li>
                                        <li id="liStepType">
                                            <label for="ctl00_ContentPlaceHolder1_grdWorkflow_ctl00_ctl06_rblStepType">
                                                <span class="required">*</span> Type of Step:
                                            </label>
                                            <span class="radioButtons">
                                                <asp:RadioButtonList ID="rblStepType" RepeatDirection="Horizontal" RepeatLayout="Flow" runat="server">
                                                    <asp:ListItem Text="Approval" Value="A"></asp:ListItem>
                                                    <asp:ListItem Text="Decision Point" Value="C"></asp:ListItem>
                                                </asp:RadioButtonList>
                                                <asp:RequiredFieldValidator CssClass="requiredField" ID="rfvStepType" ControlToValidate="rblStepType"
                                                    Enabled="false" Display="Dynamic" runat="server" ErrorMessage="You must select a step type"
                                                    ValidationGroup="Save"> </asp:RequiredFieldValidator>
                                            </span>
                                        </li>
                                        <li>
                                            <label for="ctl00_ContentPlaceHolder1_grdWorkflow_ctl00_ctl06_txtStepName">
                                                Step Name:
                                            </label>
                                            <asp:TextBox ID="txtStepName" Width="350px" MaxLength="50" Text='<%# Bind("StepName") %>' runat="server" />
                                        </li>
                                        <li id="calcField">
                                            <label for="ctl00_ContentPlaceHolder1_grdWorkflow_ctl00_ctl06_ddlField">
                                                Field:
                                            </label>
                                            <asp:DropDownList ID="ddlField" DataTextField="FieldName" DataValueField="FieldID" runat="server">
                                            </asp:DropDownList>
                                        </li>
                                        <li id="calcOperator">
                                            <label for="ctl00_ContentPlaceHolder1_grdWorkflow_ctl00_ctl06_ddlOperators">
                                                Comparison Type:
                                            </label>
                                            <asp:DropDownList ID="ddlOperators" runat="server">
                                                <asp:ListItem Text="< less than" Value="<"></asp:ListItem>
                                                <asp:ListItem Text="> greater than" Value=">"></asp:ListItem>
                                                <asp:ListItem Text="<= less than or equal" Value="<="></asp:ListItem>
                                                <asp:ListItem Text=">= greater than or equal" Value=">="></asp:ListItem>
                                                <asp:ListItem Text="= equal" Value="="></asp:ListItem>
                                                <asp:ListItem Text="<> not equal" Value="<>"></asp:ListItem>
                                            </asp:DropDownList>
                                        </li>
                                        <li id="calcValue">
                                            <label for="ctl00_ContentPlaceHolder1_grdWorkflow_ctl00_ctl06_txtCalculationValue">
                                                Value:
                                            </label>
                                            <asp:TextBox ID="txtCalculationValue" Text='<%# Bind("Value") %>' runat="server">
                                            </asp:TextBox>
                                            or
                                            <asp:DropDownList ID="ddlValueField" DataTextField="FieldName" DataValueField="FieldID" runat="server">
                                            </asp:DropDownList>
                                        </li>
                                    </ol>
                                </fieldset>
                                <div class="buttons">
                                    <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Add" : "Update" %>'
                                        CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'
                                        runat="server" ValidationGroup="Save" />
                                    <asp:Button ID="btnDelete" Text="Delete" Visible='<%# (Container is GridEditFormInsertItem) ? false : true %>'
                                        runat="server" CausesValidation="false" CommandName="Delete" OnClientClick="javascript:return confirm('Are you sure you want to remove this step?\r\n\r\n(But not the actual approver groups associated with this step)');" />
                                    <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="false"
                                        CommandName="Cancel" />
                                </div>
                            </div>
                        </FormTemplate>
                    </EditFormSettings>
                    <NestedViewSettings>
                        <ParentTableRelation>
                            <telerik:GridRelationFields MasterKeyField="StepID" DetailKeyField="StepID" />
                        </ParentTableRelation>
                    </NestedViewSettings>
                    <NestedViewTemplate>
<!-- removed for simplicity. Probably not relevant -->
                    </NestedViewTemplate>
                </MasterTableView>
                <ClientSettings AllowRowsDragDrop="true">
                    <Selecting AllowRowSelect="true" />
                </ClientSettings>
                <GroupingSettings ShowUnGroupButton="true" />
            </telerik:RadGrid>

The working javascript (which fails after ajax applied) is here:
<script type="text/javascript">
    $(document).ready(function ()
    {
        $("#liStepType input:radio").each(function ()
        {
            var i = $(this).attr("id");
            var txt = $("#" + i).val();
            if (txt == "C")
            {
                if ($(this).is(":checked"))
                {
                    $("#calcField").show();
                    $("#calcOperator").show();
                    $("#calcValue").show();
                    $("#calcFieldValue").show();
                }
                else
                {
                    $("#calcField").hide();
                    $("#calcOperator").hide();
                    $("#calcValue").hide();
                    $("#calcFieldValue").hide();
                }
            }
        });
        $("#liStepType input:radio").click(function ()
        {
            var i = $(this).attr("id");
            var txt = $("#" + i).val();
            if (txt == "C")
            {
                if ($(this).is(":checked"))
                {
                    $("#calcField").show();
                    $("#calcOperator").show();
                    $("#calcValue").show();
                    $("#calcFieldValue").show();
                }
            }
            else
            {
                $("#calcField").hide();
                $("#calcOperator").hide();
                $("#calcValue").hide();
                $("#calcFieldValue").hide();
            }
        });
    });
</script>

And the RadAjaxManager markup is here:
<telerik:RadAjaxManagerProxy ID="workflowProxy" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="ddlCommand">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ddlOrganization" />
                <telerik:AjaxUpdatedControl ControlID="grdWorkflow" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="ddlOrganization">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="grdWorkflow" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="grdWorkFlow">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="grdWorkflow" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
Johnathan
Top achievements
Rank 1
 answered on 07 Mar 2013
1 answer
100 views
Our code works fine with v2012.3.1205 and v2012.3.1308, however after upgrading to v2013.1.220.45 we get the following error:

0x800a139e - Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Script control 'rcbBudgetCategory' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().

We can remove our control "rcbBudgetCategory" and then the error simply jumps to the next Rad Control on the page. This occurs inside of a User Control inside a RadGrid:

<EditFormSettings UserControlName="~/Controls/UnitAdmin.ascx" EditFormType="WebUserControl">

... the nested User Control has RadControls which post-back. These controls are inside tables, which are inside Panels which are registered in the RadAjaxManager:

<AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="rcbBudgetCategory">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="pnlReplaceOptions" />
                <telerik:AjaxUpdatedControl ControlID="rblReplacement" />
                <telerik:AjaxUpdatedControl ControlID="pnlReplace" LoadingPanelID="ralpLoading" />
            </UpdatedControls>
        </telerik:AjaxSetting> 
...

<asp:Panel runat="server" ID="pnlReplace">
    <table>
        <tr>
            <td class="bold">Budget Category:</td>
            <td>
                <telerik:RadComboBox runat="server" ID="rcbBudgetCategory" DataSourceID="BudgetCategoryDataSource" DataTextField="BudgetCategory1" DataValueField="BudgetCategoryID" Width="250" AppendDataBoundItems="true" AutoPostBack="True" OnSelectedIndexChanged="rcbBudgetCategory_SelectedIndexChanged">
                    <Items>
                        <telerik:RadComboBoxItem Text="" Value="" />
                    </Items>
                </telerik:RadComboBox>

Some table rows (TR's) are runat="server" and can be shown/hidden... we even made the tables runat=server in case this was the problem, but it wasn't. Also, the error still occurred when we tried commenting-out all the code which changed the visibility of controls in the code-behind.

Therefore we believe v2013.1.220.45 has a bug.

Dimitar Terziev
Telerik team
 answered on 07 Mar 2013
10 answers
262 views
Hi

I have a RadGrid with client side binding through webservice. Everything works great, but I need to hide column for regular users and show all to admin. I am using the hideColumn() and showColumn() procedure, it works, it hides the column, but the Grid is not resizing to fill the new space. I have 1 column defined without width and I want this column to be resized. I dont want to allow the user to resize the column, but if it must the so be it. I tried every possible combination of allowColumnResizing, ResizeGridOnColumnResize, Clip... also tried tableLayout, also manual column resizing and I tried to move hidding to different events like OnDataBinding, OnDataBound, OnMasterTableCreating, OnGridCreating and so on, but nothing works as expected. At server side it is so simple so why is client side so hard??

thanks 

Vitalij
Sophie
Top achievements
Rank 2
 answered on 07 Mar 2013
1 answer
175 views
i am having x.aspx radwindow page which contains 5 tabs,
 
if i click the 5th tab( Delete user), radwindow pop up will be dislayed with option ok and cancel, if i click ok.. i am closing the popup and coming back to the 5th tab(Delete user), if i am using the following code,
 
GetRadWindow().BrowserWindow.location.reload();
 

I get an IE7 popup dialog, saying
"To display the webpage again, Internet explorer needs to resnd the Information you've previously submitted. If you were making a purchase ...blah blah
 
with Retry + Cancel buttons
 

if i use the below code instead,
 
top.location,href= top.location.href
 
i am not getting an error as explained above but it is navigating into fist tab( Request user)...
 
Tried all the option like
 
window.location.reload(), window.location.href( It is showing the URL of the POP up)... etc...
 
can u share ur thoughts as soon as possible..... plz...
Marin Bratanov
Telerik team
 answered on 07 Mar 2013
9 answers
371 views
Hello,

i've the problem with autosize radwindow, because whan i open radwindow you can see the scroolbar I would rather that not be seen.

this is the code of the web page that call radwindow:
<telerik:RadWindow ID="RadWindowCard" runat="server" AutoSize="True" IconUrl="/image/iconlogo.png"
    ReloadOnShow="True" NavigateUrl="publicard.aspx" Behaviors="Close" RestrictionZoneID="NavigateUrlZone"
    Height="100" Skin="Simple" VisibleStatusbar="False" Title="Caricamento biglietto da visita..."
    ShowContentDuringLoad="False" Width="300" Modal="true">
</telerik:RadWindow>

and code behind is:
Dim script As String = "function f(){$find(""" + RadWindowCard.ClientID + """).show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);"
ScriptManager.RegisterStartupScript(Me, Me.[GetType](), "key", script, True)

code behind
Dim script As String = "function f(){$find(""" + RadWindowCard.ClientID + """).show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);"
ScriptManager.RegisterStartupScript(Me, Me.[GetType](), "key", script, True)


this is the code web page that is load into radwindow:

<form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
        </asp:ScriptManager>
        <asp:HiddenField ID="contenitoredati" runat="server" />
        <telerik:RadFormDecorator ID="QsfFromDecorator" runat="server"
        DecoratedControls="Default, Textbox, Textarea, Label" Skin="Sunset" />
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
            DefaultLoadingPanelID="RadAjaxLoadingPanel1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="ImageButtonRicerca">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="Panel1"
                            LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadMenu1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1"
                            LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadNotification ID="RadNotification1" runat="server"
                   AutoCloseDelay="3500" Height="100px" Skin="Simple" Title="Trycontact"
                   TitleIcon="~/Image/iconlogo.png" Width="400px" Position="Center">
               </telerik:RadNotification>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server"
            Skin="Simple" BorderColor="#D5842B" BorderStyle="Double"
            HorizontalAlign="Center" BorderWidth="1px">
        </telerik:RadAjaxLoadingPanel>
        <telerik:RadWindowManager ID="RadWindow_Conferma" runat="server" Modal="True" Skin="Office2010Silver">
              <Windows>
                   <telerik:RadWindow ID="RadWindowAppuntamento" runat="server"
                      ShowContentDuringLoad="false" Width="527px" Height="450px" Title="Richiesta appuntamento" Behaviors="None"
                      Modal="True" IconUrl="/image/iconlogo.png" Behavior="None" Font-Names="Verdana" Font-Size="Small"
                      VisibleStatusbar="False" Skin="Simple" ReloadOnShow="True" NavigateUrl="appuntamento.aspx">
                    </telerik:RadWindow>
               </Windows>
        </telerik:RadWindowManager>                 
       <div class="profilebody">
       </div>  
    </form>

this is css code:
.profilebody
{
            background-image: url('/Image/banner.jpg');
            background-repeat: no-repeat;
            width: 1024px;
            height: 85px;
            text-align:center;
            font-family: Verdana;
            font-size: small;
            margin: 0px;
            border: 0px;
            position: static;
}


please to see the image posted: name image is immagine_new.jpg

Marin Bratanov
Telerik team
 answered on 07 Mar 2013
7 answers
153 views
Unless I'm doing something wrong or missing something, it doesn't seem as though your SPRadGrid web part works with SQL views.  I see any of the tables but not views.  We almost never expose a table but almost always use views to get the data we need, especially when working with SQL.

Plans to include views or maybe I'm really missing something here.
Tsvetoslav
Telerik team
 answered on 07 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?