Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
126 views
I am trying to get collapsable groups on a radgrid along with a user control which will alter which columns appear in the grid via checkbox.
My grouping is accomplished in the code behind.

If I set the radgrid viewstateMode to "Disabled" then my user control checkbox values are recognized and with a submit button the columns appear and disappear.  

However the grouped rows cannot be collapsed.  If I switch the ViewStateMode to "Enabled" then the grouped rows collapse correctly but now the user control checkbox value never changes.(even though it has on screen)

Is there anyway to have the rows correctly collapse/expand AND recognize the current value the client selected checkbox of the user control?

This is part of the RadGrid:
         <table width="100%" cellpadding="0" cellspacing="0" class="ContentTable">
            <tr>
                <td class="ContentTitleHeight">Specialty</td>
            </tr>
            <tr>
                <td>
                    <telerik:RadGrid id="rgSpecialty" 
                        runat="server"  
                        ShowGroupPanel="false" 
                        autogeneratecolumns="false" 
                        AllowFilteringByColumn="true" 
                        AllowSorting="true" 
                        ViewStateMode="Disabled"  
                        OnNeedDataSource="rgSpecialty_NeedDataSource"
                        GroupingSettings-CaseSensitive ="false"   >



Patrick
Top achievements
Rank 1
 answered on 25 Nov 2014
10 answers
859 views
I have entered 100% width and it is not working.  It shows the graph as 10px wide.
I was expecting this version would support 100% width given that it is not reliant on images.

Please let me know.

Thanks
infoweshanney
Top achievements
Rank 2
 answered on 25 Nov 2014
8 answers
1.9K+ views
I have a radgrid that ispopulated using the need_datasource event.  We have  a delete button in the grid and when you click the delete, it fires an itemcommand to delete the record and then rebinds the grid.  The record successfully gets deleted, but the grid does not reflect this change.  The stranger part is that when I step through the code using the debugger, the grid DOES refresh correctly.

We've been using telerik grids for a long time now, and never had this problem.  We recently updated to Q1 2010, and I'm wondering if there's some sort of caching going on that we need to explicitly turn off now?

Here's the grid:
<telerik:RadGrid ID="MyGrid" runat="server" AllowPaging="false" AutoGenerateColumns="false" GridLines="None" ShowHeader="True"
                        OnNeedDataSource="MyGrid_NeedDataSource" 
                        OnItemCommand="MyGrid_ItemCommand" 
                        OnItemDataBound="MyGrid_ItemDataBound">
                <MasterTableView AutoGenerateColumns="false" Width="100%" TableLayout="Fixed">
                    <Columns>
                        <telerik:GridBoundColumn UniqueName="Id" DataField="PlanId" HeaderText="Id" Visible="false" />
                        <telerik:GridBoundColumn UniqueName="Name" DataField="Name" HeaderText="Name" />
                        <telerik:GridTemplateColumn>
                            <ItemTemplate>
                                <table cellpadding="0" cellspacing="0" border="0">
                                    <tr>
                                        <td style="border: none; width: 18px; padding: 0;">
                                        <asp:ImageButton ID="DeleteImageButton" runat="server" ToolTip="Delete" 
                                            ImageUrl="App_Themes/PlanAdvisor/Grid/Delete.png"
                                            CommandName="DeleteItem"/>
                                        </td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Right" Width="55px"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Right"></ItemStyle>
                        </telerik:GridTemplateColumn>
                    </Columns>
                    </MasterTableView>
                </telerik:RadGrid>

And here's the code-behind:
Protected Sub MyGrid_ItemCommand(ByVal sender As Object, ByVal e As GridCommandEventArgs) Handles MyGrid.ItemCommand
        If e.Item.ItemType = GridItemType.Item OrElse e.Item.ItemType = GridItemType.AlternatingItem Then
            Dim item As GridDataItem = CType(e.Item, GridDataItem)
           If e.CommandName = "DeleteItem" Then
                DeleteItem(CInt(item("Id").Text))
                MyGrid.Rebind()
            End If
        End If
    End Sub
Steven
Top achievements
Rank 1
 answered on 25 Nov 2014
1 answer
82 views
Hello,
By some fluke, I discovered an issue with RadEditor when certain HTML is entered into the editor. This only came to my attention when one of the users of our web app notified me of browsers crashing when trying to load the content into the editor. After investigating, I created a reproducible sample than breaks the editor on Telerik's demo page, as well as the editor in my own app.

here is the offending html: careful

<span style="color: #ff0000;">Test</span> Some content "really long text here; some more stuff here

Enter this html into the HTML view of the rad editor here:
http://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx

Careful tho, this will probably crash your browser.

I suspect the issue is caused by whatever parser is trying to interpret that html, and it chokes on it. The real offender is the quote before 'really'. If i remove that, it seems to not be an issue. In the meantime, i removed the quote from the content so my user could edit the content. But I figured I would post the problem here so it can be fixed for future releases.

Thanks!
Marin Bratanov
Telerik team
 answered on 25 Nov 2014
1 answer
67 views
I created a barchart using HTMLChart. HTML code was completed and works fine.
Below is some code. I used static number for test. (Y="25")
How to assign integer to Y in run time in code behind the form? 

                                        <telerik:BarSeries Name="Notification Sent to PCP" Stacked="false" Gap="1.5" Spacing="0.4">
                                                <Appearance>
                                                    <FillStyle BackgroundColor="Yellow"></FillStyle>
                                                </Appearance>
                                                <LabelsAppearance DataFormatString="{0}" Position="Center">
                                                </LabelsAppearance>
                                                <TooltipsAppearance BackgroundColor="#c5d291" DataFormatString="{0}" Color="White">
                                                </TooltipsAppearance>
                                                <SeriesItems>
                                                    <telerik:CategorySeriesItem Y="25"></telerik:CategorySeriesItem>
                                                </SeriesItems>
                                            </telerik:BarSeries> 
Danail Vasilev
Telerik team
 answered on 25 Nov 2014
4 answers
47 views
Hi.

Actually i´m working on a page that add several radDockZone by code, and need to associate them to an ajaxsetting to show an loading Panel. It works, but the problem is the RaddockZone loss their size (fixed at certain rate, for exple 49%, 49%) and act exaclty like if its size never be fixed (Adjusting his size) I tried to add Ajasetting by C# or by ASPX, tried to place my DockZones in several kind of container, but any works. If ajaxsettings for the Zone exits, His fixed size simply doesn´t works.

The settings AjaxcontrolID and the updatecontrol controlID are the same, and it´s the ID of the RadDockZone which i need to update. I need to update it when a dock is docked in it but since there are several Docks and they can be place in several zones the right it´s RaddockZone update irself.

I really appreciate if anybody has an idea about how it´s possible this strange fail occurs. I´d Like to know if i can try to solve it modifyng the update radDockZone event (which doesn´t appear in intellisense in VS) 

Thanks in advance
Slav
Telerik team
 answered on 25 Nov 2014
1 answer
57 views
Hi, 

I want to download grid data in Pdf format, on LinkButton click event, for that i used this code. 

protected void ExportToPdf_Click(object sender, EventArgs e)
       {
           RadGrid1.ExportSettings.ExportOnlyData = true;
           RadGrid1.ExportSettings.IgnorePaging = true;
           RadGrid1.ExportSettings.OpenInNewWindow = true;
           RadGrid1.ExportSettings.FileName = "FileName";
           RadGrid1.MasterTableView.ExportToPdf();
       }

But every time i click on the button, my file is downloading in .xls format not in .Pdf.. 

any suggestions? thanks. 
Kostadin
Telerik team
 answered on 25 Nov 2014
1 answer
131 views
Good day

I have a radmenu with menu items, and each menu item has children.

When the client clicks on a submenuitem, i would like to get the parent menu item text.

Thank you
Tiaan
Top achievements
Rank 1
 answered on 25 Nov 2014
1 answer
107 views

There is several bugs in 2014.3.1024 release (UI for ASP.NET AJAX), here is one:

No base line showing with ShowBaseLine="true" when use "Outlook" skin (and other skins, "Black" skin is fine).

You may create a test website, and then copy the below code to repeat the issue (like showing in the picture attached). Please let me know if there is a quick fix for this:

Thanks,

Ryan

====Code below=================

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
</Scripts>
</telerik:RadScriptManager>
<script type="text/javascript">
//Put your JavaScript code here.
</script>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
</telerik:RadAjaxManager>
<telerik:RadSplitter runat="Server" ID="RadSplitter1" Width="100%" BorderSize="0"
BorderStyle="None" PanesBorderSize="0" Height="100%" Orientation="Horizontal"
VisibleDuringInit="false">
<telerik:RadPane ID="RadPaneMenu" runat="server" Height="30" Width="100%">
<telerik:RadTabStrip ID="Menu1" runat="server" Width="100%" ScrollChildren="true"
Skin="Outlook" ShowBaseLine="true">
<Tabs>
<telerik:RadTab Text="AAAAA" Value="0" Selected="True">
</telerik:RadTab>
<telerik:RadTab Text="BBBB" Value="1">
</telerik:RadTab>
<telerik:RadTab Text="CCCC" Value="2">
</telerik:RadTab>
<telerik:RadTab Text="DDDDD" Value="3">
</telerik:RadTab>
</Tabs>
</telerik:RadTabStrip>
</telerik:RadPane>
<telerik:RadPane ID="RadPaneMain" runat="server" Height="100%" Width="100%">

</telerik:RadPane>
</telerik:RadSplitter>
</form>
</body>
</html>
Aneliya Petkova
Telerik team
 answered on 25 Nov 2014
3 answers
295 views
I'm not sure if the RadGrid (or late bound controls) support what I'm trying to do.

My concern is design in nature.

I can already perform the grouping server-side, but when I have two items that match on a particular DataKey, I need to effectively make them appear as 1 item.

For example:

// Asset of a person
public class PersonAsset {
     public Guid PersonID {get;} //DataKey; second GroupBy will be by PersonID
      
     public string Asset {get;set;}
     public Guid AssetID {get;set} //not a DataKey for the Grid, correlates to a comboxbox that makes the asset changeable
      
     public string PersonName {get;set;}
     public string Note1 {get;set;}
     public string Note2 {get;set;}
     public string Note3 {get;set;}
     public PersonAssetState State {get;set;}
}
 
//going to perform first GroupBy using this enum
public enum PersonAssetState {
   NotSet,
   Type1,
   Type2
}

<telerik:RadGrid runat="server" ID="rGridInventory" ShowHeader="true" Width="99%" OnNeedDataSource="rGridInventory_NeedDataSource">
       <MasterTableView DataKeyNames="PersonID" ClientDataKeyNames="PersonID" 
           ShowGroupFooter="true" GroupLoadMode="Client">
           <GroupFooterTemplate>              
           </GroupFooterTemplate>
           <GroupByExpressions>
               <telerik:GridGroupByExpression>
                   <GroupByFields>
                       <telerik:GridGroupByField FieldName="State" SortOrder="Descending" />
                       <telerik:GridGroupByField FieldName="PersonID" />
                   </GroupByFields>
                   <SelectFields>
                       <telerik:GridGroupByField FieldName="State" />
                       <telerik:GridGroupByField FieldName="PersonID" />
                   </SelectFields>
               </telerik:GridGroupByExpression>
           </GroupByExpressions>
       </MasterTableView>           
   </telerik:RadGrid>

So at this point, instead of having subsequent grouped columns/rows containing "PersonName" twice or more in a tubalar fashion, I am looking for it to display once, and for all groupings at this level (Second) to appear as 1 row.
Konstantin Dikov
Telerik team
 answered on 25 Nov 2014
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?