Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
165 views

I have a grid with DetailTables which are populated using OnDetailTableDataBind. The headers of the detail table are localized server side because the data is different depending upon the parent. When a row is expanded, the details display with the correct header text. The problem is when I expande another row. That's rows header text displays correctly but the first detail table's header text is now empty for each column. I've tried a few ways to set the text but neither hold their values when an additional row is expanded.

<telerik:RadGrid ID="rgInvoices" runat="server" GridLines="None" AllowPaging="True" 
    AllowMultiRowSelection="true" ShowStatusBar="true" AllowSorting="True" AutoGenerateColumns="False" 
    GroupingEnabled="False" Skin="CentreTelerikNoSelectStyle" EnableEmbeddedSkins="false" 
    OnNeedDataSource="rgInvoices_NeedDataSource" PageSize="10" OnItemCreated="rgInvoices_ItemCreated" 
    OnItemDataBound="rgInvoices_ItemDataBound" OnDetailTableDataBind="rgInvoices_DetailTableDataBind" 
    HeaderStyle-Font-Bold="true">  
    <MasterTableView ...> 
        <Columns> 
        ...  
</Columns> 
        <DetailTables> 
            <telerik:GridTableView Width="100%" AutoGenerateColumns="false">  
                <Columns> 
                    <telerik:GridBoundColumn DataField="Field2"></telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Field3"></telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Field4"></telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Field5"></telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Field6"></telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Field7"></telerik:GridBoundColumn> 
                </Columns> 
            </telerik:GridTableView> 
        </DetailTables> 
    </MasterTableView> 
</telerik:RadGrid> 
 
protected void rgInvoices_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)  
{  
    var dataItem = (GridDataItem)e.DetailTableView.ParentItem;  
    var invoiceType =  
        (InvoiceType) Enum.Parse(typeof (InvoiceType), dataItem.GetDataKeyValue("InvoiceType").ToString());  
    CreateServiceDetailHeaders(e.DetailTableView);  
    e.DetailTableView.DataSource = GetInvoiceDetails(invoiceType);  
}  
 
private void CreateServiceDetailHeaders(GridTableView gv)  
{  
    var item = gv.GetItems(GridItemType.Header);  
    GridHeaderItem headerItem = item[0] as GridHeaderItem;  
 
    LinkButton button = headerItem["field2"].Controls[0] as LinkButton;  
    button.Text = GetLocalResource("ServiceDescriptionHeader");  
 
    //gv.Columns[0].HeaderText = GetLocalResource("ServiceDescriptionHeader");  
    gv.Columns[1].HeaderText = GetLocalResource("ServiceLaborAmountHeader");  
    gv.Columns[2].HeaderText = GetLocalResource("ServicePartAmountHeader");  
    gv.Columns[3].HeaderText = GetLocalResource("ServiceMiscAmountHeader");  
    gv.Columns[4].Visible = false;  
    gv.Columns[5].Visible = false;  
    gv.Columns[0].HeaderStyle.HorizontalAlign = HorizontalAlign.Left;  
    gv.Columns[0].ItemStyle.HorizontalAlign = HorizontalAlign.Left;  
    gv.Columns[1].HeaderStyle.HorizontalAlign = HorizontalAlign.Right;  
    gv.Columns[1].ItemStyle.HorizontalAlign = HorizontalAlign.Right;  
    gv.Columns[2].HeaderStyle.HorizontalAlign = HorizontalAlign.Right;  
    gv.Columns[2].ItemStyle.HorizontalAlign = HorizontalAlign.Right;  
    gv.Columns[3].HeaderStyle.HorizontalAlign = HorizontalAlign.Right;  
    gv.Columns[3].ItemStyle.HorizontalAlign = HorizontalAlign.Right;  
} 

Setting the text by getting the LinkButton or by assigning to the HeaderText property of the column work for the row that was just expanded but any other detail tables that were already expanded lose these values.

Any help is greatly appreciated.

Thanks,
Dave

Carl
Top achievements
Rank 1
 answered on 08 Mar 2011
6 answers
524 views
Hi I am trying to change FileExplorer path dynamically but its not getting change. I have one dropdown box and based on selected item I am trying to change the File Explorer path Dynamically.  Please see my code below:

<div class="settings">
        <h1>Media Libraries</h1>
        <div>
            <fieldset style="width: 250px;">
                <legend>Choose a Site</legend>
                <telerik:RadComboBox ID="ddlSite" runat="server" Width="200px" Height="100px" AutoPostBack="true"
                    EmptyMessage="Select a Site" EnableVirtualScrolling="true" OnSelectedIndexChanged="ddlSite_SelectedIndexChanged">
                </telerik:RadComboBox>
            </fieldset>
        </div>
        <div>
        <fieldset style="width: 250px;">
                <legend>Selected Site</legend>
                <asp:Label ID="lblSiteName" runat="server" Text=""></asp:Label>
            </fieldset>
        </div>
    </div>
    <table cellspacing="4" cellpadding="0" border="0" style="padding-left:10px;" >
        <tr>
            <td style="vertical-align: top;">
                
                <telerik:RadFileExplorer runat="server" ID="FileExplorer1" Width="1000px" Height="500px"
                    OnClientItemSelected="OnClientItemSelected" >
                </telerik:RadFileExplorer>
            </td>
            <td valign="top">
                <fieldset style="width: 230px; height: 220px">
                    <legend>Preview</legend>
                    <img id="pvwImage" src="" runat="server" alt=""
                        style="display: none; max-width:230px; max-height:220px; margin: 10px;  vertical-align: middle;" />
                </fieldset>
            </td>
        </tr>
        </table>
 
.cs page:
 
        protected void Page_Load(object sender, EventArgs e)
        {
            InitializeContainer();
            //set properties according to configuration panel
            FileExplorer1.VisibleControls = GetVisibleControls();
            FileExplorer1.EnableOpenFile = true;
            FileExplorer1.DisplayUpFolderItem = true;
            FileExplorer1.AllowPaging = true;
            FileExplorer1.EnableCreateNewFolder = true;
            FileExplorer1.Upload.Enabled = true;
            //if (!enableUpload.Checked)
            //{
            //    FileExplorer1.Configuration.UploadPaths = new string[0];
            //}
            if (!IsPostBack)
            {
                BindSite();
                lblSiteName.Text = ddlSite.SelectedItem.Text;
                 
                
                ////Set initial folder to open. Note that the path is case sensitive!
                FileExplorer1.Configuration.ContentProviderTypeName = typeof(CustomColumnsContentProvider).AssemblyQualifiedName;
                //FileExplorer1.InitialPath = Page.ResolveUrl(String.Format("~/SiteData/{0}/UserFiles/allowed.png",this.SiteID));
                this.SiteID = Convert.ToInt32(ddlSite.SelectedValue);
                string PagePath = Page.ResolveUrl(String.Format("~/SiteData/{0}/UserFiles/allowed.png", this.SiteID));
                string RootPagePath = Page.ResolveUrl(String.Format("~/SiteData/{0}/UserFiles", this.SiteID));
                //Set initial folder to open. Note that the path is case sensitive!
                // FileExplorer1.InitialPath = PagePath;
                FileExplorer1.Configuration.ViewPaths = new string[] { RootPagePath };
                FileExplorer1.Configuration.UploadPaths = new string[] { RootPagePath };
                FileExplorer1.Configuration.DeletePaths = new string[] { RootPagePath };
                 
            }
            
            AddDateAndTypeColumns();
        }
 
 protected void ddlSite_SelectedIndexChanged(object sender, EventArgs e)
        {
            lblSiteName.Text = ddlSite.SelectedItem.Text;
            this.SiteID = Convert.ToInt32(ddlSite.SelectedValue);
 
            string RootPagePath = Page.ResolveUrl(String.Format("~/SiteData/{0}/UserFiles", this.SiteID));
            //Set initial folder to open. Note that the path is case sensitive!
            // FileExplorer1.InitialPath = PagePath;
            FileExplorer1.Configuration.ViewPaths = new string[] { RootPagePath };
            FileExplorer1.Configuration.UploadPaths = new string[] { RootPagePath };
            FileExplorer1.Configuration.DeletePaths = new string[] { RootPagePath };
        }

Thanks in advance for your help....
Dobromir
Telerik team
 answered on 08 Mar 2011
3 answers
99 views
Hi,

I have a problem using RadTimePicker in Safari.  Absolutely nothing is displayed in Safari, I click on the clock and no time picker display.  I only have an empty input (supposed to contained time) and the image that is supposed to open the time picker....


Safari is not optionnal for us to be supported, do you have any idea why this doesn't work??


Thx


PS: We use version for ASP.NET_AJAX_2008_1_415
Martin
Telerik team
 answered on 08 Mar 2011
1 answer
122 views
Hi,

Rad Datepicker and datetime picker is not showing in safari(Mobile). My telerik's version is "2010.3.1215.40".I need urgent help .I have tried using the hotfix that was sugeested,but no use.Please help

Thanks,
ritu
Martin
Telerik team
 answered on 08 Mar 2011
3 answers
182 views
Hi,

I need to represent a point on my chart with a "arrow" mark. I looked into Appearance.Figure.defaultfigures. How do i assign an image to Appearance.Figure property or Appearance.Pointshape.

thanks & regards,
Sharanya
Missing User
 answered on 08 Mar 2011
7 answers
640 views
Hi,

I am using a fairly small RadWindow with two controls, a radtextbox and a raddatepicker.  When the calendar on the datapicker opens it ends up opening larger than the radwindow and as such most of it is hidden.  How do you get the datepicker to lay above the window?  I've tried altering the zindex but it still doesn't appear above the window.

Regards,

Jon
Georgi Tunev
Telerik team
 answered on 08 Mar 2011
1 answer
93 views
Is there a way to do automatic formating of hyperlinks in Radeditor on a MAC?  I know that if you copy a URL in IE or Chrome or Safari on Windows and paste into Radeditor it will automatically format the URL into a link.  (This doesn't work in Firefox).   Is there a way to do it on MAC OS?  I tried all browsers on MAC and it doesn't work, when I paste a URL into Radeditor it just paste it as text.  Any help with this will be appreciated.  

Thanks
Rumen
Telerik team
 answered on 08 Mar 2011
7 answers
171 views
Hi I am using Radeditor Moss 5.5 version.
I need to upload all the documents from all my document libraries which exixts in my subsite.
I need to give all the document library names in configfile or any other option is there for this to attain.
Stanimir
Telerik team
 answered on 08 Mar 2011
1 answer
159 views
RadTextBox with MultiLine gets rendered with blank value via abcPDF imageToURL.

It shows on screen somewhow but the rendered textarea HTML has visibility set to off and height/width of 1px?
Tsvetina
Telerik team
 answered on 08 Mar 2011
1 answer
207 views
hello there:

I Replace standard asp.net buttons for radbuttons on my website and some focus client scripts stopped working due button type has changed. Dou you know how to set focus on Image type Radbuttons. Because I'm using some radcomboboxes linked to autocomplete text property and I set up a script focusing a button on the RadComboBox client events  "onclientdropdownclosing" and "onclientdropdownclosed".

this is my current focus client event used on RadcomboBoxes:

 function setFocusTobtnBuscaCliente() {
                   document.Form1.btnBuscaCliente.focus();
               }


Thanks in advance for any help provided!!!
Shinu
Top achievements
Rank 2
 answered on 08 Mar 2011
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?