Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
311 views
I use EditMode="EditForms" for user to insert/edit item of the RedGrid. Once in the Edit/Insert form, how to force the user to either click  edit/insert button or Cancel button before leaving the Edit/Insert form ? Or at least providing a warning of losing data ?

Thanks a lot in advance !


Anna Gao
Top achievements
Rank 1
 answered on 01 Feb 2013
3 answers
299 views
Is thre a way to set the search box text from the client side?
ACubukcu
Top achievements
Rank 1
 answered on 01 Feb 2013
1 answer
112 views
I have a problem where all the links for the pages are set to "disabled" even though they have been enabled in the control and are showing up. 

Here is my declaring code:

<!-- TAB 1 -->
<asp:Panel ID="panelTab1" runat="server">
    <div>
        <telerik:RadGrid ID="DataFeedGrid" runat="server" AllowSorting="true" AllowPaging="true"
            AllowCustomPaging="true" OnSortCommand="Grid_Sorting" OnPageIndexChanged="Grid_Paging"
            Skin="Vista" meta:resourcekey="DataGrid">
            <MasterTableView AutoGenerateColumns="False" EnableNoRecordsTemplate="true" ShowHeadersWhenNoRecords="false"
                 NoMasterRecordsText="No records match the search criteria.">
                <Columns>
                    <telerik:GridBoundColumn
                        ItemStyle-Width="125px" meta:resourcekey="GridBoundColumn1" />
                    <telerik:GridBoundColumn
                        ItemStyle-Width="100px" meta:resourcekey="GridBoundColumn2" />
                    <telerik:GridTemplateColumn >
                        <HeaderTemplate>
                            <asp:CheckBox ID="cbHdrFlightExplorer" runat="server" />
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:CheckBox ID="cbFlightExplorer" runat="server"  />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
            <AlternatingItemStyle BackColor="#E9E9E9" />
            <PagerStyle Mode="NumericPages" />
            <ClientSettings>
                <ClientEvents OnGridCreated="OnClientGridCreated" />
            </ClientSettings>
        </telerik:RadGrid>
    </div>

Here is the code in question it generates in relation to paging:
<td class="rgPagerCell NumericPages"><div class="rgWrap rgNumPart">
                        <a onclick="return false;" disabled="disabled" class="rgCurrentPage"><span>1</span></a><a disabled="disabled"><span>2</span></a><a disabled="disabled"><span>3</span></a><a disabled="disabled"><span>4</span></a>
                    </div><div class="rgWrap rgInfoPart">
                          Displaying page 1 of 4, items 1 to 2 of 8.
                    </div></td>

I can not find any code client side or server side that causes this behavior. 

Can anyone help?
Wade
Top achievements
Rank 1
 answered on 01 Feb 2013
5 answers
463 views
Hello,
I've been using the self referencing capability of the RadGrid for some time now. Today I was loading data in to the DB that the grid is pulling from and the grid starting throwing out of memory exceptions.

This grid is fully functional, and I had been using test data sets of up to several hundred rows. When I loaded the real data set of just over 6500 rows the grid started throwing the error. I was able to get it work up to 3400 rows, after that the error is thrown. Page processing takes a couple of minutes when it's trying to load the data, during which you can see it taking up memory little by little until .NET tells it to take a hike. The system has 8GB of memory installed, and a test server has 4GB. Fails on both.

This is clearly a bug to me. This is basic text, each row contains a couple of GUIDs and a single text sentence, and it can't handle a few thousand rows? DataTables, GridViews, et all, work without issue.

There is no paging enabled on this grid nor can there be, as it is a grid of a hierarchy that needs to keep expanding.

Please let me know if there is something wrong with my setup, or if there is a known fix. My markup is below, as well as the error message.

<telerik:RadGrid runat="server" ID="TaxonomiesRadGrid" AllowMultiRowSelection="true" Visible="false"  
    OnNeedDataSource="TaxonomiesRadGrid_NeedDataSource" Skin="WebBlue" AutoGenerateColumns="false"  
    Width="100%" GridLines="None" MasterTableView-GridLines="None" ClientSettings-AllowGroupExpandCollapse="true"  
    OnItemCreated="TaxonomiesRadGrid_ItemCreated" ShowStatusBar="true" OnInsertCommand="TaxonomiesRadGrid_InsertCommand"  
    OnUpdateCommand="TaxonomiesRadGrid_UpdateCommand" OnDeleteCommand="TaxonomiesRadGrid_DeleteCommand">  
    <MasterTableView HierarchyDefaultExpanded="false" HierarchyLoadMode="Client" CommandItemDisplay="Top"  
        CommandItemSettings-AddNewRecordText="Add a new Taxonomy Parent" EditMode="InPlace"  
        NoMasterRecordsText="No taxonomy items to display. Please add an item using the link above."  
        DataKeyNames="taxonomyItemId, taxonomyParentId">  
        <SelfHierarchySettings ParentKeyName="taxonomyParentId" KeyName="taxonomyItemId"  
            MaximumDepth="100" />  
        <Columns>  
            <telerik:GridBoundColumn DataField="taxonomyText" DataType="System.String" HeaderText="Taxonomy Description"  
                SortExpression="taxonomyText" UniqueName="taxonomyText">  
            </telerik:GridBoundColumn>  
            <telerik:GridEditCommandColumn ButtonType="PushButton" ItemStyle-Width="120px" ItemStyle-HorizontalAlign="Right">  
            </telerik:GridEditCommandColumn>  
            <telerik:GridClientDeleteColumn ButtonType="PushButton" ItemStyle-Width="50px" ItemStyle-BorderWidth="0px"  
                ItemStyle-HorizontalAlign="Center" ConfirmText="Are you sure you want to delete this taxonomy item and any items beneath it?">  
            </telerik:GridClientDeleteColumn>  
        </Columns>  
    </MasterTableView>  
    <ClientSettings AllowExpandCollapse="true" AllowGroupExpandCollapse="true">  
    </ClientSettings>  
</telerik:RadGrid>  


Server Error in '/NTTR' Application.  
  
Exception of type 'System.OutOfMemoryException' was thrown.  
  
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.   
  
Exception Details: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.  
  
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:   
  
  
[OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.]  
   System.String.GetStringForStringBuilder(String value, Int32 startIndex, Int32 length, Int32 capacity) +29  
   System.Text.StringBuilder.GetNewString(String currentString, Int32 requiredLength) +69  
   System.Text.StringBuilder.Append(String value) +97  
   System.Web.UI.ScriptControlManager.RegisterScriptsForScriptDescriptors(IEnumerable`1 scriptDescriptors, Control control) +240  
   System.Web.UI.ScriptControlManager.RegisterScriptDescriptors(IScriptControl scriptControl) +113  
   System.Web.UI.ScriptManager.RegisterScriptDescriptors(IScriptControl scriptControl) +21  
   Telerik.Web.UI.RadCompositeDataBoundControl.RegisterScriptDescriptors() +37  
   Telerik.Web.UI.RadCompositeDataBoundControl.RenderContents(HtmlTextWriter writer) +38  
   Telerik.Web.UI.RadGrid.RenderContents(HtmlTextWriter writer) +56  
   Telerik.Web.UI.GridBaseDataList.Render(HtmlTextWriter writer) +88  
   Telerik.Web.UI.RadGrid.Render(HtmlTextWriter writer) +125  
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27  
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99  
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25  
   Telerik.Web.UI.ControlRenderer.Render(HtmlTextWriter writer) +84  
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27  
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99  
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25  
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134  
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19  
   System.Web.UI.Control.Render(HtmlTextWriter writer) +10  
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27  
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99  
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25  
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134  
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19  
   System.Web.UI.UpdatePanel.RenderChildren(HtmlTextWriter writer) +234  
   System.Web.UI.Control.Render(HtmlTextWriter writer) +10  
   System.Web.UI.UpdatePanel.Render(HtmlTextWriter writer) +34  
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27  
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99  
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25  
   Telerik.Web.UI.PreControlToAjaxify.Render(HtmlTextWriter writer) +112  
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27  
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99  
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25  
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134  
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19  
   System.Web.UI.Control.Render(HtmlTextWriter writer) +10  
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27  
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99  
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25  
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134  
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19  
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +163  
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32  
   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +51  
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27  
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99  
   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40  
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134  
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19  
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32  
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27  
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99  
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25  
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134  
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19  
   System.Web.UI.Control.Render(HtmlTextWriter writer) +10  
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27  
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99  
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25  
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134  
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19  
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29  
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27  
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99  
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25  
   Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +594  
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256  
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19  
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29  
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27  
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99  
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25  
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266  
  
Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4016  

Pavlina
Telerik team
 answered on 01 Feb 2013
1 answer
167 views
I have a 3 layer multi grid, on the firest layer of the grid, I have a dropdown tempaltes, click one of the item on the dropdown, will open a radwindow. The grid set

 

 

HierarchyLoadMode="Client"

 



I set the each layer of the grid view with with Width="98%"
when I use AllowColumnResize="true" and UseStaticHeaders="true", and when all the grid level are expand,  everytime when I  below code to open pop up radwindow, the grid colum won't fit the winow well, instead it bumps to the left side for the second and third level of the grid. see attachment. It looks like AllowColumnResize="true"  and UseStaticHeaders="true" won't work for hierarchy grid. also, if try to resize (expand)the seocnd or third level of the grid, the grid will go out of the window width.

 

 

StringBuilder sbShowwndProcHist = new StringBuilder();

 

sbShowwndProcHist.Append(

 

"radopen(null, 'wndProcHist');");

 

 

 

ScriptManager.RegisterStartupScript(this, GetType(), "ViewwndProcHistKey", sbShowwndProcHist.ToString(), true);

 

<ClientSettings EnableRowHoverStyle="true" AllowColumnsReorder="true" ColumnsReorderMethod="Reorder"
                       ReorderColumnsOnClient="true">
                       
                      <Scrolling AllowScroll="true" ScrollHeight="" UseStaticHeaders="true" />
                       <Resizing AllowColumnResize="true" EnableRealTimeResize="true"  AllowResizeToFit="true"                 
   </ClientSettings>


Please help!
Pavlina
Telerik team
 answered on 01 Feb 2013
6 answers
363 views
Ok so I have some javascript in my RadGrid ItemTemplate of a GridTemplateColumn that does some calculations which fires just fine on the intial page load. But after I hit refresh on the commandbar it disappears, the RadGrid is wrapped in an Ajax Panel. how would I be able to call the javascript again?

 

<telerik:GridTemplateColumn DataField="TotalSize" DataType="System.String" HeaderText="Size" UniqueName="Size">
                 <ItemTemplate>
                      <script type="text/javascript">
                      ...
                      </script>
                </ItemTemplate>
 </telerik:GridTemplateColumn>

 

 

 

 

Pat Huesers
Top achievements
Rank 1
 answered on 01 Feb 2013
5 answers
371 views
Hi,
           I have a ASP.Net page having  the RadTabStrip and RadMultiPage. Each RadPageView has only one RadGrid having width 99% and Height 100%. RadGrid are using the Skin = Office2010Silver. Now, I do have Horizontal Scroll bar when columns with are more then the space. But I do not have the Vertical Scroll bars. 
            I tried setting the Height, and also the ScrollHeight to 70 px (while height was 100%). Any suggestions, When there are more items, it does not even show all items and also the horizontal scroll bar does not show up as its at the bottom.
Pavlina
Telerik team
 answered on 01 Feb 2013
1 answer
93 views
Hi guys,

We have been customizing the RadScheduler for our application and it is going very well so far...we're very impressed with its capabilities. We have, however, run into a problem. We are subscribing to the OnClientAppointmentResizing event and we have the need to know the resulting size of the resized appointment during the resizing process, i.e. something like this:

function OnClientAppointmentResizing(sender, eventArgs)
{
// var newStartDate = eventArgs... (?)
// var newEndDate = eventArgs...(?)
// ...do something with these values
}

Now the eventArgs parameter only seems to give access to the appointment object (which doesn't have dynamically changing start and end times) and  to the 'target slot'. The target slot seems to be somewhat useless though...using it alone I don't believe that one can derive the resulting start and end date of the appointment because one doesn't know if the appointment is being resized from above or below.

Am I missing something here? This seems like it should be a straight-forward task. Any help would be appreciated.

Cheers,
Sam



Boyan Dimitrov
Telerik team
 answered on 01 Feb 2013
3 answers
231 views
Hi,

I have a RadGrid control with multiple template columns, most of the template are defined like this

<table class="itemLinkColumnTable">
<tr>
<td class="imageColumn"> <img runat="server" id="Icon" class="itemIcon" align="top" /> </td>
        <td> <a id="Link" runat="server" class="titleText" href="javascript:void(0);"> </a> </td>
</tr>
</table>

The template has an Image and a link next to it.  It works fine when the Grid view is displays in the browser, but when I export this to PDF / Excel or Word by setting this property and clicking on the export button on the browser

RadGrid.MasterTableView.CommandItemSettings.ShowExportToPdfButton = true;<br><span style="font-size: 11px; line-height: 1.4;">RadGrid.MasterTableView.CommandItemSettings.ShowExportToExcelButton = true;</span><br><span style="font-size: 11px; line-height: 1.4;">RadGrid.MasterTableView.CommandItemSettings.ShowExportToWordButton = true;</span>

In the exported data the Template Columns are left as blank.  When on the export settings I set the ExportOnlyData="false"
I see all kinds of garbage being exported. Please have a look at the attached screen shot.

Why is the grid not being exported the way it looks in the browser ? Please let me know how to achieve this.

Thanks
Daniel
Telerik team
 answered on 01 Feb 2013
8 answers
586 views
Hi,
i've a radmenu and this code javascript for open the radwindow:
<telerik:RadMenu ID="RadMenu1" Runat="server" EnableRoundedCorners="True"
OnClientItemClicked="MenuOpenWindow"
EnableShadows="True" Skin="Sunset" style="top: 0px; left: 0px">
.....
function MenuOpenWindow(sender, eventArgs) {
if (eventArgs.get_item().get_text() == "Nuova immagine") {
$find("<%= RadWindowLoadprofile.ClientID %>").show();
return false;
}
}

this code perfect function but when i click on item child, this item is selected instead I do not want this. How can I do?

see the image

Boyan Dimitrov
Telerik team
 answered on 01 Feb 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?