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

    I'd like to use the telerik radgrid control to generate an excel export of data, however, I don't want to display the grid on the web page.  Is there a way to do this?

 

Thanks in advance.

Attila Antal
Telerik team
 answered on 06 Sep 2019
7 answers
680 views
Hello all,

I just can't figure out how to add a checkbox to a second level (of a 3 level) grouping without loosing the data that is there.

for instance 

--Dept
----<check box here> Employee
--------Projects


I am able to add the check box like this:

 if (e.Item is GridGroupHeaderItem ) 
            { 
                 
                GridGroupHeaderItem item = e.Item as GridGroupHeaderItem; 
 
                if ( item.GroupIndex.LastIndexOf("_") == 1) 
                { 
                     
                    DataRowView groupDataRow = (DataRowView)e.Item.DataItem; 
                    CheckBox check = new CheckBox(); 
                    check.AutoPostBack = false
                    check.ID = "foo"
                    check.Text = this._headerTextForEmployeeName + " FirstName - LastName";     
                 
                    check.CheckedChanged += new EventHandler(check_CheckedChanged); 
                    item.DataCell.Controls.Add(check); 
                 
                    } 
 
                } 

But this REPLACES the header text and value that was there!!
Any ideas or suggestions?


Attila Antal
Telerik team
 answered on 06 Sep 2019
1 answer
1.9K+ views

Hello,

i want to use RadGrid in asp.net with dynamical columns with different widths. There is no autosizing like autofit. I tried it with javascript. It works but it isnt a good solution. I tried here with some functions, but nothing happens on sizing. Only text will be changed. Visible unvisible is also not working. I think telerik is in grid a very bad solution.

 

in page:

 

 <telerik:RadGrid ID="rgrdSuche" runat="server" Culture="de-DE" OnColumnCreated="rgrdSuche_ColumnCreated" OnSortCommand="rgrdSuche_SortCommand">
                <MasterTableView AutoGenerateColumns="true" AllowFilteringByColumn="false">
               
                </MasterTableView>               
            </telerik:RadGrid>

 

 

i tried with the event itemdatabound, but nothing happened:

 

 protected void rgrdSuche_ItemDataBound(object sender, GridItemEventArgs e)
        {
            try
            {
                if (e.Item is GridHeaderItem)
                {
                    GridHeaderItem headerItem = e.Item as GridHeaderItem;

                    for (int i = 0; i < headerItem.Cells.Count; i++)
                    {
                        switch (headerItem.Cells[i].Text.Replace(" ", ""))
                        {
                            case "Comment":
                                headerItem.Cells[i].Text = "Comment-Text";
                                headerItem.Cells[i].Width = Unit.Pixel(400);
                                break;
                            default:
                                break;
               ...

 

and event via ColumnCreated will not work also:

 

  protected void rgrdSuche_ColumnCreated(object sender, GridColumnCreatedEventArgs e)
        {
            switch (e.Column.UniqueName)
            {
                case "Comment":
                    e.Column.Visible = false;
                    e.Column.HeaderText = "Comment-Text";
                    e.Column.HeaderStyle.Width = Unit.Pixel(400);
                    e.Column.FilterControlWidth = Unit.Pixel(400);
                 break;

 

Eric R | Senior Technical Support Engineer
Telerik team
 answered on 05 Sep 2019
2 answers
367 views

Hi,

We are looking to include the month and year lines for the x-axis, could you please view the image and let me know if there is a way to do that.

Thank you,

-Sam

 

Sam
Top achievements
Rank 1
 answered on 05 Sep 2019
5 answers
613 views

 

Is there a way to clear a multi check rad combo box without postback or is there a clear button already built into the control? 

Alex

Rumen
Telerik team
 answered on 05 Sep 2019
1 answer
394 views

Dear users,

 

 

I need to know the last version of Telerik UI that i can use with .NET 3.5 , currently i'm using 2012.1.411.35.

 

Thank you in advance,

Cordially

Rumen
Telerik team
 answered on 05 Sep 2019
12 answers
2.5K+ views
(Q2 2009 version)
Hi, i'm triying to export to excel from my radgrid from buttons on <commandItemTemplate>  tags like this

<MasterTableView CommandItemDisplay="Top" CellSpacing="0" ShowGroupFooter="true" AllowMultiColumnSorting="true" ShowFooter="true" DataKeyNames="NombreTipoCuenta" >                                                                                     
                                        <CommandItemTemplate> 
                                            <asp:ImageButton runat="server" ID="btnExcelExport" ImageUrl="~/images/page_excel.png" OnClick="btnExcelExport_Click" AlternateText="Excel" ToolTip="Excel" />  
 
                                                                                                                                
                                        </CommandItemTemplate> 

but when i click on my button, commanditem hides, and doesn`t work , when i copy this outside the grid it works

<asp:ImageButton runat="server" ID="btnExcelExport" OnClick="btnExcel_Click" ImageUrl="~/images/page_excel.png"  AlternateText="Excel" />  
                                 <telerik:RadGrid   
                                            AutoGenerateColumns="False"  
                                            ID="tk_Grid"  
                                            AllowPaging="True"  
                                            PageSize="20"  
                                            runat="server"  
                                            GridLines="None" 
                                            ShowFooter="false"  
                                            ShowGroupPanel="false" 
                                            style="margin-top: 0px"  
                                            BorderStyle="None"                                              
                                            CssClass="Grid" onitemdatabound="tk_Grid_ItemDataBound" Skin="Default" 
                                            >                                                                      

this is the code behind for both mehods
 protected void btnExcelExport_Click(object sender, ImageClickEventArgs e) 
    { 
 
        tk_Grid.ExportSettings.ExportOnlyData = true
        tk_Grid.ExportSettings.IgnorePaging = true
        tk_Grid.ExportSettings.OpenInNewWindow = false
        tk_Grid.MasterTableView.ExportToExcel(); 
    } 

thanks, Gino.




Kalai
Top achievements
Rank 1
 answered on 05 Sep 2019
1 answer
158 views

Hi,

I have been trying to use programmatic binding based on the following demo https://demos.telerik.com/aspnet-ajax/grid/examples/data-binding/client-side/programmatic/defaultcs.aspx but have been having a problem in getting the key value back into the asp.net code behind.

 

The code is (effectively) the same as the example except I am binding to an entity that has a Guid as a key rather than the EmployeeId in the example and I have added a "delete" button using the following

          <telerik:GridButtonColumn UniqueName="DeleteButtonColumn" ButtonType="ImageButton" CommandName="Delete" ConfirmText="Are you sure?" ConfirmDialogType="Classic" ConfirmTitle="Are you sure?" />

I have set up the DataKeyNames and ClientDataKeyNames in the MasterTableView to be DataKeyNames="GUID" and ClientDataKeyNames="GUID"

In the code behind I have added an ItemCommand event that gets called, however

(GridDataItem)e.Item.GetDataKeyValue("GUID") is blank

(GridDataItem)e.Item.KeyValues contains "{GUID:""""}"

 

Can I use programmatic binding method with a GridButtonColumn with type ImageButton in this way?

Attila Antal
Telerik team
 answered on 04 Sep 2019
2 answers
418 views

Hi Telerik Team,

 

Our company is working on upgrade application to cloud environment. We are using RadAsyncUpload control on teleirk 2014.2.724.40 version and found  an issue with TemporaryFolder. Can we customized how to read / write files in TemporaryFolder ?

 

Thanks in advance,

Lan

lan luo
Top achievements
Rank 1
Iron
 answered on 04 Sep 2019
13 answers
449 views
Hi there,

"The RadToolTip's designed behavior is to show always in the visible browser area. Therefore, when it should exceed the screen bounds it recalculates its coordinates and reposition."

The above statement is not always true, please see the attached screenshot. When the tooltipmanager showing up, 80% of the time it does the reposition, but sometimes not, the bottom part of the tooltipmanager is hidden from the bottom of the screen, i need to scroll down to see the entire tooltip.

Any suggestions?

Thanks,
Meng
Rumen
Telerik team
 answered on 04 Sep 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?