Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
68 views

Hi experts,

I am using the RadAjaxManager the first time and is not working as expected (described: http://www.telerik.com/help/aspnet-ajax/ajax-ajaxmanager.html)

Environment:

  • Dot Net Nuke 6.0
  • The user controll is inhereiting from a base class that nothidg to do with Ajax (just some helping utilities)

Two asp:Panels:

  • panTable: Containing RadGrid where the customers are listed
  • panDetails: Containing different controls where customer details are (will be) displayed

Ajaxifying goals:

  1. panTable is ajaxifyed for sorting, filtering …
  2. panDetails ajaxifyed in order to add components in runtime…
  3. performance:
    1. when a line in panTable is clicked (selected) I write the customerID in a hidden field in  panTable “hdId” and trigger it with JavaScript ($(".updateTriger").trigger('click');)
    2. I am going to trigger panTable reload by btnSave (panDetails) in case the Customer name is changed.

Problem :

When the line in the grid is clicked, both panDetails AND panTable are triggered.

Can you find an error in my code? Do you have a better solution to achieve the goals above?

Thanks,

Kristijan

Code:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CustomersView.ascx.cs"
    Inherits="Vits.Modules.VipCrm.Controls.CustomersView" %>
<%@ Register TagPrefix="dnn" TagName="Label" Src="~/controls/LabelControl.ascx" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="panTable">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="panTable" LoadingPanelID="ralPanel" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="panDetails">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="panDetails" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadSplitter ID="RadSplitter1" runat="server" Width="100%">
    <telerik:RadPane ID="rpTable" runat="server">
        <asp:Panel ID="panTable" runat="server">
            <asp:ImageButton ID="imgAdd" ImageUrl="~/images/add.gif" runat="server" />
            <asp:LinkButton ID="lnkAddCustomer" CssClass="CommandButton" runat="server" resourcekey="lnkAddCustomer"
                Text="lnkAddCustomer" />
            <telerik:RadGrid ID="rgvMain" runat="server" OnInit="LocalizeRagGridHeader" DataSourceID="gridData">
                <MasterTableView DataKeyNames="Id" AutoGenerateColumns="false" AllowFilteringByColumn="True"
                    AllowSorting="True" TableLayout="Auto" CssClass="VitsSelectable" OverrideDataSourceControlSorting="true">
                    <Columns>
                        <telerik:GridBoundColumn DataField="Id" DataType="System.Int32" ItemStyle-CssClass="VitsId HiddenA"
                            HeaderStyle-CssClass="HiddenA" SortExpression="Id" />
                        <telerik:GridBoundColumn DataField="Name" HeaderText="Name" SortExpression="Name"
                            DataType="System.String" UniqueName="Name" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true"
                            FilterControlWidth="100%" ShowFilterIcon="false" />
                    </Columns>
                    <SortExpressions>
                        <telerik:GridSortExpression FieldName="Name" SortOrder="Ascending" />
                    </SortExpressions>
                </MasterTableView>
                <FilterMenu EnableImageSprites="False" />
                <GroupingSettings CaseSensitive="false" />
            </telerik:RadGrid>
            <asp:ObjectDataSource ID="gridData" runat="server" TypeName="Vits.Modules.VipCrm.Dal.DaoCustomers"
                SelectMethod="GetAll" />
        </asp:Panel>
    </telerik:RadPane>
    <telerik:RadSplitBar ID="spliteBar" runat="server" CollapseMode="Forward" />
    <telerik:RadPane ID="rpDetails" runat="server">
        <telerik:RadAjaxPanel ID="raxDetails" runat="server">
            <asp:Panel ID="panDetails" runat="server" OnLoad="panDetails_Load">
                <div class="divDetails">
                    <a href="#" class="updateTriger" onclick="__doPostBack('<%= panDetails.ClientID %>', '');">
                    </a>
                    <asp:HiddenField ID="hdCmd" runat="server" />
                    <asp:HiddenField ID="hdId" runat="server" />
                    <table>
                        <tr>
                            <td>
                                <dnn:Label id="lblName" runat="server" controlname="lblName" />
                            </td>
                            <td>
                                <asp:TextBox ID="txtName" CssClass="NormalTextBox" runat="server" />
                            </td>
                        </tr>
                    </table>
                    <asp:Repeater ID="rptCustomerAccess" runat="server">
                        <HeaderTemplate>
                            <table>
                                <tr>
                                    <th>
                                        <dnn:Label id="lblUserName" runat="server" controlname="lblUserName" />
                                    </th>
                                    <th>
                                        <dnn:Label id="lblHasAccess" runat="server" controlname="lblHasAccess" />
                                    </th>
                                </tr>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr>
                                </td>
                                <td>
                                    <asp:HiddenField ID="hdUserId" runat="server" Value='<%#Eval("UserId")%>' />
                                    <asp:Label ID="lblLastName" runat="server" Text='<%#Eval("LastName")%>' />
                                    <asp:Label ID="lblFirstName" runat="server" Text='<%#Eval("FirstName")%>' />
                                    -
                                    <asp:Label ID="lblDisplayName" runat="server" Text='<%#Eval("DisplayName")%>' />
                                </td>
                                <td>
                                    <asp:CheckBox ID="cbxHasAccess" Checked='<%#Eval("HasAccess")%>' runat="server" />
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                            </table>
                        </FooterTemplate>
                    </asp:Repeater>
                    <table id="commands">
                        <tr>
                            <td>
                                <telerik:RadButton ID="btnSave" CssClass="CommandButton" runat="server" resourcekey="btnSave"
                                    OnClick="btnSave_Click" Text="btnSave" />
                            </td>
                            <td>
                                <telerik:RadButton ID="btnCancel" CssClass="CommandButton" runat="server" resourcekey="btnCancel"
                                    OnClick="btnCancel_Click" Text="btnCancel" />
                            </td>
                        </tr>
                    </table>
                </div>
            </asp:Panel>
        </telerik:RadAjaxPanel>
    </telerik:RadPane>
</telerik:RadSplitter>
using System;
using Vits.Modules.VipCrm.Dal;
using Vits.Modules.VipCrm.Ui;
 
namespace Vits.Modules.VipCrm.Controls
{
    public partial class CustomersView : VitsModuleBase
    {
        public override void LoadContent()
        {
 
        }
 
        protected void btnCancel_Click(Object sender, EventArgs e)
        {
          
        }
 
        protected void btnSave_Click(Object sender, EventArgs e)
        {
 
        }
 
        protected void panDetails_Load(object sender, EventArgs e)
        {
            if ("ViewCMD" != hdCmd.Value)
                return;
 
            int id;
            if (!int.TryParse(hdId.Value, out id))
                id = DaoCountries.ID_NONE;
 
            LoadDetails(id.ToString());
        }
 
        private void LoadDetails(string textId)
        {
            int id;
 
            if (!int.TryParse(textId, out id))
            {
                id = -2;//Something wrong!
            }
 
            hdId.Value = id.ToString();
            if (DaoCustomers.ID_NONE == id)
                txtName.Text = string.Empty;
            else
            {
                Customer customer = DaoCustomers.Instance.Get(id);
                txtName.Text = customer.Name;
            }
 
            rptCustomerAccess.DataSource = DaoCustomers.Instance.GetCustomerAccess(PortalId, id);
            rptCustomerAccess.DataBind();
        }
 
    }
}

Kristijan
Top achievements
Rank 1
 answered on 21 Jul 2011
1 answer
35 views
hello admin:

when I add a client node use the script
function addNode()
 var node = new Telerik.Web.UI.RadTreeNode();
 node.set_text(nodeText);

 we can add a node with text

how to add a node with image

 node.set_img(nodeText); ????? or other methods ???

thanks
 
Plamen
Telerik team
 answered on 21 Jul 2011
1 answer
397 views
Is there a global way that I can add some padding (5px or so) to the left and right side of all buttons that I put in the RibbonBarTabs? The buttons kind of merge together as they are.
Kate
Telerik team
 answered on 21 Jul 2011
1 answer
181 views
Hello Telerik Team,
Great control RadImageEditor!
I would like to use a ImageURL like "http:// ..." because my images are on another server. I don't want to edit the images, but just want to use the rotate and zoom functions, they are great!
As I understand it is now not possible to use such an ImageUrl?

gr Martin
Slav
Telerik team
 answered on 21 Jul 2011
1 answer
128 views
I've got a radgrid, with a filter setup like so

myGrid = new RadGrid();
myGrid.ID = "ClientBoundGrid";
myGrid.Culture = new System.Globalization.CultureInfo("en-GB");
//...initialise rest of grid
myGridRadFilter = new RadFilter
{
    ID = "myGridFilter",
    FilterContainerID = "ClientBoundGrid",
    Culture = new System.Globalization.CultureInfo("en-GB")
};
 
myGridRadFilter.ApplyExpressions += new EventHandler<RadFilterApplyExpressionsEventArgs>(myGrid_Filter_Apply);

When I add a filter to the on a date column type, I'd expect the date to be in the format appropriate for the culture I use. (DD/MM/YYYY in this case). However when a date is either typed, or selected from the calender popup, it formats itself to the default en-US format (MM/DD/YYYY). Have I missed a step?

On a slightly related question, is it possible to modify the radfilter object to remove the calender and/or time popups from appearing?
Daniel
Telerik team
 answered on 21 Jul 2011
0 answers
81 views

I applied suggested settings(Excel-fromat="HTML",Exportonlydata="true") by Princy but I could not see any difference and I'm getting same thing which I have sent you screenshot.

Prasad.
Prasad
Top achievements
Rank 1
 asked on 21 Jul 2011
2 answers
65 views
1)I have done my hirarchy grid export excel functionality but it is showing button types (Hirarchy simbles) left side as mentioned in the screenshot.

Suggest me how to overcome above one.

2)The content (rows) of exported excel file data cannot be understood by user means that is not showing properly, is there any property to set to show columns and rows data properly.

Advance Thanks.
Prasad
Top achievements
Rank 1
 answered on 21 Jul 2011
5 answers
74 views
I am currently evaluating the controls, especially the RadViewTree, I was just recommending them to my manager when he reminded me to test behind our Alteon server.  This has thrown up a lot of problems with the controls not working correctly. 

For example when I click on the expand symbol nothing happens.

Can anyone help me.
Nikolay Tsenkov
Telerik team
 answered on 21 Jul 2011
4 answers
65 views
Dear Support,

I have grouping enabled server-side. In the attached image you see that my grid is grouped by 2 columns: Status and Priority.  I don't want the "Status" label to be visible in my group header, but the problem is that if I set 
gridGroupByField.HeaderText = " ";

then the group panel header shows up as empty.  All my groups are dynamically defined, so I don't know ahead of time which will want the column name to show up and which won't.  Is there a way for me to set the GroupPanel header values?
Dasha
Top achievements
Rank 1
 answered on 21 Jul 2011
1 answer
50 views
Hi,

I want to display browse button as a hyper link. Is this possible to changes button to hyper link.

Please suggest.
Regards,
Reyaz


Dimitar Terziev
Telerik team
 answered on 21 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?