Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
68 views
If your using radGrid hierarchy tables, and use the event ItemDataBind, how do I determine what the table that called the event is?  Like, if I wanted to just do code associated with the top level table.

J
Daniel
Telerik team
 answered on 25 Feb 2010
1 answer
333 views

Based on the sample code in telerik demo site, I am able put a RadAjaxLoadingPanel in content page for the update panel. It is working fine and loading image is in the center of screen. Since there have a lot of content pages have similar case, I would like to move RadAjaxLoadingPanel to Master page. Also, the javascript for updatePanel would be moved to master page too. That is meaning, I only have one code base in Master page and apply AjaxLoadingPanel for all content page with UpdatePanel.

Does anyone have idea how to implement this? If it can do, will this still working for content page without update panel?

Here are code I am using in content page.

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">  
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"   
    IsSticky="true" BackgroundPosition="Center" 
        Transparency="0" Height="60px" 
        Width="70px" Skin="Vista">  
    </telerik:RadAjaxLoadingPanel> 
 
    <script language="javascript" type="text/javascript">  
           function centerUpdatePanel()  
            {  
                centerElementOnScreen(document.getElementById('<% = RadAjaxLoadingPanel1.ClientID %>'));  
            }  
            function centerElementOnScreen(element)  
            {  
                var scrollTop = document.body.scrollTop;  
                var scrollLeft = document.body.scrollLeft;  
                var viewPortHeight = document.body.clientHeight;  
                var viewPortWidth = document.body.clientWidth;  
                if (document.compatMode == "CSS1Compat")  
                {  
                    viewPortHeight = document.documentElement.clientHeight;  
                    viewPortWidth = document.documentElement.clientWidth;  
                    scrollTop = document.documentElement.scrollTop;  
                    scrollLeft = document.documentElement.scrollLeft;  
                }  
                var topOffset = Math.ceil(viewPortHeight / 2 - element.offsetHeight / 2);  
                var leftOffset = Math.ceil(viewPortWidth / 2 - element.offsetWidth / 2);  
                var top = scrollTop + topOffset - 40;  
                var left = scrollLeft + leftOffset - 70;  
                element.style.position = "absolute";  
                element.style.top = top + "px";  
                element.style.left = left + "px";  
            }   
 
        var loadingPanel = "";  
        var pageRequestManager = Sys.WebForms.PageRequestManager.getInstance();  
        var postBackElement = "";  
        pageRequestManager.add_initializeRequest(initializeRequest);  
        pageRequestManager.add_endRequest(endRequest);  
 
        function initializeRequest(sender, eventArgs)  
        {  
            loadingPanel = $find('<% = RadAjaxLoadingPanel1.ClientID %>');  
            postBackElement = eventArgs.get_postBackElement().id;  
            loadingPanel.show(postBackElement);  
            centerUpdatePanel();  
        }  
 
        function endRequest(sender, eventArgs)  
        {  
            loadingPanel = $find('<% = RadAjaxLoadingPanel1.ClientID %>');  
            loadingPanel.hide(postBackElement);  
        }   
    </script> 
 
   <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">  
          <ContentTemplate> 
.....  
        </ContentTemplate> 
    </asp:UpdatePanel> 
</asp:Content> 
 
Iana Tsolova
Telerik team
 answered on 25 Feb 2010
4 answers
249 views
I am trying to customize the look & feel when exporting a fairly complex RadGrid.  I have used several of the common techniques to either hide or swap out columns within the main (Master) table and those are working perfectly.  However, whenever I attempt to modify the look of the DetailTable, the changes are totally ignored... specifically:

1. The detail table shows the command row (Add New / Refresh) even though the MasterTable properly hides it (ExportOnlyData is set to True as is HideStructureColumns; these are set at the grid level, could not find any separate settings at the DetailTable level).

2. Setting the column visibility to False in code (during the ItemCommand) is not working for DetailTables, though it is working fine for the columns in the MasterTable.  Code below (removed some code, but not related to the column hiding; both columns ARE properly found and visibility set):

public void RadGrid_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) 
{ 
            RadGrid exportingGrid = source as RadGrid; 
 
            // only respond to the commands which invoke a built-in export 
            switch (e.CommandName) 
            { 
                case RadGrid.ExportToCsvCommandName: 
                case RadGrid.ExportToExcelCommandName: 
                case RadGrid.ExportToPdfCommandName: 
                case RadGrid.ExportToWordCommandName: 
             exportingGrid.MasterTableView.Columns.FindByUniqueName("CommandColDisplay").Visible = false; 
                        exportingGrid.MasterTableView.DetailTables[0].Columns.FindByUniqueName("DeptCommandColDisplay").Visible = false; 
                        break; 
 
} 

Any insight or hints that anyone could provide would be greatly appreciated.
Adam
Adam
Top achievements
Rank 1
 answered on 25 Feb 2010
1 answer
73 views
Following this link here, I'm implementing a custom FileBrowserContentProvider in conjunction with the Image Manager.  What I need is a way for user A to upload a file and user B to upload a file without those files being shared within a single folder.  With backend code modifications, we support this by renaming the uploaded file with a GUID and storing this GUID along with the original file name and the user's AccountID (already known at login) in our data source.  All works pretty good, but I have a couple issues.

1) If the user clicks on the Image Editor and modifies the image, why does the image not get refreshed in the Image Preview window?  Is there some call I need to make or handle some other custom event?  I couldn't find anyone else reporting issues with this.

2) I'm seeing the DeleteFile event fired when I'm in the Image Editor and click the save button.  This is another one I haven't found anyone else asking about.

I'd be willing to share some code, but this is an elaborate process we have going on right now.  Via the Telerik online Demos I did seem to see the demos acting similar to my first issue.  Thank you for any help or direction.
Dobromir
Telerik team
 answered on 25 Feb 2010
3 answers
123 views
Hi,
        I am having an issue in Hide/Unhide columns after sorting. The problem comes only after i hided any of the column then do the action of sorting the result becomes grid column width collapse. The columns width not looking good when compare it is before sorting the column and hinding it. 

I used FixedTableLayout  at all to my Grid. But still i am not able to find out the solution.

-Thanks
Pavlina
Telerik team
 answered on 25 Feb 2010
1 answer
104 views
1. when setting tabstrip to vertical left orientation, multipage pageview will show at  the bottom of tab,this is fixed with CSS float:left property.However, this doesnt wok for pageview that contain a radgrid.The ragrid will still appear on the bottom of the tab.. how to fix this issue?

2.when rendering the page that contain tabstrip vertical left orientation (with CSS float left fix) in IE 7, the pageview still display on the bottom of the tab. However it display properly on both firefox 3 and chrome..Is this a common problem with IE?
Yana
Telerik team
 answered on 25 Feb 2010
7 answers
236 views
Hi,

I have 3 radsliders inside an update panel. The asp panel that contains the sliders is initially hidden and is show thru an update of the update panel. On showing the sliders they do not display properly and they do not function as intended. Se my screendump for more info.

I use a custom skin for the sliders but the same problem occurs even if I run the default embeded skin.

I have tried to run the repaint method that you need to use when the sliders are in an hidden html element.

Thanks!

/Christofer
Tsvetie
Telerik team
 answered on 25 Feb 2010
1 answer
175 views
Hello,

With IIS compression turned on in IIS 6, the port 80 web site reports that the site has compression turned on.  However, with it turned off and your RadCompression enabled (including ViewState compression), it reports the app as uncompressed.  I think I know why this is happening, but I was wondering if this is a valid way to determine if a site is enabled, and how to figure out that it is working.

http://www.port80software.com/tools/compresscheck.asp?url=https%3A%2F%2Fwww.qispbctraining.com&Submit1=Check+Compression

Thanks.
Daniel
Telerik team
 answered on 25 Feb 2010
4 answers
118 views
Hello,

I'm having an issue with showing/hiding columns on the client-side.  When i hide a column, the grouping row is not resizing.  Looking at the source, it appears that the grouping column colspan is not changing when columns are shown or hidden.  Is there an easy (or any) way to correct this?

Thanks,
Matt

        function chkChange(chk) {  
            var grid = $find("<%= grid.ClientID %>");  
 
            if (chk.checked) {  
                kgDataSeries.get_masterTableView().showColumn(5);  
            }  
 
            else {  
                kgDataSeries.get_masterTableView().hideColumn(5);  
            }  
 
            kgDataSeries.repaint();           
        } 
Matt
Top achievements
Rank 1
 answered on 25 Feb 2010
4 answers
247 views
I'm looking for a way to only auto-size the height of a window (I need a fixed width) to its contents. The windows are created in Page_Init() and the content comes from a database which is also loaded in Page_Init(). The auto-sizing seems to be acting a little strange - the height of the window is too large and the values I set for the top and left properties seem to get ignored. It looks like the width is sizing to the image width... which is what you would expect, but I want to use a fixed width anyway. Enabling autosize seems to ignore any width values explicitly set. Any suggestions?

Thanks,
Chad

Georgi Tunev
Telerik team
 answered on 25 Feb 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?