Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
78 views

Hi,

I am using radgrid with 4 pages where pagesize is set to 15.Now i navigate to page 2 edit  some of cells and come back to
page 1 and click on save when try to loop through the grid items using
  foreach (GridDataItem ObjeACH in rdGrdMenu.Items)
            {
} I will get only first 15 items of first page.
I want to loop through all items of grid. How can i do that ? is there any way to accomplish ??

Regards,
Akki
Pavlina
Telerik team
 answered on 14 Jun 2012
4 answers
876 views
Hi,
I've set the data source of the RadGrid dynamically. Now I'm trying to set the cell formatting of the RadGrid because in my case i've to set different formatting (bold, italic, underline etc) of the each grid cell. For example, i want to set the font bold to true for the only first row and first column which will be basically first cell of the grid. i.e.

I've tried to do using the following code but in vain. One more thing, i'm not able to see the cell value at this point. I've tried both the ItemCreated and ItemDataBoudn event but nothing is working for me.

protected

 

void RadGridComparableAnalysis_ItemDataBound(object sender, GridItemEventArgs e) {

 

      

if (e.Item is GridDataItem) {

 

        e.Item.Cells[0].Font.Bold =

true
    }
}

 

 

Jim Foster
Top achievements
Rank 1
 answered on 14 Jun 2012
3 answers
123 views
Hi!

I am trying to do some javascript work in my RadGrid insert item template, but it won't even do an alert for me.  No error on my Chrome console or anything, just when I click "insert item" and it loads up the edit template, none of the javascript runs.  

Help!

 -Brett
Eyup
Telerik team
 answered on 14 Jun 2012
5 answers
133 views
I've been using RadToolTipManager in medium trust environment without any problems. Since upgrading to the 2012 Q2 release I get the following exception. Nothing changed on the page or the environment except upgrading from 2012 Q1 to Q2.

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 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 failed.] 
System.Security.CodeAccessSecurityEngine.ThrowSecurityException(RuntimeAssembly asm,
    PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh
    , SecurityAction action, Object demand, IPermission permThatFailed) +168
System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString,
    PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh,
    SecurityAction action, Object demand, IPermission permThatFailed) +100
System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants,
    PermissionSet refused, PermissionSet demands, RuntimeMethodHandleInternal rmh,
    Object assemblyOrString, SecurityAction action, Boolean throwException) +278
System.Security.PermissionSetTriple.CheckSetDemand(PermissionSet demandSet,
    PermissionSet& alteredDemandset, RuntimeMethodHandleInternal rmh) +69
System.Security.PermissionListSet.CheckSetDemand(PermissionSet pset,
    RuntimeMethodHandleInternal rmh) +156
System.Security.PermissionListSet.DemandFlagsOrGrantSet(Int32 flags, PermissionSet grantSet) +33
System.Security.CodeAccessSecurityEngine.ReflectionTargetDemandHelper(
    Int32 permission, PermissionSet targetGrant, CompressedStack securityContext) +128
System.Security.CodeAccessSecurityEngine.ReflectionTargetDemandHelper(Int32 permission,
    PermissionSet targetGrant) +54
Marin Bratanov
Telerik team
 answered on 14 Jun 2012
5 answers
134 views
Hi,

I set up a simple example of the issue I'm seeing, using one of the free demos online.  The mark-up for the splitter looks like this.

<telerik:RadSplitter id="RadSplitter1" runat="server" height="200" width="500">
                <telerik:RadPane id="RadPane1" runat="server">Left Pane -
                    set to <b>free</b> size </telerik:RadPane>
                <telerik:RadSplitBar id="RadSplitbar1" runat="server"></telerik:RadSplitBar>
                <telerik:RadPane id="RadPane2" runat="server">Middle Pane - set to <b>free</b> size </telerik:RadPane>
                <telerik:RadSplitBar id="RadSplitbar2" runat="server"></telerik:RadSplitBar>
                <telerik:RadPane id="Radpane3" runat="server">End Pane - set to <b>free</b> size
                </telerik:RadPane>
            </telerik:RadSplitter>

While in run-time the splitter control and all panes display correctly, but in DesignMode the panes are displayed on top of each other, instead of side by side.

Is there any way to correct the look of the panes in DesignMode?

Thanks in advance,
Tom

Dobromir
Telerik team
 answered on 14 Jun 2012
3 answers
254 views
Hi,
I have one rad grid with export to pdf functionality. I have put one html table in item command template which contains, image, report name, generated datetime etc. I add this table which looks like report header. But when I click on export to pdf link in command item template, it does not export command item template data. If I remove table and write text direct into command item template than it works fine and I can see text from command item template to pdf. But I can't format header data without table so I can't remove table from command item template. Export to excel and word works fine.

Can any one help me in this? Columns in below grid are generating at run time.

<telerik:RadGrid ID="radGridReportData" runat="server" BorderStyle="None" GridLines="None"
        AutoGenerateColumns="false" ShowFooter="true" Width="1000px" AllowPaging="false"
        AllowSorting="true" AllowFilteringByColumn="true" AllowAutomaticUpdates="false"
        ShowGroupPanel="false" OnNeedDataSource="radGridReportData_NeedDataSource" OnItemCommand="radGridReportData_ItemCommand"
        OnItemCreated="radGridReportData_ItemCreated" OnItemDataBound="radGridReportData_ItemDataBound">
        <ExportSettings IgnorePaging="true" OpenInNewWindow="true">
            <Pdf PageHeight="210mm" PageWidth="297mm" PageBottomMargin="20mm" PageTopMargin="20mm"
                PageLeftMargin="20mm" PageRightMargin="20mm" />
        </ExportSettings>
        <ClientSettings AllowGroupExpandCollapse="True" ReorderColumnsOnClient="False" AllowDragToGroup="false"
            AllowColumnsReorder="False" EnableRowHoverStyle="True">
            <Selecting AllowRowSelect="false" />
            <ClientEvents OnGridCreated="OnGridCreated" />
        </ClientSettings>
        <GroupingSettings ShowUnGroupButton="true" CaseSensitive="false" />
        <MasterTableView Width="100%" CommandItemDisplay="Top" GroupLoadMode="Client" ShowGroupFooter="true">
            <CommandItemTemplate>
                <div>
                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                        <tr>
                            <td colspan="2" valign="top" align="center" style="color: White; font-weight: bold;
                                font-size: 16px;">
                                <%# radComboReport.Text %>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" valign="top" style="color: White;">
                                <table border="0" cellpadding="0" cellspacing="0" width="1000px">
                                    <tr>
                                        <td valign="top" style="color: White; width: 800px;">
                                            <b>Source: </b>
                                            <%# radComboSource.Text %>
                                        </td>
                                        <td valign="top" style="color: White;">
                                            <b>Run By:</b>
                                            <%# GetUserName() %>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td valign="top" style="color: White; width: 800px;">
                                            <b>Recon: </b>
                                            <%# radRecons.Text %>
                                        </td>
                                        <td valign="top" style="color: White;">
                                            <b>Run Date:</b>
                                            <%# System.DateTime.Now.ToShortDateString() %>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td valign="top" style="color: White;">
                                <asp:CheckBox ID="chkShowHideFilters" runat="server" CssClass="tdText" Checked="false"
                                    onclick="showHideFilterItem(this.checked);" />
                                <b>Show Filter</b>
                            </td>
                            <td align="right" valign="top" style="color: White;">
                                <b>Export</b
                                <asp:LinkButton ID="btnExportToExcel" runat="server" CommandName="ExportToExcel">
                                                    <img src="Images/Icons/excel.png" alt="Export to Excel" style="border: 0px; vertical-align: middle;" />
                                                       
                                </asp:LinkButton>
                                  
                                <asp:LinkButton ID="btnExportToWord" runat="server" CommandName="ExportToWord">
                                                    <img src="Images/Icons/word.png" alt="Export to Word" style="border: 0px; vertical-align: middle;" />
                                                       
                                </asp:LinkButton>
                                  
                                <asp:LinkButton ID="btnExportToPDF" runat="server" CommandName="ExportToPdf">
                                                    <img src="Images/Icons/pdf.png" alt="Export to PDF" style="border: 0px; vertical-align: middle;" />
                                                       
                                </asp:LinkButton>
                            </td>
                        </tr>
                    </table>
                </div>
            </CommandItemTemplate>
            <HeaderStyle Font-Bold="true" />
            <Columns />
        </MasterTableView>
    </telerik:RadGrid>
Vatsal
Top achievements
Rank 2
 answered on 14 Jun 2012
12 answers
311 views
Hi,
     i am new in telerik control.
     i want to use image rotator using Carousel mode. Like:
    
     http://demos.telerik.com/aspnet-ajax/rotator/examples/carouselmode/defaultcs.aspx

      in this demo the images comes from a specific folder.
     
      i want to load the rotator's images from sql database. is their any help...for me ?
     
David
Top achievements
Rank 1
 answered on 14 Jun 2012
2 answers
72 views
Hi
I made one page in which i dynamically bind item templates to radgrid now if i use ClientSettings>>Scrolling tag for freeze number of columns than it will show both scroll bar that i doesnt want because there already two vertical scrollbars on popup page and main page in which rad grid will display. I tried some jquery or css for lock first column with overflow-x:auto; where i succeed getting only horizontal srollbar but failed to lock first column so is there any way for achieve this issue ?
Advance thanks!
Mayur
Top achievements
Rank 1
 answered on 14 Jun 2012
2 answers
57 views
Hi all :)

I'd like to add a buttonColumn only for few lines of my radgrid.
For example, it could be the lines where one of my database field has is value to "true"
I don't know how to make that.

Thx
Caro
Top achievements
Rank 1
 answered on 14 Jun 2012
5 answers
466 views
I have a RadGrid in a FormView.  I bind to the FormView with an object datasource. The grid binds to a List that is a property of the object datasource object.   The first time loading the page (in Edit Mode) which retrieves a record everything works fine and the grid binds to the List.    When I hit Submit to save everything I get the error.  We are running 2010.1.415.35
                    <telerik:RadGrid   
                        ID="RegGrid"   
                        runat="server" 
                        Skin="Windows7"   
                        BorderStyle="None" 
                        GridLines="None"   
                        Width="650px"   
                        PageSize="20"   
                        AllowFilteringByColumn="true" 
                        AllowSorting="True"   
                        ShowFooter="True"   
                        AllowPaging="True"   
                        AutoGenerateColumns="False" 
                        EnableLinqExpressions="false"   
                        AllowAutomaticInserts="false"   
                        AllowAutomaticUpdates="false" 
                        AllowAutomaticDeletes="false"    
                        OnItemCreated="RegGrid_ItemCreated" 
                        OnItemCommand="RegGrid_ItemCommand" 
                        OnItemDataBound="RegGrid_ItemDataBound" 
                        OnDeleteCommand="RegGrid_DeleteCommand" 
                        OnInsertCommand="RegGrid_InsertCommand" 
                        OnUpdateCommand="RegGrid_UpdateCommand" 
                        OnNeedDataSource="RegGrid_NeedDataSource">  
                        <ClientSettings> 
                            <Selecting AllowRowSelect="false" /> 
                        </ClientSettings> 
                        <MasterTableView   
                            DataKeyNames="regRequest,item" 
                            EditMode="InPlace" 
                            AllowFilteringByColumn="True" 
                            ShowFooter="True"   
                            CommandItemDisplay="Top"   
                            InsertItemPageIndexAction="ShowItemOnCurrentPage" 
                            CommandItemSettings-AddNewRecordText="Add Package"   
                            ItemStyle-VerticalAlign="top" 
                            AlternatingItemStyle-VerticalAlign="top"   
                            HeaderStyle-HorizontalAlign="Center">  
                            <Columns> 
                                <telerik:GridTemplateColumn AllowFiltering="false">  
                                    <ItemTemplate> 
                                        <asp:LinkButton ID="LinkButton2" runat="server" CommandName="Edit">Edit</asp:LinkButton> 
                                        <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Delete" OnClientClick="javascript:return confirm('Delete this Reg Item?')">Delete</asp:LinkButton> 
                                    </ItemTemplate> 
                                    <EditItemTemplate> 
                                        <asp:LinkButton ID="LinkButton3" runat="server" Text='<%# ((GridItem)Container).OwnerTableView.IsItemInserted? "Insert" : "Update" %>' 
                                            CommandName='<%# ((GridItem)Container).OwnerTableView.IsItemInserted? "PerformInsert" : "Update" %>'></asp:LinkButton> 
                                        <asp:LinkButton ID="LinkButton4" runat="server" CommandName="Cancel">Cancel</asp:LinkButton> 
                                    </EditItemTemplate> 
                                </telerik:GridTemplateColumn> 
                                <telerik:GridBoundColumn DataField="regRequest" Visible="false" /> 
                                <telerik:GridDropDownColumn UniqueName="ddcRegItems" DataField="item" ListTextField="name" ListValueField="item"   
                                     DataSourceID="sqlRegRequestItem" HeaderText="Reg Item" DropDownControlType="DropDownList" EmptyListItemText="- Select A Package -" EmptyListItemValue="0" /> 
                                <telerik:GridBoundColumn DataField="quantity" HeaderText="Qty" DataFormatString="{0:n}" /> 
                                <telerik:GridBoundColumn DataField="price" HeaderText="Price" DataFormatString="{0:C}" ReadOnly="true" /> 
                                <telerik:GridCalculatedColumn HeaderText="Total (USD)" UniqueName="ExtendedPrice"   
                                    DataType="System.Double" DataFields="quantity, price" Expression="{0}*{1}" FooterText="Total : " 
                                    Aggregate="Sum" DataFormatString="{0:C}" /> 
                            </Columns> 
                        </MasterTableView> 
                        <PagerStyle Mode="NextPrevAndNumeric" /> 
                    </telerik:RadGrid> 
    protected void RegGrid_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)  
    {  
          
        RIM.Event.Resources.Regcode.Request _request = (RIM.Event.Resources.Regcode.Request)(Session["Request"]);  
        if (_request != null)  
        {  
            // SELECT NON-DELETED ITEMS  
            List<RegItem> _regitems = _request.regItems.FindAll(p => p.deleted != true);  
              
            ((RadGrid)source).DataSource = _regitems;  
        }  
    } 
Meera
Top achievements
Rank 1
 answered on 14 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?