Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
1.8K+ 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
334 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
586 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
363 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.4K+ 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
136 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
389 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
416 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
5 answers
216 views
Hello, I have a missing form label while running WAVES tool on telerik:RadDatePicker control.  I added DateInput-Label="hello" and it's clear the error but I do not want to see "hello" label.  I tried to add a class visuallyhidden but it's not working.  Is there any other way? Thank you.

<telerik:RadDatePicker ID="txtPlanEffectiveDate" runat="server" DateInput-DateFormat="MM/dd/yyyy"
Calendar-EnableAriaSupport="true" Calendar-EnableKeyboardNavigation="true">
</telerik:RadDatePicker>
Rumen
Telerik team
 answered on 03 Sep 2019
1 answer
219 views

When resizing large images using the imageEditor Resize tool, the width and height being reported in the UI is cropped at 3 characters.  So when a large image (eg.  1280x1024) is being resized, the user can get confused.  

To repeat this, just visit the online demo: https://demos.telerik.com/aspnet-ajax/imageeditor/examples/resize/defaultcs.aspx

and choose 1280x1024 in the Preset Size drop-down.  You'll see that the width and height being reported is '128' and '102' respectively (the ending zeros in both numbers are not visible to the user).  

Vessy
Telerik team
 answered on 02 Sep 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?