Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
74 views
I'm trying to adapt the drag and drop grid sample (with pending orders and shipped orders) to my particular situation and am having some difficulty.

I can't the correct syntax for how to reference each grid's clientid since it is in a user control.  I'm trying as follows:
uc2_RadGrid1.ClientID

But that is not correct.  What is the correct syntax in the javascript below for correctly grabbing a reference to a grid's clientID when it is inside a user control?

Thx!

In my situation, I have each grid in a different user control along with some other items on the screen.  My two user controls each have a RadGri1 grid in them, and they are defined in the page as:

<%@ Register src="ContactGrid.ascx" tagname="ContactGrid" tagprefix="uc2" %> 
<%@ Register src="ContactSelected.ascx" tagname="ContactSelected" tagprefix="uc4" %> 
 

and the script block taken from the sample is:

    <telerik:RadScriptBlock runat="server" ID="scriptBlock">  
 
        <script type="text/javascript">  
            <!--  
                function onRowDropping(sender, args)  
                {   
                    if (sender.get_id() == "<%=uc2_RadGrid1.ClientID %>")  
                    {  
                        var node = args.get_destinationHtmlElement();   
                        if(!isChildOf('<%=uc4_RadGrid1.ClientID %>', node) && !isChildOf('<%=uc2_RadGrid1.ClientID %>', node) )  
                        {   
                            args.set_cancel(true);   
                        }  
                    }  
                    else 
                    {   
                        var node = args.get_destinationHtmlElement();   
                        if(!isChildOf('trashCan', node))  
                        {   
                            args.set_cancel(true);   
                        }  
                        else 
                        {  
                            if (confirm("Are you sure you want to delete this selection?"))  
                                args.set_destinationHtmlElement($get('trashCan'));  
                            else 
                               args.set_cancel(true);   
                        }  
                    }  
                }  
                  
                function isChildOf(parentId, element)  
                {  
                    while(element)  
                    {   
                        if (element.id && element.id.indexOf(parentId) > -1)  
                        {   
                            return true;  
                        }  
                        element = element.parentNode;  
                    }  
                    return false;  
                }  
                -->  
        </script>  
 
    </telerik:RadScriptBlock>  
 
Kevin
Top achievements
Rank 2
 answered on 27 Apr 2009
3 answers
202 views
When I am in server side datasource binding, I can initiate an inplace editing row by firing an "InitInsert" command. However, when I am in client-side binding, there is no way to bring up such editing row without the RadGrid posting back to the server code and re-rendering. 

Even getting the editing row with the server re-rendering, clicking the "Insert" linkbutton doesn't seem to post back the newly inserted data in the OnInsertCommand. 

I found the example with Form editing using another grid from the Demo. However, it is not quite what I am looking for. 

The reason I want to use Client-Side binding is because of its response performance. I hope someone has the similar issue can shed some lights here. 

Thanks. 
Fraser
Top achievements
Rank 1
 answered on 27 Apr 2009
4 answers
638 views
Can anyone please tell me why this master page does not resize in the vertical dimension.  I need for the RadPanel and all of the other Rad controls to resize properly.  This is the last hurdle before this page works properly for our simplistic needs.  I set all of the height properties to 100%.  I just don't know what else to do!

Thank you,

Ryan Kirby

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="IGM.master.cs" Inherits="SparqWare.MasterPage.IGM" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head id="Head1" runat="server">  
    <title>Untitled Page</title> 
      
    <link href="../styles.css" rel="stylesheet" type="text/css" /> 
 
</head> 
<body > 
 
    <script type="text/javascript">     
    function panelMouseOver(sender, eventArgs)     
    {     
        if (eventArgs.get_item().get_text().indexOf("Folders") != -1 && blnDragging)     
        {     
            var multipage=$find('<%= RadMultiPage1.ClientID %>');     
            multipage.set_selectedIndex(eventArgs.get_item().get_index());     
        }  
    }  
      
    var blnDragging = false;  
    function OnClientItemClicking(sender, eventArgs) {  
        var multipage = $find('<%= RadMultiPage1.ClientID %>');  
        multipage.set_selectedIndex(eventArgs.get_item().get_index());  
    }      
    </script>    
      
    <form id="form2" runat="server">  
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager> 
      
      
    <table cellpadding="0" cellspacing="0">  
        <tr> 
            <td Width="290px" rowspan="3" style="border-top-style: solid; border-width: 1px; border-color: #666666; border-left-style: solid; border-width: 1px; border-color: #666666" > 
                <SFWeb:Image ID="imgCompany" runat="server" ImageUrl="~/Img/TeeMailer.png" /></td>  
            <td Width="500px" bgcolor="#8CBEFF" style="border-top-style: solid; border-width: 1px; border-color: #666666"></td> 
            <td Width="20%"   bgcolor="#8CBEFF" valign="top" 
                  
                style="border-right-style: solid; border-width: 1px; border-color: #666666; border-top-style: solid; border-width: 1px; border-color: #666666; padding-top: 1px; padding-right: 1px;">  
                <telerik:RadMenu ID="RadMenu1" Runat="server" Skin="Office2007" Width="180px">  
                    <Items> 
                        <telerik:RadMenuItem runat="server" Text="Home">  
                        </telerik:RadMenuItem> 
                        <telerik:RadMenuItem runat="server" Text="Help">  
                        </telerik:RadMenuItem> 
                        <telerik:RadMenuItem runat="server" Text="Logout">  
                        </telerik:RadMenuItem> 
                    </Items> 
                </telerik:RadMenu> 
            </td> 
        </tr> 
        <tr> 
            <td bgcolor="#8CBEFF"></td> 
            <td bgcolor="#8CBEFF" style="border-right-style: solid; border-width: 1px; border-color: #666666" width="20%"></td> 
        </tr> 
        <tr> 
            <td bgcolor="#8CBEFF"></td> 
            <td bgcolor="#8CBEFF" style="border-right-style: solid; border-width: 1px; border-color: #666666" width="20%"></td> 
        </tr> 
    </table> 
      
      
    <telerik:RadSplitter ID="RadSplitter1" runat="server"   
                         LiveResize="True"   
                         Width="100%"   
                         Height="100%">  
      
        <telerik:RadPane ID="RadPane1" runat="server" Width="200px" Height="100%" > 
 
 
            <telerik:RadMultiPage ID="RadMultiPage1" runat="server"   
                                  SelectedIndex="0"   
                                  Height="100%"   
                                  Width="198px"   
                                  BackColor="White"   
                                  BorderColor="#6593cf"   
                                  BorderStyle="Solid"   
                                  BorderWidth="1px">     
 
                <telerik:RadPageView ID="RadPageView1" runat="server" Height="100%">     
                    <div class="qsfexHeader">Favourite Folders</div>    
                </telerik:RadPageView>    
 
                <telerik:RadPageView ID="RadPageView2" runat="server" Height="100%">     
                    <div class="qsfexHeader">All Mail Folders</div>    
                </telerik:RadPageView>    
 
                <telerik:RadPageView ID="RadPageView3" runat="server" Height="100%">     
                    <div class="qsfexHeader">Calendar</div>    
                </telerik:RadPageView>    
                  
                <telerik:RadPageView ID="RadPageView4" runat="server" Height="100%">     
                    <div class="qsfexHeader">Others</div>    
                </telerik:RadPageView>    
                  
            </telerik:RadMultiPage>    
              
 
            <telerik:RadPanelBar ID="RadPanelbar2" runat="server"   
                                 ExpandMode="SingleExpandedItem"   
                                 OnClientItemClicking="OnClientItemClicking"   
                                 OnClientMouseOver="panelMouseOver"   
                                 Skin="Office2007"   
                                 Width="200px" 
                                 Height="100%">     
                <Items>    
                    <telerik:RadPanelItem Text="Favourite Folders" Expanded="True" ></telerik:RadPanelItem>    
                    <telerik:RadPanelItem Text="All Mail Folders" ></telerik:RadPanelItem>    
                    <telerik:RadPanelItem Text="Calendar" ></telerik:RadPanelItem>    
                    <telerik:RadPanelItem Text="Others" ></telerik:RadPanelItem>    
                </Items>    
            </telerik:RadPanelBar>    
          
   
        </telerik:RadPane> 
          
        <telerik:RadSplitBar ID="RadSplitBar1" runat="server" CollapseMode="Forward" Height="100%"/>  
          
        <telerik:RadPane ID="RadPane2" runat="server" Width="100%" Height="100%"  > 
          
                <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">     
                </asp:ContentPlaceHolder>   
      
        </telerik:RadPane> 
          
    </telerik:RadSplitter> 
    </form> 
</body> 
</html> 
 
jian
Top achievements
Rank 1
 answered on 27 Apr 2009
3 answers
282 views
Hi..
i have a column with hyperlink. i am exporting the grid in excel file.
i have set "ExportOnlyData = true" so it will not display data with hyperlink.
so to overcome from the problme i created on more column with same data without hyperlink.
initially i am setting it visible=false and while exporting i am setting it visible = true.
but it is not displaying the column in exported excel file.

code on export button click :
    protected void btnExport_Click(object sender, System.EventArgs e) 
    { 
        dg.MasterTableView.Columns.FindByUniqueName("Delete").Visible = false; 
        dg.Columns.FindByUniqueName("clName").Visible = false; 
        dg.Columns.FindByUniqueName("clNamePrint").Visible = true; 
 
        foreach (GridItem commandItem in this.dg.MasterTableView.GetItems(GridItemType.FilteringItem)) 
        { 
            commandItem.Visible = false; 
        } 
 
        dg.ExportSettings.FileName = Page.Title; 
        dg.ExportSettings.OpenInNewWindow = true; 
        dg.ExportSettings.ExportOnlyData = true; 
        dg.MasterTableView.ExportToExcel(); 
         
    } 


i have used custom paging in the grid.

this solution works fine with one gird in which custom paging is not used.

Thanks,
Daniel
Telerik team
 answered on 27 Apr 2009
2 answers
137 views
I have a RadGrid with a RadComboBox and linkbutton in a footer template of a GridTemplateColumn. When the linkbutton is clicked  I want to check if the value selected in the combobox exists in a particular column in the grid. Does anyone know how I can accomplish this with Javascript? Thanks in advance!

-Tracey
Tracey Kroll
Top achievements
Rank 1
 answered on 27 Apr 2009
1 answer
148 views
We are facing a problem with load testing on our application with Load Runner. The application is sustaining the load till around 1 hour, with 100 user. After this the application stops responding. On viewing the event log we find System.OutOFMemoryException being logged. We took the memory dump at the instance of failure and sent the dump to Microsoft for analysis.

The analysis from MIcrosoft is given below.
It shows a lot of pinned objects in memory. Some of whose GUID seems to be given. Also a screen with 4 RadGRid is creating many objects, as mentioned in the Summary below. Do you recognize the pattern given below? Can you please offer any solution? An early reply will be very much appreciated as this is urgent and may affect the Go-Live of a very big project.


We have a few pinned handles here, which are System.Object arrays:

Pinned Handles: 58

 

I looked at a couple of them to track down their roots, but couldn’t find any. The data in these appear to be something like this:

 

201cd4d0 6c69462f 20726574 4943432f 61465454 /Filter /CCITTFa

201cd4e0 63654478 2065646f 572f0a0d 68746469 xDecode ../Width

201cd4f0 32373120 2f0a0d38 67696548 32207468 1728../Height 2

201cd500 0d393032 69422f0a 65507374 6d6f4372 209../BitsPerCom

201cd510 656e6f70 3120746e 432f0a0d 726f6c6f ponent 1../Color

201cd520 63617053 442f2065 63697665 61724765 Space /DeviceGra

201cd530 2f0a0d79 676e654c 37206874 52203020 y../Length 7 0 R

201cd540 442f0a0d 646f6365 72615065 3c20736d ../DecodeParms <

 

Do you or your developers recognize this pattern?

 

I then looked up the System.Byte[] arrays...There are lots of these objects on the LOH, some as large as 8+ MB...

 

I traced some of these to PwC.Tobacco.Entities.TobaccoDisputeDocument & PwC.Tobacco.Entities.TobaccoNotice on thread 18. Further investigation shows that the source of these objects which are living long is Telerik.Web.UI.RadGrid, which roots PwC.Tobacco.Entities.TobaccoNotice via session. Session timeout itself isn't all that long - 20 minutes, but because they are in load testing, it appears to me that the process is running into this very quickly. Here’s the root:

 

ESP:347f2ac:Root: 2a0b61bc(Telerik.Web.UI.RadGrid)->

3c0426e0(ASP.pages_notification_viewpublishmsanotificationlist_aspx)->

5bcc7750(System.Web.HttpContext)->

1e0d21e8(System.Threading.Thread)->

1e0d4edc(System.Runtime.Remoting.Contexts.Context)->

1e0d4d50(System.AppDomain)->

1e11c29c(System.ResolveEventHandler)->

1e11b948(System.Web.Compilation.BuildManager)->

1e11c8b8(System.Web.Compilation.MemoryBuildResultCache)->

1e0e2a04(System.Web.Caching.CacheMultiple)->

1e0e2a1c(System.Object[])->

1e0e5614(System.Web.Caching.CacheSingle)->

1e0e5698(System.Web.Caching.CacheExpires)->

1e0e56b8(System.Object[])->

1e0e5740(System.Web.Caching.ExpiresBucket)->

4b0073d0(System.Web.Caching.ExpiresPage[])->

4b007454(System.Web.Caching.ExpiresEntry[])->

10771788(System.Web.Caching.CacheEntry)->

10771758(System.Web.SessionState.InProcSessionState)->

126649ac(System.Web.SessionState.SessionStateItemCollection)->

12664a0c(System.Collections.Hashtable)->

1316bedc(System.Collections.Hashtable+bucket[])->

1316becc(System.Collections.Specialized.NameObjectCollectionBase+NameObjectEntry)->

14acd12c(PwC.Tobacco.Entities.TobaccoNotice)->

 

Summary:

So there are 2 things that are contributing to the OOM here:

 

1. Many objects of type PwC.Tobacco.Entities.TobaccoNotice are rooted in session via Telerik.Web.UI.RadGrid

2. Pinned System.Object[] arrays.

Nikolay Rusev
Telerik team
 answered on 27 Apr 2009
6 answers
230 views
I am deploying a site on a hosted server that uses RadControls for ASPNET AJAX Q3 2008.  Everything runs fine locally.  The site is throwing the error below after the RadGrid runs through OnNeedDataSource.

Security Exception

Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SecurityException: Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
   System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) +150
   System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) +100
   System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction action, Boolean throwException) +284
   System.Security.PermissionSetTriple.CheckSetDemand(PermissionSet demandSet, PermissionSet& alteredDemandset, RuntimeMethodHandle rmh) +69
   System.Security.PermissionListSet.CheckSetDemand(PermissionSet pset, RuntimeMethodHandle rmh) +150
   System.Security.PermissionListSet.DemandFlagsOrGrantSet(Int32 flags, PermissionSet grantSet) +30
   System.Threading.CompressedStack.DemandFlagsOrGrantSet(Int32 flags, PermissionSet grantSet) +40
   System.Security.CodeAccessSecurityEngine.ReflectionTargetDemandHelper(Int32 permission, PermissionSet targetGrant, CompressedStack securityContext) +123
   System.Security.CodeAccessSecurityEngine.ReflectionTargetDemandHelper(Int32 permission, PermissionSet targetGrant) +54


Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053


Any help would be appreciated.
Doug
Top achievements
Rank 1
 answered on 27 Apr 2009
3 answers
112 views

 

I was using a trial version of ‘RadControls for ASPNET’.

 

Now I have updated to  purchased  version  of ‘RadControls for ASPNET AJAX 2009’.

 

All controls have upgraded to this version

 

But now all validation happens only at server side.

(I have used asp required field validator  to validate telerik date picker).

 

But validation happen only at server side when I call page.validate()

it  was  happening in client side itself before.

what to do now?


 

 

 

 

 

 

 

 

 

Sebastian
Telerik team
 answered on 27 Apr 2009
2 answers
104 views
Is it possible to programmatically open a web page in design view (in visual studio), loop through all of the controls and change the properties of every instance of one type of control?  For instance, I'd like to change to change to background color of every textbox on a page.  If I have a large number of textboxes on many webpages a programmatic approach to this is a real time saver.  An example of the general approach would be most helpful.

Thanks,
William Corry
Top achievements
Rank 1
 answered on 27 Apr 2009
12 answers
419 views
Hi,
Please how can I hide the CommanditemTemplate border ? I try to set the border width to 0px in CommanditemStyle and try to make it White color but all that worthless .. so is there any way to do it so my CommandItemTemplate look like it is separate from the Grid

Thank you

Ban
Ban
Top achievements
Rank 1
 answered on 27 Apr 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?