Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
382 views
I have page that uses Raddocks; works properly in Internet Explorer and Firefox, but in Google Chrome everything is pushed to the left and there is no content. I've included a snapshot of what the screen looks like in Firefox (the content is deliberately blurred) and in Chrome. All content is dynamic, with a combination of Radgrids and Rotators.

Any suggestions? I've tried clearing the cache and refreshing in Chrome, but still the same. One user reported a similar problem in IE, but I haven't been able to reproduce that.
Jose
Top achievements
Rank 2
 answered on 01 Sep 2011
1 answer
89 views
Hi,

I am considering Telerik for a project that has to communicate with external WCF service. What is the best approach in terms of performance to bind data from the service to RadGrid? External web service provides methods like "List<Document> GetDocuments()".

Am I able to use direct "Client-Side Binding" as described at http://demos.telerik.com/aspnet-ajax/grid/examples/clientbinding/defaultcs.aspx or should I call the service and bind data "OnNeedDataSource"?

Thanks,

Igor
Radoslav
Telerik team
 answered on 01 Sep 2011
5 answers
142 views
Hi,
We have a page containing (among other things) a RadComboBox (for Equipment) and a user control. 

The user control is for "Location" and has several RadComboBoxes (Campus, Building, Floor, etc).  The location is selected through these RadComboBoxes.

Our issue is that when a server-side event (e.g. Click or SelectedIndexChanged) requests the selected location, the correct value is returned but when a clien-side event (e.g. OnItemsRequested or OnClientDropDownOpening) requests the selected location, what is returned is the values originally assigned to the Location RadComboBoxes, not the updated values which may have been subsequently selected.

Thanks for your help,
Dan Norton
Ivana
Telerik team
 answered on 01 Sep 2011
7 answers
283 views
Hi

Thanks for all your help so far.  I now have an 'ASP.NET AJAX Control Toolkit' modal popup from within which I am opening a Radwindow. This Radwindow  must appear above the modal popup with a preview URL.  The preview button triggers the following code behind, which works fine:

Protected Sub ButtonPreviewWindow_OnClick(ByVal sender As Object, ByVal e As System.EventArgs)
 
        'keep the modal popup showing
        ModalImagePopup01.Show()
 
        Dim sbScript As New System.Text.StringBuilder()
        Dim strNewURL As String = "http://www.bbc.co.uk"
 
        sbScript.Append("var oWnd = $find('" & RadWindowPreviewSite.ClientID & "');")
        sbScript.Append("oWnd.setUrl(""" & strNewURL & """);")
        sbScript.Append("oWnd.setActive(true);")
        sbScript.Append("oWnd.show();")
 
        ScriptManager.RegisterStartupScript(Page, Me.GetType(), "key", sbScript.ToString(), True)
 
    End Sub


Now I have many of these to trigger so I tried to move this code in to a class in my app_code folder:

Public Shared Sub RadWindow_ShowWindow_PreviewURL(ByVal RadWindow As RadWindow, ByVal strNewURL As String)
 
            Dim sbScript As New System.Text.StringBuilder()
             Dim page As Page = DirectCast(context.Handler, Page)
 
            sbScript.Append("var oWnd = $find('" & RadWindow.ClientID & "');")
            sbScript.Append("oWnd.setUrl("""" & strNewURL & """");")
            sbScript.Append("oWnd.setActive(true);")
            sbScript.Append("oWnd.show();")
 
            ScriptManager.RegisterStartupScript(page, GetType(Page), "key", sbScript.ToString(), True)
 
        End Sub

I call this using:

Protected Sub ButtonPreviewWindow_OnClick(ByVal sender As Object, ByVal e As System.EventArgs)
 
TelerikFunctionality.RadWindow_ShowWindow_PreviewURL(RadWindowPreviewSite, "http://www.bbc.co.uk")
 
End sub

However it doesn't open a new Radwindow - sometimes it does in Firefox for the first preview click (and then nothing after) - in other browsers nothing happens at all. 

Any ideas?

Thanks in advance.

Kevin
Marin Bratanov
Telerik team
 answered on 01 Sep 2011
3 answers
107 views
Hi,
I am using a radtreeview in my project, earlier it had a context menu ,i need to show/hide the context menu for some particular nodes.
My nodes are dynamically loading from DB.

I implementing a radtree context menu like below.

<telerik:RadTreeView ID="rtvHierarchy" runat="server"             
            OnNodeExpand="rtvhierarchy_NodeExpand" MultipleSelect="True" Skin="Vista" 
            EnableDragAndDrop="True" OnNodeDrop="hierarchy_NodeDrop" 
            AllowNodeEditing="True" 
            BeforeClientContextMenu= "ShowContext"
            OnContextMenuItemClick="rtvhierarchy_ContextMenuItemClick" 
                        OnNodeEdit="rtvhierarchy_NodeEdit" 
            Font-Names="Arial,Times New Roman,Microsoft Sans Serif" 
            Font-Size="X-Small" Height="522px">
        <ContextMenus>
                    <telerik:RadTreeViewContextMenu Skin="Outlook" ID="MainContextMenu" runat="server">
                        <Items>
                            <telerik:RadMenuItem Value="New" Text="Create New Value" runat="server"></telerik:RadMenuItem>
                            <telerik:RadMenuItem Value="Rename" Text="Rename Node" runat="server"></telerik:RadMenuItem>  
                            <telerik:RadMenuItem Value="Cut" Text="Cut" runat="server"></telerik:RadMenuItem>
                            <telerik:RadMenuItem Value="Paste" Text="Paste" runat="server"></telerik:RadMenuItem>                           
                        </Items>
                        <CollapseAnimation Duration="200" Type="OutQuint" />
                    </telerik:RadTreeViewContextMenu>                                    
         </ContextMenus>         
        </telerik:RadTreeView>

I want to enable "Create New Value" and "Rename Node" on node level and Cut and Paste is on item level, i try to implement this like below,

BeforeClientContextMenu= "ShowContext" is a event which will fire before the context menu loads.

function ShowContext(node, e) {

       

             if (node.Category == "item")

            {

                var menuItem = MainContextMenu.FindItemByText("Create New Value");

                menuItem.Disable();

                var menuItem1 = MainContextMenu.FindItemByText("Rename Node");

                menuItem1.Disable();

            }

             else

            {

                var menuItem = MainContextMenu.FindItemByText("Cut");

                menuItem.Disable();

                var menuItem1 = MainContextMenu.FindItemByText("Paste");

                menuItem1.Disable();

            }

             return false;

        }
 
 The problem is the BeforeClientContextMenu is not firing the "ShowContext" function.

Please help me.

Note: I am only refereing the teleric.web.UI dll in my project solution, i am not installed telerik it in my machine.

Regards,
Xavier
 
Plamen
Telerik team
 answered on 01 Sep 2011
1 answer
81 views
What's the correct way to deal with timezones? We tried to add an appointment at 10:00 but in the schedule it appeared at 08:00. We assume this is due to Sweden being GMT +1 and also in summertime (another +1).
Shinu
Top achievements
Rank 2
 answered on 01 Sep 2011
1 answer
88 views
Hello,

I have a RadGrid with three columns: 
one gridBoundColumn with User Names;
two gridTemplateColumns with RadGrids showing things like Clients associated to that user


The problem is: When I filter the main RadGrid, the column with User Names get filtered correctly, but the gridTemplateColumns doesnt change, what means that it remains showing the same Clients of the user that was in that row before the filter be applied.


I need a way to change internal RadGrids accordingly to the user that is appearing when filtering.

Thanks in advance.


<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <telerik:RadAjaxManager ID="RadAjaxManager2" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="rgUsers">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgUsers" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadWindowManager" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="ModalEditCreateUser">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgUsers" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="rbtnCreateUser">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadWindowManager" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="rtxtSearchUser">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgUsers" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <div style="width: 80%; margin-left: 40px">
        <table style="width: 90%; margin-left: 20px; margin-right: 100px; float: right">
            <tr>
                <td>
                    <br />
                </td>
            </tr>
            <tr>
                <td style="float: left; width: 55%">
                    <asp:Label ID="Label1" runat="server" Text="usuários" Font-Size="Large">
                    </asp:Label>
                </td>
                <td style="width: 15%">
                    <telerik:RadComboBox ID="rcmbSortUsers" runat="server" EmptyMessage="ordenar usuários por...">
                    </telerik:RadComboBox>
                </td>
                <td style="width: 15%">
                    <telerik:RadTextBox ID="rtxtSearchUser" runat="server" EmptyMessage="procurar usuário"
                        ClientEvents-OnKeyPress="pesquisar">
                    </telerik:RadTextBox>
<%--                    <asp:Button ID="btn" runat="server" Text="Pesquisar" OnClientClick="search(this, event);">
                    </asp:Button>--%>
                </td>
                <td style="width: 15%;">
                    <telerik:RadButton ID="rbtnCreateUser" Text="criar novo usuário.." runat="server"
                        Skin="Web20" AutoPostBack="true" OnClick="rbtnCreateUser_Click">
                    </telerik:RadButton>
                </td>
            </tr>
            <tr>
                <td>
                    <br />
                </td>
            </tr>
            <tr>
                <td colspan="4">
                    <telerik:RadGrid ID="rgUsers" runat="server" AutoGenerateColumns="false" EnableEmbeddedSkins="false"
                        Skin="GridPrincipal" ItemStyle-Width="50%" AllowFilteringByColumn="true" OnItemDataBound="rgUsers_ItemDataBound"
                        OnItemCommand="rgUsers_ItemCommand" OnDeleteCommand="rgUsers_DeleteCommand">
                        <MasterTableView DataKeyNames="IdUser" HeaderStyle-Font-Size="Medium" HeaderStyle-Height="30px">
                            <Columns>
                                <telerik:GridBoundColumn UniqueName="UserName" HeaderText="usuários cadastrados"
                                    DataField="UserName" ItemStyle-Width="30%" ItemStyle-CssClass="nomeusuario">
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn ItemStyle-VerticalAlign="Top" UniqueName="PerfilColumn" AllowFiltering="true"
                                    HeaderText="perfis assoc." ItemStyle-Width="32%">
                                    <ItemTemplate>
                                        <telerik:RadGrid ID="rgPerfis" runat="server" AllowFilteringByColumn="true" AutoGenerateColumns="false" Skin="GridInterna"
                                            EnableEmbeddedSkins="false" OnDeleteCommand="rgPerfis_DeleteCommand">
                                            <MasterTableView ShowHeader="false" DataKeyNames="IdPerfil" NoMasterRecordsText="Nenhum perfil associado">
                                                <Columns>
                                                    <telerik:GridButtonColumn UniqueName="btnDesassociarPerfil" ButtonType="ImageButton"
                                                        CommandName="Delete" Text="Desassociar perfil" ItemStyle-HorizontalAlign="Center"
                                                        ImageUrl="~/Images/ico-mini-fechar.png" ItemStyle-Width="5%">
                                                    </telerik:GridButtonColumn>
                                                    <telerik:GridBoundColumn UniqueName="Descricao" DataField="Descricao" ItemStyle-CssClass="perfis"
                                                        ItemStyle-Width="95%">
                                                    </telerik:GridBoundColumn>
                                                </Columns>
                                            </MasterTableView>
                                        </telerik:RadGrid>
                                        <telerik:RadButton ID="btnAssociarPerfil" runat="server" Text="associar" ButtonType="LinkButton"
                                            ToolTip="Associar usuário a um perfil" Font-Bold="true" Style="margin-left: 20px;
                                            border: none;">
                                            <Icon PrimaryIconUrl="~/Images/ico-associar.png" PrimaryIconLeft="6" PrimaryIconTop="6" />
                                        </telerik:RadButton>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn ItemStyle-VerticalAlign="Top" UniqueName="ClienteColumn"
                                    HeaderText="filiais e clientes assoc." ItemStyle-Width="32%" DataField="IdUser">
                                    <ItemTemplate>
                                        <telerik:RadGrid ID="rgClientes" runat="server" AutoGenerateColumns="false" Skin="GridInterna"
                                            EnableEmbeddedSkins="false" OnDeleteCommand="rgClientes_DeleteCommand">
                                            <MasterTableView ShowHeader="false" DataKeyNames="IdClienteUsuario, IdFilial, IdUser"
                                                NoMasterRecordsText="Nenhum cliente associado">
                                                <Columns>
                                                    <telerik:GridButtonColumn UniqueName="btnDesassociarCliente" ButtonType="ImageButton"
                                                        CommandName="Delete" Text="Desassociar cliente" ItemStyle-HorizontalAlign="Center"
                                                        ImageUrl="~/Images/ico-mini-fechar.png" ItemStyle-Width="5%">
                                                    </telerik:GridButtonColumn>
                                                    <telerik:GridBoundColumn UniqueName="FilialCodCliente" DataField="FilialCodCliente">
                                                    </telerik:GridBoundColumn>
                                                </Columns>
                                            </MasterTableView>
                                        </telerik:RadGrid>
                                        <telerik:RadButton ID="btnAssociarCliente" runat="server" Text="associar" ButtonType="LinkButton"
                                            ToolTip="Associar usuário a um cliente" Font-Bold="true" Style="margin-left: 20px;
                                            border: none;">
                                            <Icon PrimaryIconUrl="~/Images/ico-associar.png" PrimaryIconLeft="6" PrimaryIconTop="6" />
                                        </telerik:RadButton>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridButtonColumn UniqueName="EditarColumn" HeaderText="" Text="Editar usuário"
                                    ButtonType="ImageButton" CommandName="Editar" ImageUrl="/Images/ico-editar.png"
                                    ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Right">
                                </telerik:GridButtonColumn>
                                <telerik:GridButtonColumn UniqueName="ApagarColumn" HeaderText="" Text="Excluir usuário"
                                    ButtonType="ImageButton" CommandName="Delete" ImageUrl="/Images/ico-apagar.png"
                                    ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Right">
                                </telerik:GridButtonColumn>
                            </Columns>
                        </MasterTableView>
                    </telerik:RadGrid>
                    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
                        <Windows>
                            <telerik:RadWindow ID="RadWindow1" Behaviors="Close" runat="server" ReloadOnShow="true"
                                VisibleStatusbar="false" VisibleTitlebar="false" Height="50px" Width="100px"
                                OnClientClose="OnClientclose" NavigateUrl="/Views/Cadastros/CadastroUsuario.aspx"
                                Modal="true" BackColor="Gray">
                            </telerik:RadWindow>
                        </Windows>
                    </telerik:RadWindowManager>
                </td>
            </tr>
        </table>
    </div>
    <telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">
        <script type="text/javascript">
 
            //$find('<%=rgUsers.ClientID %>').get_masterTableView().hideFilterItem();
            function pageLoad(sender, args) {
                $find('<%=rgUsers.ClientID %>').get_masterTableView().hideFilterItem();
            }
 
            //Função responsável por abrir a Modal com os campos para criar um novo usuário
            function AbrirModal() {
                debugger;
                var oWnd = window.radopen('/Views/Cadastros/CadastroUsuario.aspx?id=-1', "ModalEditCreateUser");
            }
 
            function OnClientclose(radWindow, args) {
                debugger;
                var arg = args.get_argument();
                var ret = arg.retorno;
 
                if (ret != 0) {
                    window.location.href = "/Views/Sistema/Usuarios.aspx";
                }
            }
 
            function pesquisar(event, args) {
                debugger;
                if (args.get_keyCode() == 13) {
                    args.set_cancel(true);
                }
                setTimeout(filtrarGrid, 100);
            }
 
            function filtrarGrid() {
                var masterTableView = $find("<%=rgUsers.ClientID%>").get_masterTableView();
                var textbox = $find("<%=rtxtSearchUser.ClientID%>"); // document.getElementById("rtxtSearchUser.ClientID");
                masterTableView.filter('PerfilColumn', textbox.get_value(), Telerik.Web.UI.GridFilterFunction.Contains);
            }
        </script>
    </telerik:RadScriptBlock>
</asp:Content>
Radoslav
Telerik team
 answered on 01 Sep 2011
3 answers
39 views
Hello:

We're using a radajaxloadingpanel to display a progress indicator when a user conducts a rebind of a radgrid based on some selections from a drop down menu.

When the user clicks the linkbutton after the initial page load, the postback fires, the ajaxloadingpanel displays and the grid is updated.  On all subsequent postbacks, while the grid is updated properly, the loading panel stops displaying the loading gif.

Has anyone experienced this?  Is there a workaround?

Thanks for any help you can provide.

Brad
Iana Tsolova
Telerik team
 answered on 01 Sep 2011
8 answers
139 views
Hi

Sorry but must say that i find documentation not very useful for simpler tasks.  its becomes quite frustating.

Following is my table created to store appointments.    DataSourceID is set to "SqlDataSource1"
Now inside RadScheduler1_AppointmentInsert event,  through code I want to add values for columns Importance and Loginid
How can i access Row that is about to get inserted ?

Regards

CREATE TABLE [dbo].[TaskSchedules](
 [keyid] bigint NOT NULL PRIMARY KEY Identity,
 [StartTime] [datetime] NULL,
 [EndTime] [datetime] NULL,
 [Subject] [nvarchar](max) NULL,
 [Description] [nvarchar](max) NULL,
 [Reminders] [nvarchar](max) NULL,
 [Recurrence] [nvarchar](max) NULL,
 [RecurrenceParentKey] bigint NULL 
 [Importance] [nvarchar](2) NULL,
 [LoginId]   [nvarchar](30) NOT NULL
)
Veronica
Telerik team
 answered on 01 Sep 2011
1 answer
68 views

Hi guys,
I have a following Radgrid:

 

 

<telerik:RadGrid ID="PrnPSRejectedGrid" runat="server" GridLines="None" OnExcelMLExportRowCreated="PrnPSRejectedGrid_ExcelMLExportRowCreated" OnExcelMLExportStylesCreated="PrnPSRejectedGrid_ExcelMLExportStylesCreated" OnItemCreated="PrnPSRejectedGrid_ItemCreated" OnNeedDataSource="PrnPSRejectedGrid_NeedDataSource" OnPdfExporting="PrnPSRejectedGrid_PdfExporting" OnSortCommand="PrnPSRejectedGrid_SortCommand">

 

 

 

 

 

 

<ExportSettings FileName="PrnPSRejectReport" OpenInNewWindow="true" IgnorePaging="true" ExportOnlyData="true">

 

 

 

 

 

 

<Excel Format="ExcelML" FileExtension="xls"/>

 

 

 

 

 

 

<Pdf FontType="Subset" PaperSize="letter" />

 

 

 

 

 

 

</ExportSettings>

 

 

 

 

 

 

<MasterTableView AutoGenerateColumns="false" >

 

 

 

 

 

 

 

<RowIndicatorColumn>

 

 

 

 

 

 

<HeaderStyle Width="10px" />

 

 

 

 

 

 

</RowIndicatorColumn>

 

 

 

 

 

 

<ExpandCollapseColumn>

 

 

 

 

 

 

<HeaderStyle Width="10px" />

 

 

 

 

 

 

</ExpandCollapseColumn>

 

 

 

 

 

 

 

<Columns>

 

 

 

 

 

 

<telerik:GridBoundColumn HeaderText="TrkNo" DataField="TRKNO" UniqueName="TRKNO" ReadOnly="True" SortExpression="TRKNO" HeaderButtonType="TextButton">

 

 

 

 

 

 

<HeaderStyle Width="1px" />

 

 

 

 

 

 

<ItemStyle Width="1px" />

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

<telerik:GridBoundColumn HeaderText="Rejected Reason Description" DataField="RRSNDESC" UniqueName="RRSNDESC" ReadOnly="True" SortExpression="RRSNDESC" HeaderButtonType="TextButton" >

 

 

 

 

 

 

<HeaderStyle Width="200px" />

 

 

 

 

 

 

<ItemStyle Width="200px" />

 

 

 

 

 

 

</telerik:GridBoundColumn>

 


Column Rejected Reason Description could have a data up to 250 characters.When I run on my local machine settings is fine.But
when I am running on different machine instead of putting description on entire line its just use have of the line(for example):

 The principal did not meet the
 criteria in the posting and
 other eligible  titles
 have not declined the 
 request.

The grid should have a format like that:
The principal did not meet the criteria in the posting and other eligible titles have not declined the request.
It should use entire column for texting.

Thanks so much for your help.
 
Shinu
Top achievements
Rank 2
 answered on 01 Sep 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?