Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
177 views
my radgrid uses a WebUserControl for it's edit form.  All of a sudden the edit and add new record quit working.  and by quit working, i mean the editform does not open.  no errors of anykind...nothing!!!

it was working and i can't figure out for the life of me what could've changed...i've got other grid's that do the same thing that are still fine...tried to compare them but can't find anything...

can someone help please?
(aspx file)
<%@ Page Language="C#" MasterPageFile="~/Master/BlenderMaster.master" AutoEventWireup="true" 
    CodeFile="RefMDs.aspx.cs" Inherits="DevTools_RefMDs" Title="Ref MDs" ValidateRequest="false" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<%@ MasterType VirtualPath="~/Master/BlenderMaster.master" %> 
 
<script runat="server"
 
    public string RadGrid1PanelClientID; 
 
    protected void Page_Load(object sender, EventArgs e) 
    { 
        RadAjaxManager.GetCurrent(Page).AjaxSettingCreated += new RadAjaxControl.AjaxSettingCreatedDelegate(refmds_aspx_AjaxSettingCreated); 
    } 
 
    void refmds_aspx_AjaxSettingCreated(object sender, AjaxSettingCreatedEventArgs e) 
    { 
        if (e.Initiator.ID == "rgRefMDs") 
        { 
            this.RadGrid1PanelClientID = e.UpdatePanel.ClientID; 
        } 
 
    } 
 
     
</script> 
 
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
        <style type="text/css"
 
html 
    overflow:auto; 
 
html, 
body, 
form, 
#<%= RadGrid1PanelClientID %> 
    margin:0; 
    height:100%; 
 
.p{margin:0;padding:20px;font:12px/1.8 verdana,sans-serif} 
 
</style> 
    </telerik:RadCodeBlock> 
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server"
    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="rgRefMDs"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="rgRefMDs" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManagerProxy> 
    <telerik:RadSplitter ID="RadSplitter1" Width="100%" Height="100%" runat="server" 
        Orientation="Horizontal"
        <telerik:RadPane ID="gridPane" runat="server" Scrolling="None"
            <div id="PageTitleHeader"
                <h1> 
                    Ref MDs 
                </h1> 
            </div> 
            <div id="RadGridSearchHeader"
            NPI:<asp:TextBox ID="txtNPI" runat="server" /> 
            First:<asp:TextBox ID="txtFirst" runat="server" Class="PlainTextBox" Width="100" /> 
            Last:<asp:TextBox ID="txtLast" runat="server" Class="PlainTextBox" Width="100" /> 
            <asp:LinkButton ID="lnkSearch" CssClass="lnkIconButton Edit" runat="server" Text="Search" OnClick="lnkSearch_Click" /> 
            <asp:LinkButton ID="lnkReset" CssClass="lnkIconButton Reset" runat="server" Text="Reset" OnClick="lnkReset_Click" /> 
            </div> 
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" 
                Width="75px" Transparency="25"
                <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
                    style="border: 0;" /> 
            </telerik:RadAjaxLoadingPanel> 
            <telerik:RadGrid ID="rgRefMDs" Skin="WebBlue" GridLines="None" runat="server" AllowAutomaticDeletes="False" 
                AllowAutomaticInserts="False" Height="97%" Width="100%" AllowAutomaticUpdates="False" 
                AllowPaging="False" AutoGenerateColumns="False" AllowFilteringByColumn="true" 
                AllowSorting="true" OnNeedDataSource="rgRefMds_NeedDataSource" OnUpdateCommand="rgRefMds_UpdateCommand" 
                OnItemDataBound="rgRefMds_ItemDataBound" onitemcommand="rgRefMDs_ItemCommand"  
                oninsertcommand="rgRefMDs_InsertCommand"
                <HeaderContextMenu Skin="WebBlue"
                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                </HeaderContextMenu> 
                <PagerStyle Mode="Slider" /> 
                <MasterTableView CommandItemDisplay="TopAndBottom" DataKeyNames="RefMdId" HorizontalAlign="NotSet" 
                    AutoGenerateColumns="False" EditMode="PopUp"
                    <Columns> 
                        <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" 
                            HeaderStyle-Width="2%" /> 
                        <telerik:GridBoundColumn DataField="npi.number" HeaderText="NPI" SortExpression="npi.number" 
                            UniqueName="npi.number" HeaderStyle-Width="15%" /> 
                        <telerik:GridBoundColumn DataField="fullname" HeaderText="Name" SortExpression="fullname" 
                            UniqueName="fullname" HeaderStyle-Width="25%" /> 
                        <telerik:GridBoundColumn DataField="Contact.Address.City" HeaderText="City" SortExpression="Contact.Address.City"
                            UniqueName="city" HeaderStyle-Width="25%" /> 
                        <telerik:GridBoundColumn DataField="Contact.Address.StateCode" HeaderText="State" 
                            SortExpression="Contact.Address.StateCode" UniqueName="state" HeaderStyle-Width="15%" /> 
                        <telerik:GridCheckBoxColumn DataField="isactive" HeaderText="Active" SortExpression="isactive" 
                            UniqueName="iscompleted" EditFormColumnIndex="1" /> 
                    </Columns> 
                    <EditFormSettings UserControlName="RefMDs.ascx" EditFormType="WebUserControl"  
                        PopUpSettings-Modal="true" PopUpSettings-Width="60%" > 
                        <EditColumn UniqueName="EditCommandColumn1"
                        </EditColumn> 
                    </EditFormSettings> 
                </MasterTableView> 
                <ClientSettings> 
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
                </ClientSettings> 
                <FilterMenu Skin="WebBlue"
                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                </FilterMenu> 
            </telerik:RadGrid> 
        </telerik:RadPane> 
    </telerik:RadSplitter> 
</asp:Content> 
 
(aspx.cs file)
#region Using... 
using System; 
using System.Collections; 
using System.Collections.Generic; 
using System.Configuration; 
using System.Data; 
using System.Linq; 
using System.Web; 
using System.Web.Security; 
using System.Web.UI; 
using System.Web.UI.HtmlControls; 
using System.Web.UI.WebControls; 
using System.Web.UI.WebControls.WebParts; 
using System.Xml.Linq; 
 
using MDe.Framework.Application; 
using MDe.Framework.Navigation; 
 
using MDe.Blender.AppServer.Application; 
using MDe.Blender.Lib.MessagingTypes; 
 
using MDe.BlenderWeb.AppCode.Pages; 
using Telerik.Web.UI; 
using MDe.Framework.Model.Admin.RefMds; 
using MDe.Framework.FunctionSpecs; 
using MDe.BlenderWeb.AppCode.Caches; 
using MDe.Framework.Model.Contacts; 
using System.Collections.Specialized; 
#endregion 
public partial class DevTools_RefMDs : BlenderBasePage 
    #region Properties 
    /// <summary> 
    /// Property gives access to the contact that is stored in the session. 
    /// </summary> 
    //public List<FunctionGroup> functionGroups 
    //{ 
    //    get 
    //    { 
    //        if (Session["_functionGroups"] == null) 
    //        { 
    //            return GetFunctionGroups(); 
    //        } 
    //        else 
    //        { 
    //            return (List<FunctionGroup>)Session["_functionGroups"]; 
    //        } 
    //    } 
 
    //    set { Session["_functionGroups"] = value; } 
    //} 
    #endregion 
    #region Page Load 
    /// <summary> 
    ///  
    /// </summary> 
    /// <param name="sender"></param> 
    /// <param name="e"></param> 
    protected void Page_Load(object sender, EventArgs e) 
    { 
        int crud = -1; 
    } 
    #endregion 
    #region Private Methods 
    /// <summary> 
    /// Get the FunctionGroups for use in the dropdownlist on the radgrid 
    /// </summary> 
    //private List<RefMD> GetRefMDs() 
    //{ 
    //    Master.FunctionKeyName = FunctionKey; 
    //    this.SetFunction(FunctionKey.GET_FUNCTION_GROUPS); 
    //    ApplicationResult result = this.requestManager.ExecuteRequest(this.request); 
 
    //    return result.Data as List<FunctionGroup>; 
    //} 
    private void SetRefMds() 
    { 
        Master.FunctionKeyName = FunctionKey.FIND_REF_MDS; 
        this.SetFunction(FunctionKey.FIND_REF_MDS); 
        RefMdSearchCriteria criteria = new RefMdSearchCriteria(); 
        criteria.FirstName = this.txtFirst.Text; 
        criteria.LastName = this.txtLast.Text; 
        criteria.Npi = new Npi(this.txtNPI.Text); 
        criteria.OrgId = userDetails.LoginResult.LastPracticeUsed; 
        this.request.Parameters.Add("RefMdSearchCriteria", criteria); 
        ApplicationResult result = this.requestManager.ExecuteRequest(this.request); 
 
        List<RefMd> list = result.Data as List<RefMd>; 
 
        this.rgRefMDs.DataSource = list; 
        //this.rgRefMDs.DataBind(); 
    } 
    #endregion 
    #region Protected Methods 
    /// <summary> 
    ///  
    /// </summary> 
    /// <param name="source"></param> 
    /// <param name="e"></param> 
    protected void rgRefMds_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) 
    { 
        if (Page.IsPostBack) 
            SetRefMds(); 
    } 
     
    /// <summary> 
    ///  
    /// </summary> 
    /// <param name="sender"></param> 
    /// <param name="e"></param> 
    protected void rgRefMds_ItemDataBound(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridEditFormItem && e.Item.IsInEditMode) 
        { 
            GridEditFormItem item = (GridEditFormItem)e.Item; 
            UserControl userControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID); 
            DropDownList ddlState = userControl.FindControl("ucContact").FindControl("ddlState"as DropDownList; 
            DropDownList ddlPhoneType1 = userControl.FindControl("ucContact").FindControl("ddlPhoneType1"as DropDownList; 
            DropDownList ddlPhoneType2 = userControl.FindControl("ucContact").FindControl("ddlPhoneType2"as DropDownList; 
            DropDownList ddlPhoneType3 = userControl.FindControl("ucContact").FindControl("ddlPhoneType3"as DropDownList; 
 
            ddlState.DataSource = DataCache.Instance.States; 
            ddlState.DataBind(); 
            if (DataBinder.Eval(item.DataItem, "Contact.Address.StateCode") != null
            { 
                ddlState.SelectedIndex = ddlState.Items.IndexOf(ddlState.Items.FindByValue(DataBinder.Eval(item.DataItem, "Contact.Address.StateCode").ToString())); 
            } 
 
            ddlPhoneType1.DataSource = DataCache.Instance.PhoneTypes; 
            ddlPhoneType1.DataBind(); 
            if (DataBinder.Eval(item.DataItem, "Contact.PhoneNumber.TypeId") != null
            { 
                ddlPhoneType1.SelectedIndex = ddlPhoneType1.Items.IndexOf(ddlPhoneType1.Items.FindByValue(DataBinder.Eval(item.DataItem, "Contact.PhoneNumber.TypeId").ToString())); 
            } 
 
            ddlPhoneType2.DataSource = DataCache.Instance.PhoneTypes; 
            ddlPhoneType2.DataBind(); 
            if (DataBinder.Eval(item.DataItem, "Contact.AlternatePhoneNumber.TypeId") != null
            { 
                ddlPhoneType2.SelectedIndex = ddlPhoneType2.Items.IndexOf(ddlPhoneType2.Items.FindByValue(DataBinder.Eval(item.DataItem, "Contact.AlternatePhoneNumber.TypeId").ToString())); 
            } 
 
            ddlPhoneType3.DataSource = DataCache.Instance.PhoneTypes; 
            ddlPhoneType3.DataBind(); 
            if (DataBinder.Eval(item.DataItem, "Contact.Phone3.TypeId") != null
            { 
                ddlPhoneType3.SelectedIndex = ddlPhoneType3.Items.IndexOf(ddlPhoneType3.Items.FindByValue(DataBinder.Eval(item.DataItem, "Contact.Phone3.TypeId").ToString())); 
            } 
        } 
    } 
    #endregion 
    protected void lnkSearch_Click(object sender, EventArgs e) 
    { 
        SetRefMds(); 
    } 
    protected void lnkReset_Click(object sender, EventArgs e) 
    { 
        this.txtFirst.Text = null
        this.txtLast.Text = null
        this.txtNPI.Text = null
        this.rgRefMDs.DataSource = null
        this.rgRefMDs.DataBind(); 
    } 
    private void UpdateRefMD(RefMd rmd, GridEditableItem editedItem) 
    { 
        UserControl userControl = (UserControl)editedItem.FindControl(GridEditFormItem.EditFormUserControlID); 
        //Access the textbox from the edit form template and store the values in string variables.   
        rmd.Npi = new Npi((userControl.FindControl("txtNPI"as TextBox).Text); 
        rmd.FirstName = (userControl.FindControl("txtFirstName"as TextBox).Text; 
        rmd.MiddleName = (userControl.FindControl("txtMiddleName"as TextBox).Text; 
        rmd.LastName = (userControl.FindControl("txtLastName"as TextBox).Text; 
        rmd.IsActive = (userControl.FindControl("chkIsActive"as CheckBox).Checked; 
        rmd.OrgId = userDetails.LoginResult.LastPracticeUsed; 
        Contact contact = new Contact(); 
        rmd.Contact = contact; 
        rmd.Contact.ContactId = int.Parse((userControl.FindControl("ucContact").FindControl("txtContactId"as TextBox).Text); 
        rmd.Contact.Address.Line1 = (userControl.FindControl("ucContact").FindControl("txtAddressLine1"as TextBox).Text; 
        rmd.Contact.Address.Line2 = (userControl.FindControl("ucContact").FindControl("txtAddressLine2"as TextBox).Text; 
        rmd.Contact.Address.Line3 = (userControl.FindControl("ucContact").FindControl("txtAddressLine3"as TextBox).Text; 
        rmd.Contact.Address.City = (userControl.FindControl("ucContact").FindControl("txtCity"as TextBox).Text; 
        rmd.Contact.Address.StateCode = (userControl.FindControl("ucContact").FindControl("ddlState"as DropDownList).SelectedValue; 
        rmd.Contact.Address.Zip = (userControl.FindControl("ucContact").FindControl("txtZip"as TextBox).Text; 
        rmd.Contact.PhoneNumber.Number = (userControl.FindControl("ucContact").FindControl("txtPhoneNumber"as TextBox).Text; 
        rmd.Contact.PhoneNumber.TypeId = int.Parse((userControl.FindControl("ucContact").FindControl("ddlPhoneType1"as DropDownList).SelectedValue); 
        rmd.Contact.AlternatePhoneNumber.Number = (userControl.FindControl("ucContact").FindControl("txtAlternatePhoneNumber"as TextBox).Text; 
        rmd.Contact.AlternatePhoneNumber.TypeId = int.Parse((userControl.FindControl("ucContact").FindControl("ddlPhoneType2"as DropDownList).SelectedValue); 
        rmd.Contact.Phone3.Number = (userControl.FindControl("ucContact").FindControl("txtPhone3"as TextBox).Text; 
        rmd.Contact.Phone3.TypeId = int.Parse((userControl.FindControl("ucContact").FindControl("ddlPhoneType3"as DropDownList).SelectedValue); 
        rmd.Contact.Address.Zip = (userControl.FindControl("ucContact").FindControl("txtZip"as TextBox).Text; 
        Master.FunctionKeyName = FunctionKey.SAVE_REF_MD; 
        this.SetFunction(FunctionKey.SAVE_REF_MD); 
        this.request.Parameters.Add("RefMd", rmd); 
        ApplicationResult result = this.requestManager.ExecuteRequest(this.request); 
 
        if (result.Success) 
        { 
            //this.Master.SetMessage(this.GetSystemString("FunctionSpec Saved"), 
            //MessagingTypes.MESSAGE_TYPE_INFO); 
 
        } 
        else 
        { 
            this.Master.SetMessage(result.Message, MessagingTypes.MESSAGE_TYPE_ERROR); 
        } 
    } 
 
    /// <summary> 
    ///  
    /// </summary> 
    /// <param name="source"></param> 
    /// <param name="e"></param> 
    protected void rgRefMds_UpdateCommand(object source, GridCommandEventArgs e) 
    { 
        UserControl userControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID); 
 
        RefMd rmd = new RefMd(); 
        //Get the GridEditableItem of the RadGrid      
 
        GridEditableItem editedItem = e.Item as GridEditableItem; 
        //Get the primary key value using the DataKeyValue.      
        rmd.RefMdId = int.Parse(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["RefMdId"].ToString()); 
        UpdateRefMD(rmd, editedItem); 
         
    } 
    protected void rgRefMDs_ItemCommand(object source, GridCommandEventArgs e) 
    { 
        if (e.CommandName == RadGrid.InitInsertCommandName) //"Add new" button clicked 
        { 
            e.Canceled = true
 
            //Prepare an IDictionary with the predefined values 
            ListDictionary newValues = new ListDictionary(); 
            Contact contact = new Contact(); 
            newValues["contact"] = contact; 
            //Insert the item and rebind  
            e.Item.OwnerTableView.InsertItem(newValues); 
            GridEditCommandColumn editColumn = (GridEditCommandColumn)rgRefMDs.MasterTableView.GetColumn("EditCommandColumn"); 
            editColumn.Visible = true
        } 
    } 
 
    protected void rgRefMDs_InsertCommand(object source, GridCommandEventArgs e) 
    { 
        UserControl userControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID); 
 
        RefMd rmd = new RefMd(); 
        //Get the GridEditableItem of the RadGrid      
 
        GridEditableItem editedItem = e.Item as GridEditableItem; 
        //Get the primary key value using the DataKeyValue.      
        rmd.RefMdId = -1; 
        UpdateRefMD(rmd, editedItem); 
    } 
 

bo
Top achievements
Rank 1
 answered on 04 Feb 2009
4 answers
132 views

I'm exporting a radgrid to .csv, which works great, but now I want to add a few columns that are not in the grid (visible at least) to show on the export. I tried setting the extra fields as columns but setting them visible = false then set them to visible = true on the export button select, but have not be successful.

 

Anyone have any ideas, or suggestions?

 

Pa

Paul
Top achievements
Rank 1
 answered on 04 Feb 2009
1 answer
139 views
I have a page with two tabs.

I load all data on the intial page load.  The first tab is fine.

Data in the second tab toggles certain panels in it depending on the data.
When I click to go to the second tab the toggled panels do not appear.

There is a panel ("panelStats") that wraps the data in the second tab.  The second panel displays correctly when other buttons that I have Ajaxified are clicked.

                <telerik:AjaxSetting AjaxControlID="btnSearch">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="gvMessageList" LoadingPanelID="ajaxLoadingPanel" /> 
                        <telerik:AjaxUpdatedControl ControlID="panelStats" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 


How do Ajaxify the "panelStats" on the inital page load?

Thanks.
Felipe Saldana
Top achievements
Rank 1
 answered on 04 Feb 2009
1 answer
78 views
Hi!

Can you tell me what is problem with my site...  when I have begun it locally, it looks fine..., but when I have loaded it today on a hosting, it has ceased to work, and now looks so: link

Please help to solve this problem please. I have reconsidered all lessons, it has not turned out.


Georgi Krustev
Telerik team
 answered on 04 Feb 2009
1 answer
123 views
Hi

How do I gop about adding images to my RadEditor using simple drag and drop, or PrintScreen & paste ?

Will I have to create my own active X control or do you know of any already out there ?

Also I understand that this functionality might be unavailable due to the settings in some browsers, however, I also understand that this constraint can be removed.

Kind Regards

David
Rumen
Telerik team
 answered on 04 Feb 2009
5 answers
458 views
Hi,

I am displaying my data in radeditor after clicking the buttons placed out side the editor.  When i click first button, the editor will be loaded with text content and upon second button click, an image will be loaded into the editor. It is a client side functionality. The radeditor contains the icons Bold, Italic, Underline and Image Map editor in the toolbar.

My requirement is to hide "Image Map Editor" icon from the toolbar when i click first button because, only text content will be loaded into the editor in this case. Upon second button click event, editor should hide B, I and U icons.

Please provide me steps to acheive this functionality.

Rumen
Telerik team
 answered on 04 Feb 2009
5 answers
135 views
Hi Telerik Team,

I am trying to integrate a iGoolge type page using the dynamic RadDock based on user selection of predefined Widget selection. I trying to integrate this page with the page haing outlook style panels using the RadSplitter, RadPane and RadToolBar. One of the panels have this name "Dash Board" that contains the third party tree view node that loads the iGoogle style page in the Right pane in a iFrame

The issues that I am facing is:
1) The dynamic RadDock do not appear on the UI though it being created successfully in code behind and same page execute successfully when called separately. Some time it does appear on panels page but then there are no command buttons on the RadDock. Further the ones appeared were not in their respective RadDockZone, they were outside the Zone, though there was code for attaching it to a zone (again execute successfully as a separate page).

2) When the RadDock page is loaded in Right pane iFrame, I am able to load other panel pages after that, even if click the other tree view nodes. It appears the RadDock page consumes the events and no other page is loaded after that. Is there a way around.

3) Page.ClientScript.RegisterClientScript is not executed by browser having RadDock.

Please help ASAP.

Regards,
Sandeep Mittal

Petio Petkov
Telerik team
 answered on 04 Feb 2009
1 answer
217 views
Ive been following the example for inserting/updating data in hierarchical grids.  In the example there is an edit button at the left and a delete button at the right.  Each button has associated CSS which isnt included in the example.  Where can I get the CSS file ?  (and associated images)

this is the example
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/threelevel/defaultcs.aspx

this is one of the buttons

<

 

telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn1">

 

 

<HeaderStyle Width="20px" />

 

 

<ItemStyle CssClass="MyImageButton" />

 

 

</telerik:GridEditCommandColumn>

 

Dimo
Telerik team
 answered on 04 Feb 2009
4 answers
167 views
I have a setup like this:

<telerik:RadGrid ID="invoiceListGrid" runat="server" GridLines="None" Skin="Default2006"
AutoGenerateColumns
="False" OnNeedDataSource="invoiceListGrid_NeedDataSource"
AllowFilteringByColumn
="True"  AllowPaging="True" AllowSorting="False"
Width
="100%" OnItemCommand="invoiceListGrid_ItemCommand"
AllowMultiRowSelection
="True" ShowStatusBar="true"
 
<MasterTableView DataKeyNames="BillByPeriodID,LeaseID,YPID" PageSize="50" HierarchyLoadMode="Client"
 
<DetailTables> 
<telerik:GridTableView AllowSorting="false" AllowFilteringByColumn="false"
DataKeyNames
="BillByPeriodID" DataSourceID="odsInvoiceDetails" Width="100%"
<ParentTableRelation> 
<telerik:GridRelationFields DetailKeyField="BillByPeriodID" MasterKeyField="BillByPeriodID" /> 
</ParentTableRelation> 
<Columns>...</Columns> 
</telerik:GridTableView> 
 
<telerik:GridTableView AllowSorting="false" AllowFilteringByColumn="false"
DataKeyNames
="LeaseID,YPID" DataSourceID="odsOtherDetails" Width="100%"
<ParentTableRelation> 
<telerik:GridRelationFields DetailKeyField="LeaseID" MasterKeyField="LeaseID" /> 
<telerik:GridRelationFields DetailKeyField="YPID" MasterKeyField="YPID" /> 
<Columns>...</Columns> 
</telerik:GridTableView> 
                         
</DetailTables> 
 
</MasterTableView> 
 
<ClientSettings AllowExpandCollapse="True"
</ClientSettings> 
 
</telerik:RadGrid> 
 
<asp:ObjectDataSource ID="odsInvoiceDetails" runat="server"  
TypeName="Blah.BLL.Invoice"  
SelectMethod="GetInvoiceByID"
<SelectParameters> 
<asp:SessionParameter Name="invoiceID" sessionField="BillByPeriodID" Type="Int32" Direction="input" /> 
</SelectParameters> 
</asp:ObjectDataSource> 
             
<asp:ObjectDataSource ID="odsOtherDetails" runat="server"  
TypeName="Blah.BLL.Other"  
SelectMethod="GetPeriodSummaryByLeaseID"
<SelectParameters> 
<asp:SessionParameter Name="leaseID" sessionField="LeaseID" Type="Int32" Direction="input" /> 
<asp:SessionParameter Name="ypId" sessionField="YPID" Type="Int32" Direction="input" /> 
</SelectParameters> 
</asp:ObjectDataSource> 

My problem is that only the first sub-grid shows any data.  In fact, the second sub-grid never even fires the SelectMethod of the ObjectDataSource to which it has been assigned.  This has been confirmed by placing a breakpoint in business class "Blah.BLL.Other".

Why is my first sub-grid being loaded with data as expected, and the second (same level -- level 2) is being ignored?

Thanks,

Mike
Michael
Top achievements
Rank 2
 answered on 04 Feb 2009
4 answers
187 views

Im having problems with my radgrid when i us groupbyexpression some images(filter,refresh etc..)

appears on the left column

is there any workaroud for this.

i have the link of my file (print screen) Radgrid with misalign images

 <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True"   

        GridLines="None" onitemcreated="RadGrid1_ItemCreated"   
        onpdfexporting="RadGrid1_PdfExporting" ShowFooter="True"    

        ShowGroupPanel="True" Aut

oGenerateColumns ="False"   

        oncolumncreated="RadGrid1_ColumnCreated" ondatabound="RadGrid1_DataBound"   
        onitemdatabound="RadGrid1_ItemDataBound"   
        oncolumncreating="RadGrid1_ColumnCreating"   
        onprerender="RadGrid1_PreRender">  
<HeaderContextMenu EnableTheming="True">  
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>  
</HeaderContextMenu>  
 
        <ExportSettings>  
             
        </ExportSettings>  
<ClientSettings Resizing-AllowRowResize="true" Selecting-AllowRowSelect="true">  
<Resizing AllowRowResize="True"></Resizing>  
</ClientSettings>  
        <AlternatingItemStyle BackColor="#663300" />  
<MasterTableView   ShowFooter="true"  DataKeyNames="OrderID">  
    
<GroupByExpressions>  
    <telerik:GridGroupByExpression>  
         <GroupByFields>  
                <telerik:GridGroupByField FieldAlias="ShipPostalCode" FieldName="ShipPostalCode"   
                 HeaderText="ShipPostalCode"   />  
                    
                  
            </GroupByFields>  
            <SelectFields>  
                <telerik:GridGroupByField FieldAlias="ShipPostalCode" FieldName="ShipPostalCode"   
                 HeaderText="ShipPostalCode"  />  
            </SelectFields>  
    </telerik:GridGroupByExpression>  
<telerik:GridGroupByExpression><SelectFields>  
<telerik:GridGroupByField FieldName="ShipCountry" FieldAlias="ShipCountry"   
        FormatString="" HeaderText="Ship Country"></telerik:GridGroupByField>  
</SelectFields>  
<GroupByFields>  
<telerik:GridGroupByField FieldName="ShipCountry" FieldAlias="ShipCountry"   
        FormatString="" HeaderText="Ship Country"></telerik:GridGroupByField>  
</GroupByFields>  
</telerik:GridGroupByExpression>  
<telerik:GridGroupByExpression><SelectFields>  
<telerik:GridGroupByField FieldName="ShipCity" FieldAlias="ShipCity"   
        FormatString="" HeaderText="Ship City"></telerik:GridGroupByField>  
</SelectFields>  
<GroupByFields>  
<telerik:GridGroupByField FieldName="ShipCity" FieldAlias="ShipCity"   
        FormatString="" HeaderText="Ship City"></telerik:GridGroupByField>  
</GroupByFields>  
</telerik:GridGroupByExpression>  
 </GroupByExpressions>  
    
    <GroupByExpressions>  
        <telerik:GridGroupByExpression>  
             
            <GroupByFields>  
                <telerik:GridGroupByField FieldAlias="ShipCountry" FieldName="ShipCountry"   
                 HeaderText="Ship Country"   />  
             
                  
            </GroupByFields>  
            <SelectFields>  
                <telerik:GridGroupByField FieldAlias="ShipCountry" FieldName="ShipCountry"   
                 HeaderText="Ship Country"  />  
                   
            </SelectFields>  
              
        </telerik:GridGroupByExpression>  
<telerik:GridGroupByExpression><SelectFields>  
<telerik:GridGroupByField FieldName="ShipCity" FieldAlias="ShipCity" HeaderText="Ship City"></telerik:GridGroupByField>  
</SelectFields>  
<GroupByFields>  
<telerik:GridGroupByField FieldName="ShipCity" FieldAlias="ShipCity" HeaderText="Ship City"></telerik:GridGroupByField>  
</GroupByFields>  
</telerik:GridGroupByExpression>  
<telerik:GridGroupByExpression><SelectFields>  
<telerik:GridGroupByField FieldName="ShipPostalCode" FieldAlias="ShipPostalCode"   
        FormatString="" HeaderText="ShipPostalCode"></telerik:GridGroupByField>  
</SelectFields>  
<GroupByFields>  
<telerik:GridGroupByField FieldName="ShipPostalCode" FieldAlias="ShipPostalCode"   
        FormatString="" HeaderText="ShipPostalCode"></telerik:GridGroupByField>  
</GroupByFields>  
</telerik:GridGroupByExpression>  
    </GroupByExpressions>  
    
   <NestedViewTemplate>  
     
        <telerik:RadGrid ID="RadGrid2" runat ="server" DataSourceID="SqlDataSource1"   
        AutoGenerateColumns ="false" AllowPaging ="true" onitemcreated="RadGrid2_ItemCreated" >    
        <AlternatingItemStyle BackColor="White" />  
        <MasterTableView AllowPaging="true" DataKeyNames="OrderID">  
       <Columns>  
                    <telerik:GridBoundColumn DataField="OrderID" DataType="System.Int32" HeaderText="OrderID"  
                        ReadOnly="True" SortExpression="OrderID" UniqueName="OrderID">  
                    </telerik:GridBoundColumn>  
                    <telerik:GridBoundColumn DataField="OrderDate" DataType="System.DateTime" HeaderText="OrderDate"  
                        SortExpression="OrderDate" UniqueName="OrderDate" DataFormatString="{0:d}">  
                    </telerik:GridBoundColumn>  
                    <telerik:GridBoundColumn DataField="ShipCountry" HeaderText="ShipCountry" SortExpression="ShipCountry"  
                        UniqueName="ShipCountry">  
                    </telerik:GridBoundColumn>  
                </Columns>  
        <DetailTables>  
        <telerik:GridTableView runat="server" AutoGenerateColumns="false"  AllowSorting="true" AllowFilteringByColumn="true"   
            DataKeyNames="OrderID" DataSourceID="SqlDatasource1" >  
            <Columns>  
            <telerik:GridBoundColumn DataField="OrderID" DataType="System.Int32" HeaderText="OrderID"  
                        ReadOnly="True" SortExpression="OrderID" UniqueName="OrderID">  
                    </telerik:GridBoundColumn>  
                    <telerik:GridBoundColumn DataField="OrderDate" DataType="System.DateTime" HeaderText="OrderDate"  
                        SortExpression="OrderDate" UniqueName="OrderDate" DataFormatString="{0:d}">  
                    </telerik:GridBoundColumn>  
                    <telerik:GridBoundColumn DataField="ShipCountry" HeaderText="ShipCountry" SortExpression="ShipCountry"  
                        UniqueName="ShipCountry">  
                    </telerik:GridBoundColumn>  
            </Columns>  
            <RowIndicatorColumn Visible="True">  
                <HeaderStyle Width="20px" />  
            </RowIndicatorColumn>  
            <ExpandCollapseColumn>  
                <HeaderStyle Width="20px" />  
            </ExpandCollapseColumn>  
          
          
        </telerik:GridTableView>  
          
    </DetailTables>  
        </MasterTableView>        
            
         
        </telerik:RadGrid>  
              
       
           <telerik:RadChart ID="RadChart1" runat="server">  
           <PlotArea>  
            <EmptySeriesMessage Visible="True">  
                <Appearance Visible="True">  
                </Appearance>  
            </EmptySeriesMessage>  
        </PlotArea>  
        <ChartTitle>  
            <TextBlock Text="This is a Test">  
            </TextBlock>  
        </ChartTitle>  
          
          
    </telerik:RadChart>  
      
          
   </NestedViewTemplate>  
         
     
      
<RowIndicatorColumn>  
<HeaderStyle Width="20px"></HeaderStyle>  
</RowIndicatorColumn>  
<ExpandCollapseColumn Visible="True">  
<HeaderStyle Width="20px"></HeaderStyle>  
</ExpandCollapseColumn>  
<Columns>  
  <telerik:GridBoundColumn  DataField="OrderId" HeaderText="Order ID"  
      Display="true">  
  </telerik:GridBoundColumn>    
  <telerik:GridBoundColumn Aggregate="Count" DataField="ShipName" HeaderText="Ship Name"  
      FooterText="Total Ships: " Display="true">  
  </telerik:GridBoundColumn>     
     
   <telerik:GridBoundColumn Aggregate="Count" DataField="ShipCity" HeaderText="Ship City"  
      FooterText="Total Numnber in City: ">  
  </telerik:GridBoundColumn>      
    
    <telerik:GridBoundColumn Aggregate="Count" DataField="ShipCountry" HeaderText="Ship Country"  
      FooterText="Total Numnber in Coutry:" Display="false">  
  </telerik:GridBoundColumn>    
    
   <telerik:GridBoundColumn  DataField="Freight" HeaderText="Freight">  
  </telerik:GridBoundColumn>      
   <telerik:GridBoundColumn  DataField="OrderDate" HeaderText="OrderDate">  
  </telerik:GridBoundColumn>      
</Columns>  
   <GroupByExpressions>  
    <telerik:GridGroupByExpression>  
        <GroupByFields>  
               <telerik:GridGroupByField FieldAlias="ShipCity" FieldName="ShipCity"   
                 HeaderText="Ship City"   />  
        </GroupByFields>  
        <SelectFields>  
                   <telerik:GridGroupByField FieldAlias="ShipCity" FieldName="ShipCity"   
                 HeaderText="Ship City"   />  
        </SelectFields>  
    </telerik:GridGroupByExpression>  
     
<telerik:GridGroupByExpression><SelectFields>  
<telerik:GridGroupByField FieldName="ShipPostalCode" FieldAlias="ShipPostalCode" HeaderText="ShipPostalCode"></telerik:GridGroupByField>  
</SelectFields>  
<GroupByFields>  
<telerik:GridGroupByField FieldName="ShipPostalCode" FieldAlias="ShipPostalCode" HeaderText="ShipPostalCode"></telerik:GridGroupByField>  
</GroupByFields>  
</telerik:GridGroupByExpression>  
<telerik:GridGroupByExpression><SelectFields>  
<telerik:GridGroupByField FieldName="ShipCountry" FieldAlias="ShipCountry" FormatString="" HeaderText="Ship Country"></telerik:GridGroupByField>  
</SelectFields>  
<GroupByFields>  
<telerik:GridGroupByField FieldName="ShipCountry" FieldAlias="ShipCountry" FormatString="" HeaderText="Ship Country"></telerik:GridGroupByField>  
</GroupByFields>  
</telerik:GridGroupByExpression>  
     
   </GroupByExpressions>  
    
</MasterTableView>  
 
        <GroupingSettings GroupContinuedFormatString="" GroupContinuesFormatString=""   
            GroupSplitDisplayFormat="" GroupSplitFormat="" />  
 
<FilterMenu EnableTheming="True">  
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>  
</FilterMenu>  
          
    </telerik:RadGrid> 
Sebastian
Telerik team
 answered on 04 Feb 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?