Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
331 views

Hi, I have a radgrid, which has some columns created dynamically from code-behind, and rest of the columns are auto generated coming from the DataSource. The dynamic columns are : 1) CheckBox Column created through GridClientSelectColumn from backend(VB) 2)the remaining are a DropDown an TextBox created inside a GridTemplateColumn from backend(VB). I have also created hidden input field, to hold the values  fromt he dropdown and the textbox respectively. 

I followed some of the solution provided in the forum, Unfortunately, no success. Can anybody please help me to export this data. As of now, if i try to export in excel or pdf, I am getting a blank column in place of the textbox and "select" in the column representing the DropdownList and "False" in the column representing the CheckBox Column. Please advice or point to me in the right direction

I tried iterating the entire grid, and copy the selected value from the dropdownlist, but it is throwing a NullException, the values from TextBox is Empty

Thanks, in advance

Elena
Telerik team
 answered on 04 Oct 2018
3 answers
120 views

I have an issue that when editor loads in first, it shows the default font-size = 3. That seems nice.
But when you start typing, it will will include in html the selected font size.

only if you select some text, change the font size from 3 to something else, and then change back to 3, it will include the contents in html

Is there anyway that it shows the default font size = 3, so it should auto append HTML for that font size=3 in the html?

 

thank you

 

Rumen
Telerik team
 answered on 04 Oct 2018
1 answer
185 views

Hi,
    I'm trying to set the toggle state of a button in a togglelist from client side code but nothing I try works. 

<telerik:RibbonBarGroup Text="Status Filter">
           <Items>
               <telerik:RibbonBarToggleList>
                   <ToggleButtons>
                       <telerik:RibbonBarToggleButton Value="StatusFilterAll" Size="Medium" Text="All" Toggled="true" />
                       <telerik:RibbonBarToggleButton Value="StatusFilterOpen" Size="Medium" Text="Open" />
                       <telerik:RibbonBarToggleButton Value="StatusFilterInProgress" Size="Medium" Text="In Progress" />
                       <telerik:RibbonBarToggleButton Value="StatusFilteronHold" Size="Medium" Text="On Hold" />
                       <telerik:RibbonBarToggleButton Value="StatusFilterClosed" Size="Medium" Text="Closed" />
                       <telerik:RibbonBarToggleButton Value="StatusFilterAllExClosed" Size="Medium" Text="All Except Closed" />
                   </ToggleButtons>
               </telerik:RibbonBarToggleList>
           </Items>
       </telerik:RibbonBarGroup>

 

I have tried 

ServiceDeskRibbonbar.findToggleButtonByValue("StatusFilterAll").get_toggleList().set_toggledButton(ServiceDeskRibbonbar.findToggleButtonByValue("StatusFilterAll" ))

 

This does not seem to do anything. I have also tried 

ServiceDeskRibbonbar.findToggleButtonByValue("StatusFilterAll" ).set_toggled(true)

 

This selects that item but the previous item still stays selected as well and the OnClientToggleListToggled is never fired.

So what is the correct way to achieve this?

Thanks

Marin Bratanov
Telerik team
 answered on 04 Oct 2018
1 answer
131 views

I  installed Telerik version "2010.3.1109.40" on  windows 10 machine and launched an asp.net web-site , i am getting an error "The page cannot be accessed because the related configuration data for the page is invalid and points to "Telerik_Web_UI_WebResource_axd" in web.config file. See attached file

Any ideas on how to trouble shoot.

Marin Bratanov
Telerik team
 answered on 04 Oct 2018
3 answers
358 views
Hello,

I am developing a web site to target mobile devices and So to save space i want to display error messages inside the Radtextbox if validation fails. Is this possible?

Thank you,
Saira
Marin Bratanov
Telerik team
 answered on 04 Oct 2018
1 answer
115 views

Since there doesn't appear to be a Telerik RequiredFieldValidator (or something similar) and we have to use the asp:RequiredFieldValidator ... how can we "Skin" the resulting Text output when validation is trigger?  Without being able to Skin validators thru the SkinManager it sorta makes the asp:RequiredFieldValidator useless.

Any suggestions?  Alternative approaches?

ON A SIDE NOTE: The sample code to display the validator error text inside the RadTextBox control doesn't appear to work: https://docs.telerik.com/devtools/aspnet-ajax/controls/textbox/features/validation

 

Cheers, Rob.

Marin Bratanov
Telerik team
 answered on 04 Oct 2018
5 answers
348 views

Hi

We are using a 2 language system and set the headers of the RadGrid according to the user's selected language and works fine for display. The RadGrid should be able to export to Excel and CSV. The excel exports the headers correctly, but the CSV only uses default column names set in the ASPX file. We are using version 2015.2.729. Here is an abbreviated version of our code:

<telerik:RadGrid ID="grdBlocked" runat="server" AutoGenerateColumns="False" OnItemDataBound="grdBlocked_ItemDataBound" OnNeedDataSource="grdBlocked_NeedDataSource" OnInfrastructureExporting="grdBlocked_InfrastructureExporting" OnGridExporting="grdBlocked_GridExporting" OnItemCommand="grdBlocked_ItemCommand">
                    <ExportSettings ExportOnlyData="True" IgnorePaging="true">
                        <Excel Format="Xlsx" FileExtension=".xlsx" />
                    </ExportSettings>
                    <MasterTableView DataKeyNames="StudentNumber, DateBlocked" CommandItemDisplay="Top">
                        <CommandItemSettings ExportToPdfText="Export to PDF" ShowAddNewRecordButton="False" ShowExportToCsvButton="True" ShowExportToExcelButton="True" ShowExportToPdfButton="False" ShowExportToWordButton="False" ShowRefreshButton="False"></CommandItemSettings>
                        <Columns>
                            <telerik:GridBoundColumn DataField="StudentNumber" HeaderText="Student number" UniqueName="StudentNumber"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Name" HeaderText="Student Name" UniqueName="Name"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="DateBlocked" HeaderText="Date" UniqueName="Date" DataType="System.DateTime" DataFormatString="{0:yyyy/MM/dd HH:mm}"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="BlockedUser" HeaderText="User" UniqueName="User"></telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>

 

Code behind (read comments):

using System;
using System.Web.UI;
using Telerik.Web.UI;
 
namespace WritingCentreOnlineBookings.Reports
{
    public partial class BlockedAccounts : System.Web.UI.Page
    {
        private Includes.Site masterPage = new Includes.Site();
        private WebAPICalls MyWebAPI = new WebAPICalls();
 
        protected void BindData()
        {
            grdBlocked.DataSource = MyWebAPI.GetDataTable("GetBlockedStudents");
            grdBlocked.DataBind();
        }
 
        protected void grdBlocked_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
        {
            if (e.Item.ItemType == GridItemType.Header)
            {
                GridHeaderItem header = (GridHeaderItem)e.Item;
                header["StudentNumber"].Text = (masterPage.LanguageCode == "afr" ? "Studentenommer" : "Student number");
                header["Name"].Text = (masterPage.LanguageCode == "afr" ? "Naam van student" : "Student name");
                header["Date"].Text = (masterPage.LanguageCode == "afr" ? "Datum" : "Date");
                header["User"].Text = (masterPage.LanguageCode == "afr" ? "Geblok deur" : "Blocked by");
            }
        }
 
        protected void Page_Load(object sender, EventArgs e)
        {
            masterPage = (Includes.Site)Master;
 
            if (!Page.IsPostBack)
            {
                BindData();
            }
        }
 
        protected void grdBlocked_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            grdBlocked.DataSource = MyWebAPI.GetDataTable("GetBlockedStudents");
        }
 
        //Tried to change the column headers here, but it never gets called for CSV, only for excel
        protected void grdBlocked_InfrastructureExporting(object sender, GridInfrastructureExportingEventArgs e)
        {
            for (int i = 2; i <= e.ExportStructure.Tables[0].Rows.Count; i++)
            {
                var cell = e.ExportStructure.Tables[0].Cells[1, i];
                //Forces the student number to be text in Excel
                cell.Format = "@";
                cell = e.ExportStructure.Tables[0].Cells[3, i];
                cell.Value = ((DateTime)cell.Value).ToString("yyyy-MM-dd HH:mm");
            }
        }
 
        //Documentation suggests this is the place to add customization. It gets called, but does not seem to have an effect
        protected void grdBlocked_GridExporting(object sender, GridExportingArgs e)
        {
            GridItem[] headerItems = grdBlocked.MasterTableView.GetItems(GridItemType.Header);
            headerItems[0].Cells[2].Text = (masterPage.LanguageCode == "afr" ? "Studentenommer" : "Student number");
        }
 
        //Also tried to rebind, just to make sure the column headers are loaded
        protected void grdBlocked_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == RadGrid.ExportToCsvCommandName)
            {
                grdBlocked.Rebind();
            }
        }
    }
}
MBEN
Top achievements
Rank 2
Veteran
 answered on 03 Oct 2018
1 answer
165 views

Hi,

We are currently using  RadGrid to display a list of items. The number of items are now about 8000 records and has lead to timeouts when navigating to different pages. After further inspection, the  RadGrid control is sending all the data back to the server when the user changes to a different page. The total amount of data in our case is around  35MB. Is there something I am missing in the configuration of this grid? is this the normal behavior of the grid?

Thanks in advance for your help.

Fidel
Top achievements
Rank 1
 answered on 03 Oct 2018
13 answers
842 views
Hi,
 I am using GridClientSelectColumn for Selecting a row in a grid.i want to check whether the check box is checked or not in ServerSide.i have tried a lot but all in vain.
I am not using GridTemplateColumn since I have some restrictions for in my reqs.
Please give me some code snipets if possible
Please Help me .

Thanks,
A2H
Eyup
Telerik team
 answered on 03 Oct 2018
1 answer
98 views

I have a question that is pretty basic, but for me as a new developer it's hard to figure this out.

I will try to explain it as good as i can.

I have 3 different .aspx pages where i have different RadGrid tables. And in each of them i have made Excel export available. I have made aspx.cs code in each of them but now i'm trying to put everything in just on class. My problem is that i don't know how to make a method that can get the ExportSettings to work for each of the RadGrids. 

 

This is my method i made in the new class and "gvShipmentList" ist the name on one of my RadGrids. What do i have to do so i can reach all of my RadGrids through this method?

------------------------------------------

public static void ExportExcelOnItemCommand(object sender, GridCommandEventArgs e) {
            if (e.CommandName == RadGrid.ExportToExcelCommandName)
            {
                
                gvShipmentList.ExportSettings.FileName = "ShipmentList";
                gvShipmentList.ExportSettings.ExportOnlyData = true;
                gvShipmentList.ExportSettings.IgnorePaging = true;
                gvShipmentList.ExportSettings.OpenInNewWindow = true;

                gvShipmentList.GridLines = GridLines.Both;

                foreach (GridColumn column in gvShipmentList.MasterTableView.Columns)
                {
                    column.Visible = column.Display;
                }

                gvShipmentList.ExportSettings.Excel.Format = GridExcelExportFormat.ExcelML;
                gvShipmentList.MasterTableView.ExportToExcel();
            }
        }

-------------------------------

I hope someone can help me, and please, if i haven't given enough information then tell me so i can provide you with more. Like i said, i'm very new at this and trying to learn. But this was too hard.

 

Kind regards Tim

Attila Antal
Telerik team
 answered on 03 Oct 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?