Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
74 views
Hi
I have an ajaxified page by RadAjaxManager , and jquery is enabled too.
on the onLoad event of jquery I want to find a reference to a RadButton :
            $(document).ready(function () {                
                var btn = $find("<%= btnAdminRibbonBar_SH.ClientID %>"); /* find button*/
                alert(btn.get_primaryIconElement());
            });

but I get a null reference
it seems that in this event RadButton is not loaded yet
is there any same event belong to telerik  ajax framework to use  (RadAjaxManager just have 2 client side event  )?

Thank you very much , for your feedback
reza
Top achievements
Rank 1
 answered on 26 Oct 2011
6 answers
539 views
Is it possible to loop thru all the columns in a grid and get all the column names, and allocate those columns with empty header name, and hide from grid.

kenneth
Top achievements
Rank 1
 answered on 26 Oct 2011
7 answers
117 views
Hi Everybody - I have taken over a project that used the Telerik controls from 2008 and I just ran the upgrade wizard and now I am gitting a bunch of $telerik is not defined errors and non of the RadWindows are working

can someone point me in a direction to get started? I'm really new to Telerik controls too :)

Thanks
Jamie
Iana Tsolova
Telerik team
 answered on 26 Oct 2011
2 answers
171 views

Hi everyone,

It is possible to create a button in the same kind of "save as" ? In fact, in want a button that, once clicked, will open a radWindow that will allow the client to choose a path and will return the path once closed (Just the path, without the name of the file. Ex : C:\User\Joblo\Desktop\). It this any tool that can allow such a thing ?

Thank you,

David 

David
Top achievements
Rank 1
 answered on 26 Oct 2011
4 answers
82 views
Contractions like "doesn't" are assumed to be mispelled by the editor's spell check.  Is there anyway to fix this?
Travis
Top achievements
Rank 1
 answered on 26 Oct 2011
3 answers
99 views
Hi,

I have a problem with the ImageMap when using the RadAjaxManager control.
I'm setting the width and height of the ImageMap using the RadAjaxManager control (within a radwindow control), and by doing that, the post back from ImageMap is not being caught by RadAjaxManager. All I try to do is to close the radwindow control and to navigate to another page.

My ImageMap control:
<asp:ImageMap ID="EntarnceImage" hotspotmode="PostBack"
            onclick="RegionMap_Clicked" runat="server" >
        </asp:ImageMap>

protected void RegionMap_Clicked(Object sender, ImageMapEventArgs e)
    {
        excuteWindowClose.Text = "<script type='text/javascript'>CloseAndNavigate('../../HomePage.aspx')</" + "script>";
    }
:
By the way, If I setting the width and height of the ImageMap in other ways without using the RadAjaxManger, then the RegionMap_Clicked event will be fired.

Please, I need your help and explaination in order to solve the above problem.

Regards,
Bader
Vasil
Telerik team
 answered on 26 Oct 2011
8 answers
162 views
I am attempting to add a column with Delete links to delete the associated row. I have tried AutoGenerateDeleteColumn="true" in the RadGrid statement, as well as, AutoGenerateDeleteColumn="false" while adding a GridBoundColumn as follows:

<telerik:GridButtonColumn CommandName="Delete" Text="Delete">
</telerik:GridButtonColumn>

I have another project where it work fine. The complete code follows:

<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="GroupMaintenance.ascx.vb"
    Inherits="abc.GroupMaintenance" %>
<%@ Register Assembly="Telerik.OpenAccess.Web, Version=2011.2.713.3, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342"
    Namespace="Telerik.OpenAccess" TagPrefix="telerik" %>
<div>
    <div>
        <h2>
            Group Maintenance
        </h2>
        <p id="divMsgs" runat="server">
            <asp:Label ID="Label1" runat="server" EnableViewState="False" Font-Bold="True" ForeColor="#FF8080"></asp:Label>
            <asp:Label ID="Label2" runat="server" EnableViewState="False" Font-Bold="True" ForeColor="#00C000"></asp:Label>
        </p>
    </div>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function ShowGroupMaintEditForm(id, rowIndex) {
                var grid = $find("<%= RadGridGroupMaint.ClientID %>");
 
                var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();
                grid.get_masterTableView().selectItem(rowControl, true);
 
                window.radopen("GroupMaintenanceEdit.aspx?ListId=" + id, "GroupMaintDialog");
                return false;
            }
            function ShowGroupMaintInsertForm() {
                window.radopen("GroupMaintenanceEdit.aspx", "GroupMaintDialog");
                return false;
            }
            function refreshGroupMainGrid(arg) {
                if (!arg) {
                    $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("Rebind");
                }
                else {
                    $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("RebindAndNavigate");
                }
            }
        </script>
    </telerik:RadCodeBlock>
    <telerik:RadGrid ID="RadGridGroupMaint" runat="server" Skin="Office2007"
        AllowPaging="True" Width="100%" OnItemCreated="RadGridGroupMaint_ItemCreated"
        DataSourceID="SqlDataSource_List" AllowAutomaticDeletes="True"
        AutoGenerateDeleteColumn="False" 
        CellSpacing="0" GridLines="None" Font-Size="7px" PageSize="20"
        OnItemCommand="RadGridGroupMaint_ItemCommand"
        OnItemDataBound="RadGridGroupMaint_ItemDataBound"
        ShowStatusBar="True"
        AutoGenerateColumns="False">
        <PagerStyle Mode="NumericPages" />
        <MasterTableView
            AutoGenerateColumns="false"
            DataKeyNames="ListId"
            Width="100%"
            CommandItemDisplay="Top"
            PageSize="16">
            <Columns>
                <telerik:GridTemplateColumn
                    UniqueName="TemplateEditColumn">
                    <ItemTemplate>
                        <asp:HyperLink ID="EditLink"
                                       runat="server"
                                       Text="Edit">
                        </asp:HyperLink>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>              
                <telerik:GridBoundColumn
                    DataField="ListCode"
                    HeaderText="List Code"
                    ReadOnly="true"
                    SortExpression="ListCode"
                    UniqueName="ListCode">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn
                    DataField="Name"
                    HeaderText="Name"
                    SortExpression="Name"
                    UniqueName="Name">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn
                    DataField="Description"
                    HeaderText="Description"
                    SortExpression="Description"
                    UniqueName="Description">
                </telerik:GridBoundColumn>
                <telerik:GridDropDownColumn
                    DataField="ListType"
                    DataSourceID="SqlDataSource_ListType"
                    HeaderText="List Type"
                    ListTextField="Description"
                    ListValueField="ListType"
                    UniqueName="ListType"
                    DropDownControlType="DropDownList">
                </telerik:GridDropDownColumn>              
                <telerik:GridBoundColumn
                    DataField="EffectiveDate"
                    HeaderText="Effective Date"
                    SortExpression="EffectiveDate"
                    UniqueName="EffectiveDate"
                    DataFormatString="{0:d}">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn
                    DataField="ExpirationDate"
                    HeaderText="Expiration Date"
                    SortExpression="ExpirationDate"
                    UniqueName="ExpirationDate"
                    DataFormatString="{0:d}">
                </telerik:GridBoundColumn>
                <telerik:GridDropDownColumn
                    DataField="ParentListId"
                    DataSourceID="SqlDataSource_ListID"
                    HeaderText="Parent List"
                    ListTextField="Description"
                    ListValueField="ListId"
                    UniqueName="ListId"
                    DropDownControlType="DropDownList">
                </telerik:GridDropDownColumn>              
                <telerik:GridBoundColumn
                    DataField="OwnerId"
                    HeaderText="Owner Id"
                    SortExpression="OwnerId"
                    UniqueName="OwnerId">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn
                    DataField="WebAccessType"
                    HeaderText="Web Access Type"
                    SortExpression="WebAccessType"
                    UniqueName="WebAccessType">
                </telerik:GridBoundColumn>               
                <telerik:GridBoundColumn
                    DataField="MembersModifiedDate"
                    HeaderText="Members Modified Date"
                    SortExpression="MembersModifiedDate"
                    UniqueName="MembersModifiedDate"
                    DataFormatString="{0:d}">
                </telerik:GridBoundColumn>    
                 <telerik:GridButtonColumn CommandName="Delete" Text="Delete">
                </telerik:GridButtonColumn>                                               
            </Columns>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
            <CommandItemTemplate>
                <a href="#" onclick="return ShowGroupMaintInsertForm();">Add New Group</a>
            </CommandItemTemplate>
        </MasterTableView>
        <ClientSettings>
            <Selecting AllowRowSelect="true" />
        </ClientSettings>
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Office2007">
        </HeaderContextMenu>
    </telerik:RadGrid>
    <telerik:RadWindowManager
        ID="RadWindowManagerGroupMaint"
        runat="server"
        Skin="Office2007"
        Behaviors="Close,Move">
        <Windows>
            <telerik:RadWindow
                Skin="Office2007"
                ID="GroupMaintDialog"
                runat="server"
                Title="Group Maintenance"
                Height="730px"
                Width="590px"
                Left="150px"
                ReloadOnShow="true"
                Modal="true" />
        </Windows>
    </telerik:RadWindowManager>
    <asp:SqlDataSource
        ID="SqlDataSource_List"
        runat="server"
        ConnectionString="<%$ ConnectionStrings:myListConnectionString %>"
        SelectCommand="SELECT * FROM dev.myList ORDER BY [ListCode]"
        DeleteCommand="DELETE FROM dev.myList WHERE [ListID] = @ListID"> 
         <DeleteParameters>
            <asp:Parameter Name="ListID" Type="Int32" />
        </DeleteParameters>           
    </asp:SqlDataSource>   
     <asp:SqlDataSource
        ID="SqlDataSource_ListID"
        runat="server"
        ConnectionString="<%$ ConnectionStrings:myListIDConnectionString %>"
        SelectCommand="SELECT * FROM dev.myList ORDER BY [ListCode]"
        DeleteCommand="DELETE FROM dev.myList WHERE [ListID] = @ListID"> 
         <DeleteParameters>
            <asp:Parameter Name="ListID" Type="Int32" />
        </DeleteParameters>           
    </asp:SqlDataSource>   
</div>
<telerik:RadAjaxManagerProxy
    ID="RadAjaxManagerProxy1"
    runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGridGroupMaint">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGridGroupMaint" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="RadWindowManagerGroupMaint">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGridGroupMaint" />
                <telerik:AjaxUpdatedControl ControlID="RadWindowManagerGroupMaint" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>

In either case, the column appears, but there are no Delete links.

 I have tried every variation possible and every time the Delete links do not appear.

Your assistance would be greatly appreciated. Thank you.

Mira
Telerik team
 answered on 26 Oct 2011
2 answers
180 views
Hello,

I've got a problem with refresh requests in a heavy page with many user controls,
The page is made of ten user controls in which there is a xml control that load some xml data and in one of those controls( now i'm going to call this control Control_A) ,and in this one there is another user control ( Control_B), and within the last one control there is a button. This button(in Control_B) make a request  to a wcf service and get some xml data from this; the problem is here, this data has to be renderized in the control ( Control_B ) with a partial render,and the Control_A is refreshed to change the visual style, but when I click the button the postback don't start , now I list steps that took place hours after the click :
1 - Click the button
2 - Page_Load is fired (of the page not within the user controls)
3 - the page is not in postback, so all the requests for the creation of the page start(the page now should be in postback in theory), because I check that the page is not in postback in the page_load to know if I have to create or update the page
4 - the request made by the button click event handler is fired
5 - all the page is refreshed, so I lost all the xml data in the user controls opposed by the Control_B and Control_A which refrersh correctly.

So this is the schema of the page:
Page    

    RadScriptManager

        RadAjaxManager (with only the settings for the buttons in the page, e.g the button that prints a pdf file of the page) 
    RadAjaxLoadingPanel ( with a user control with the refresh image inside, as in the telerik samples)
    Control_A
        RadAjaxLoadingPanel 
        RadAjaxManagerProxy
        XmlControl

 

 

 

 

        Control_B(with the button)            
            RadAjaxLoadingPanel 
            RadAjaxManagerProxy 
 

 

 

 

 

 

                      XmlControl
                        Button
        UserControl
        UserControl
        UserControl,ecc..(other user controls)

when I click the Button inside Control_B all the user controls are refreshed and the postback isn't be setted to true, so the page is all recreated and the Initial requests are remaked(and this is not correct)

what can I do to refresh only control_A and Control_B?With which radajax configuration can I do what I want?

Maria Ilieva
Telerik team
 answered on 26 Oct 2011
1 answer
94 views
Hi,

I have to create multiple grids dynamically with dynamic columns.(Grid genereated at code behind C#). I have created columns in onInit event of radgrid.I have two buttons outside the grid which is used to display and hide columns when clicked on that. In this scenario when i click any of the button it should hide some columns and show other columns for eg (if i click the second button it should hide first 5 columns and show next 5 columns. Initially the first 5 columns only shown on load other 5 are hidden).

The whole grid was created and all the maniplations are done in an ASCX file. This Control file is referred and created multiple times as per the requirement.

This control works fine if it has created for only one time. But i get some problems when it created more than once.

The problem is when i click on the button the grid needdatasource function should not be called, since i am using private function to hide and show columns and no grid rebind method or any thing related to ribind is written. But the problem when i have two or more grids the grid needdatasource method is fired and then creates the loads some unrelavent data. Eg (Binds some other grid data to some other grid and viseversa)

Please help me in this regards.

Kannan
Maria Ilieva
Telerik team
 answered on 26 Oct 2011
1 answer
86 views
I've reviewed the examples on the site and it's all a bit over my head. 

I've got a table called 'hits' in my database that simply stores the id of the item the hit is related to (in this case a property) and the time of the hit. 

What i want to do is have the months along the x-axis of my chart, and the number of hits on the y-axis.

At the moment i'm returning these from my database in a List(Of hit) where hit is a custom class i've written to store the hit information.

Can someone talk me through, or direct me towards an example on how to achieve this. 

At the moment i've got something like this:

For Each obj_hit As hit In hits 
            If Month(hit.date_created) = 1 Then 'jan
  
            ElseIf Month(hit.date_created) = 2 Then 'feb
  
            ElseIf Month(hit.date_created) = 3 Then 'march
  
            ElseIf Month(hit.date_created) = 4 Then '..
  
            ElseIf Month(hit.date_created) = 5 Then
  
            ElseIf Month(hit.date_created) = 6 Then
  
            ElseIf Month(hit.date_created) = 7 Then
  
            ElseIf Month(hit.date_created) = 8 Then
  
            ElseIf Month(hit.date_created) = 9 Then
  
            ElseIf Month(hit.date_created) = 10 Then
  
            ElseIf Month(hit.date_created) = 11 Then
  
            ElseIf Month(hit.date_created) = 12 Then
  
            End If
Next
Evgenia
Telerik team
 answered on 26 Oct 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?