Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
105 views
Hi,
I am using RadGrid which contains Nested View Tamplate, inside the template I have a user control.
My problem is that I can't figure out how pass parameters from the template to the user control.

I tried this:
<NestedViewSettings DataSourceID="SqlDataSource2"
                    <ParentTableRelation> 
                       <telerik:GridRelationFields DetailKeyField="ID" MasterKeyField="ID" /> 
                    </ParentTableRelation> 
                </NestedViewSettings> 
                <NestedViewTemplate> 
                    <asp:Label ID="Label3" runat="server" Text='<%#Bind("ID") %>' ></asp:Label> 
                    <asp:Label ID="Label1" runat="server" Text='<%#Bind("source") %>' ></asp:Label> 
                    <ap:activityPanel source='<%#Bind("source") %>' jobId="123" ID="activityPanel" runat="server" Visible="true" /> 
</NestedViewTemplate> 

Both Labels holds the correct text, but the public variable "source" inside the "activityPanel" user control remains null.

How can I resolve this?
Thanks


Avi
Top achievements
Rank 1
 answered on 16 Jun 2010
4 answers
152 views
I've got Q1 2010 installed on my machine and have noticed that the VS Extensions aren't there.

I'm pretty sure they're supposed to install with the main product. That's right isn't it? 

How do I get them to install now?

-- 
Stuart

Stuart Hemming
Top achievements
Rank 2
 answered on 16 Jun 2010
1 answer
75 views
I have a radmenu, with multi column switched on.

If one of the items in the left hand column has children, then they render UNDER the items in the right hand column.

This has only been observed in IE, all other browsers (including on the mac) have rendered just fine.

you can download an AVI of the problem at:

https://www.yousendit.com/download/YWhOSXR4ZEtubVh2Wmc9PQ

Thanks!


Kamen Bundev
Telerik team
 answered on 16 Jun 2010
1 answer
166 views
i am working on a example based on "Card View" demo http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/cardview/defaultcs.aspx i am able to have it work just how i want it to, however i am having  strange problems with the sorting functionality, not sure what i am missing
i have attached code and screenshot, i have listed the problem in 2 points belows

(1) The sort is not working altogether, i am able to click on the heading, its seems to refresh and adds a downward arrow (sort desc), but i don't see the records rearranged, i click on it again, it seems to refresh, but the downward arrow stays (does'nt change to upward arrow)

(2) if i am clicking on column 1, its highlighting(i have added sorted back color property to test this) and trying to sort column 2 with a desc arrow, this seems to be the norm for other columns too, ie if i click on column 5, its trying to sort column 6, when i click on column 1 for the second time it seems to be trying to sort column 1(but, point (1) above happens)

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ClassWorkShopGrid.ascx.cs" Inherits="CMSWebParts_Grafica_ClassWorkShopGrid" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<!-- content start --> 
<style type="text/css">  
    .RadGrid .rgRow TD  
    {  
        padding:0px !important;  
    }  
    .RadGrid .rgAltRow TD  
    {  
        padding:0px !important;  
        background-color:White;   
    }      
    .GridHeader  
    {  
        font-weight:bold;  
        color:#426594 !important;  
        text-transform:uppercase;  
        font-size:11px !important;   
    }  
    .BlueHeadings  
    {  
        color:#426594 !important;  
        text-transform:uppercase;    
        font-size:11px !important;        
        font-weight:bold;  
    }  
    .GridHeader a  
    {  
        font-weight:bold;  
        color:#426594 !important;  
        text-transform:uppercase;  
        font-size:11px !important;          
    }  
</style>     
<br/> 
<br/> 
<telerik:RadCodeBlock runat="server" ID="radCodeBlock">  
    <script type="text/javascript">  
        function showFilterItem() {  
            $find('<%=RadGrid1.ClientID %>').get_masterTableView().showFilterItem();  
        }  
        function hideFilterItem() {  
            $find('<%=RadGrid1.ClientID %>').get_masterTableView().hideFilterItem();  
        }   
    </script> 
</telerik:RadCodeBlock> 
<div> 
    <div style="float:left;" class="BlueHeadings">  
        Sort Classes by:  
    </div> 
    <div style="float:right;padding-right:15px;"  class="BlueHeadings">  
        Show filtering item <input id="Radio1" type="radio" runat="server" name="showHideGroup" checked="true" onclick="showFilterItem()" /><label for="Radio1">Yes</label>   
        <input id="Radio2" type="radio" runat="server" name="showHideGroup" onclick="hideFilterItem()"/><label for="Radio2" >No</label> 
    </div> 
    <div style="clear:both;"></div> 
</div> 
<telerik:RadGrid ID="RadGrid1"  AllowPaging="True" runat="server" AllowSorting="True" Skin="WebBlue" OnNeedDataSource="RadGrid1_NeedDataSource" 
    AllowFilteringByColumn="true" AutoGenerateColumns="false" ShowStatusBar="True">  
    <PagerStyle Mode="NextPrevAndNumeric" Wrap="True" AlwaysVisible="true"></PagerStyle> 
    <MasterTableView AllowMultiColumnSorting="false" TableLayout="Fixed" AllowNaturalSort="false" > 
        <Columns> 
            <telerik:GridBoundColumn UniqueName="CourseTitle" HeaderText="Course Title" DataField="CourseTitle"  SortExpression="CourseTitle" AllowFiltering="false" HeaderStyle-CssClass="GridHeader"   
                HeaderStyle-Width="60px" ItemStyle-Width="60px"/>  
            <telerik:GridBoundColumn UniqueName="CategoryName" HeaderText="Category" DataField="CategoryName"  SortExpression="CategoryName" AllowFiltering="true" HeaderStyle-CssClass="GridHeader"   
                HeaderStyle-Width="80px" ItemStyle-Width="80px" > 
                 <FilterTemplate> 
                        <telerik:RadComboBox ID="RadComboBoxCategoryName" DataSourceID="SqlDataSource2" DataTextField="CategoryName" Skin="WebBlue"   
                            DataValueField="CategoryName" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("CategoryName").CurrentFilterValue %>' 
                            runat="server" OnClientSelectedIndexChanged="CategoryIndexChanged" Width="95px">  
                            <Items> 
                                <telerik:RadComboBoxItem Text="All" /> 
                            </Items> 
                        </telerik:RadComboBox> 
                        <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">  
                            <script type="text/javascript">  
                                function CategoryIndexChanged(sender, args) {  
                                    var tableView=$find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");  
                                    tableView.filter("CategoryName", args.get_item().get_value(), "EqualTo");  
                                }  
                            </script> 
 
                        </telerik:RadScriptBlock> 
                 </FilterTemplate> 
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn UniqueName="ClassLevel" HeaderText="Course Level" DataField="ClassLevel"  SortExpression="ClassLevel" AllowFiltering="True" HeaderStyle-CssClass="GridHeader"   
                HeaderStyle-Width="60px" ItemStyle-Width="60px" > 
                 <FilterTemplate> 
                        <telerik:RadComboBox ID="RadComboBoxClassLevel" DataSourceID="SqlDataSource3" DataTextField="ClassLevel" Skin="WebBlue" 
                            DataValueField="ClassLevel" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("ClassLevel").CurrentFilterValue %>' 
                            runat="server" OnClientSelectedIndexChanged="ClassLevelIndexChanged" Width="70px">  
                            <Items> 
                                <telerik:RadComboBoxItem Text="All" /> 
                            </Items> 
                        </telerik:RadComboBox> 
                        <telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">  
                            <script type="text/javascript">  
                                function ClassLevelIndexChanged(sender, args) {  
                                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");  
                                    tableView.filter("ClassLevel", args.get_item().get_value(), "EqualTo");  
                                }  
                            </script> 
                        </telerik:RadScriptBlock> 
                 </FilterTemplate>              
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn UniqueName="FacultyName" HeaderText="Instructor" DataField="FacultyName"  SortExpression="FacultyName" AllowFiltering="true" HeaderStyle-CssClass="GridHeader"   
                  HeaderStyle-Width="70px" ItemStyle-Width="70px">  
                 <FilterTemplate> 
                        <telerik:RadComboBox ID="RadComboBoxFacultyName" DataSourceID="SqlDataSource4" DataTextField="FacultyName" Skin="WebBlue" 
                            DataValueField="FacultyName" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("FacultyName").CurrentFilterValue %>' 
                            runat="server" OnClientSelectedIndexChanged="FacultyNameIndexChanged" Width="90px">  
                            <Items> 
                                <telerik:RadComboBoxItem Text="All" /> 
                            </Items> 
                        </telerik:RadComboBox> 
                        <telerik:RadScriptBlock ID="RadScriptBlock3" runat="server">  
                            <script type="text/javascript">  
                                function FacultyNameIndexChanged(sender, args) {  
                                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");  
                                    tableView.filter("FacultyName", args.get_item().get_value(), "EqualTo");  
                                }  
                            </script> 
                        </telerik:RadScriptBlock> 
                 </FilterTemplate>              
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn UniqueName="StudioSchoolType" HeaderText="Class / Workshop" DataField="StudioSchoolType"  SortExpression="StudioSchoolType" AllowFiltering="true" HeaderStyle-CssClass="GridHeader"   
                HeaderStyle-Width="60px" ItemStyle-Width="60px">  
                 <FilterTemplate> 
                        <telerik:RadComboBox ID="RadComboBoxStudioSchoolType" Skin="WebBlue" 
                            SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("StudioSchoolType").CurrentFilterValue %>' 
                            runat="server" OnClientSelectedIndexChanged="StudioSchoolTypeIndexChanged" Width="70px">  
                            <Items> 
                                <telerik:RadComboBoxItem Text="All" Value="All"  /> 
                                <telerik:RadComboBoxItem Text="Class" Value="Class" /> 
                                <telerik:RadComboBoxItem Text="Workshop" Value="Workshop" /> 
                            </Items> 
                        </telerik:RadComboBox> 
                        <telerik:RadScriptBlock ID="RadScriptBlock4" runat="server">  
                            <script type="text/javascript">  
                                function StudioSchoolTypeIndexChanged(sender, args) {  
                                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");  
                                    tableView.filter("StudioSchoolType", args.get_item().get_value(), "EqualTo");  
                                }  
                            </script> 
                        </telerik:RadScriptBlock> 
                 </FilterTemplate>              
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn UniqueName="ScheduleDays" HeaderText="Day(s)" DataField="ScheduleDays"  SortExpression="ScheduleDays" AllowFiltering="true" HeaderStyle-Width="80px" HeaderStyle-CssClass="GridHeader"   
             ItemStyle-Width="80px" FilterControlWidth="95px" CurrentFilterFunction="Contains" FilterListOptions="VaryByDataType" ShowFilterIcon="false" AutoPostBackOnFilter="true" />                 
            <telerik:GridTemplateColumn UniqueName="Price" HeaderText="Price" DataField="Price"  SortExpression="Price" AllowFiltering="false" HeaderStyle-Width="60px" ItemStyle-Width="80px" HeaderStyle-CssClass="GridHeader" > 
                <ItemTemplate> 
                    <span>$<%# Eval("Price").ToString()%></span>  
                </ItemTemplate>              
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn UniqueName="Add" HeaderText="Add" AllowFiltering="false" HeaderStyle-Width="35px" ItemStyle-Width="35px" HeaderStyle-CssClass="GridHeader" SortExpression="Price" > 
                <ItemTemplate> 
                </ItemTemplate>              
            </telerik:GridTemplateColumn>                 
        </Columns> 
        <ItemTemplate> 
            <div style="width:100%;padding:0px;margin:0px;padding-top:5px;" > 
                <span style="font-weight: bold; font-family: Arial Black;padding-left:5px;"><%# Eval("CourseTitle").ToString()%></span>  
                <hr style="width:100%;" /> 
                <div> 
                    <div style="float:left;width:90px;padding-left:5px;">Course #:<%# Eval("CourseCode").ToString()%></div>  
                    <div style="float:left;width:110px;"><%# Eval("CategoryName").ToString()%></div>  
                    <div style="float:left;width:90px;"><%# Eval("ClassLevel").ToString()%></div>  
                    <div style="float:left;width:110px;"><%# Eval("FacultyName").ToString()%></div>  
                    <div style="float:left;width:80px;"><%# Eval("StudioSchoolType").ToString()%></div>  
                    <div style="float:left;width:120px;"><%# Eval("ScheduleDays").ToString().Replace("|",", ")%></div>  
                    <div style="float:left;width:75px;">  
                        <span style="color:#e76d18;font-weight:bold;">Member:</span><br/>  
                        <span>$<%# (Convert.ToInt32(Eval("Price").ToString())-30).ToString()%></span><br/><br/>  
                        <span style="color:#e76d18;font-weight:bold;">Non Member:</span><br/>  
                        <span>$<%# Eval("Price").ToString()%></span><br/>                          
                    </div> 
                    <div style="float:left;width:40px">  
                        <href="~/SpecialPages/Shoppingcart.aspx"><img src="~/app_themes/njvac/images/cart.gif" border="0" title="add to cart" /></a><br/><br/><br/> 
                        <href="~/SpecialPages/Shoppingcart.aspx"><img src="~/app_themes/njvac/images/cart.gif" border="0" title="add to cart" /></a>  
                    </div> 
                    <div style="clear:both;"></div>    
                </div> 
                <div> 
                    <span style="font-weight: bold;background-color:#bdc3ce;padding:5px;color:White;">Course Information</span><br/>  
                </div> 
                <div style="background-color:#f7f3f7;padding:15px;">  
                    <span style="font-weight:bold;"><%# Eval("Duration").ToString()%> week(s) course</span>&nbsp;&nbsp;  
                    <span style="font-weight:bold;">Class Held:&nbsp;</span><%# Convert.ToDateTime(Eval("StartDate").ToString()).ToShortDateString()%> - <%# Convert.ToDateTime(Eval("EndDate").ToString()).ToShortDateString()%> 
                    <span style="font-weight:bold;">Season:&nbsp;</span><%# Eval("SeasonName").ToString()%> - <%# Eval("Year").ToString()%>&nbsp;&nbsp;  
                    <span style="font-weight:bold;">No class on:&nbsp;</span><%# Eval("NoClassOn").ToString()%>&nbsp;&nbsp;<br/> 
                    <%# Eval("Description").ToString()%><br/>  
                    <span style="color:red"><%# Eval("ClassFullMessage").ToString()%></span>  
                </div> 
            </div> 
        </ItemTemplate> 
    </MasterTableView> 
    <ClientSettings> 
        <Scrolling UseStaticHeaders="true" /> 
    </ClientSettings> 
</telerik:RadGrid> 
<asp:SqlDataSource ID="SqlDataSource2" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>" 
    ProviderName="System.Data.SqlClient" SelectCommand="select CategoryName from customtable_class_categories" 
    runat="server"></asp:SqlDataSource> 
<asp:SqlDataSource ID="SqlDataSource3" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>" 
    ProviderName="System.Data.SqlClient" SelectCommand="select ClassLevel from customtable_class_level" 
    runat="server"></asp:SqlDataSource> 
<asp:SqlDataSource ID="SqlDataSource4" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>" 
    ProviderName="System.Data.SqlClient" SelectCommand="select fullname as 'FacultyName' from customtable_faculty" 
    runat="server"></asp:SqlDataSource> 
 
using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Web;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using CMS.PortalControls;  
using Telerik.Web.UI;  
using Grafica.Helper;  
 
public partial class CMSWebParts_Grafica_ClassWorkShopGrid : CMSAbstractWebPart  
{  
    protected void Page_Load(object sender, EventArgs e)  
    {  
    }  
    protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)  
    {  
        this.RadGrid1.DataSource = Course.GetAllCourses();  
    }  


Veli
Telerik team
 answered on 16 Jun 2010
1 answer
343 views
It seems to be the case that there is no way to find a menu item by its ID with server-side code.    Is this correct?   Please tell me I'm wrong.
Shinu
Top achievements
Rank 2
 answered on 16 Jun 2010
3 answers
99 views
Hello,

I've installed the rad editor on my computer and some of the icon image are missing( 3 buttons: MOSSInsertTable.gif and 3 others). I can't see that any skins are being used either and the files exists in the toolimage folder.

Any ideas on how I can solve this issue?
Stanimir
Telerik team
 answered on 16 Jun 2010
1 answer
68 views
We have a working filter column that extends GridTemplateColumn. 

  Everything is working properly at runtime, but at design time we get this message:
 Warning 1:
 Generation of designer file failed: Telerik.Web.UI.GridColumnCollection must have items of type 'Telerik.Web.UI.GridColumn'. 'custom:FilteringColumn' is of type 'TIPWebCommon.FilteringTemplateColumns.FilteringColumn'.

We are using Visual Studio 2008 with SQL Server 2005.

Veli
Telerik team
 answered on 16 Jun 2010
1 answer
151 views
Hello,

I am programmatically adding symbols using the Symbols.Add routine of the editor. The symbol popup displays all symbols correctly except for the less than '<' character for which it just displays a blank space. The greater than character is also added and it displays correctly.

Any help on this matter would be much appreciated,
Alex
Rumen
Telerik team
 answered on 16 Jun 2010
1 answer
132 views
Hi,

Due to the nature of our application, we have to create controls dynamically, and move them from one parent to another during postbacks. This normally causes viewstate failed exceptions ("Failed to load viewstate. The control tree into which viewstate....") since control tree is modified during postbacks, however the issue is solved by using ViewStateModeById as suggested in another forum post.

This solution helped us all, except the RadMaskedTextBox control. Although we wrap it with ViewStateModeById attribute, it still causes viewstate failed exceptions when moved during postbacks. Below is how we wrapped it:

    <ViewStateModeById()>
    Public Class wrappedRadMaskedTextbox
        Inherits Telerik.Web.UI.RadMaskedTextBox
    End Class

The same method has been applied to many other controls, and they all worked fine including Telerik combobox, Telerik textbox (non mask input control) etc.

I really need help to solve this issue asap. If anyone can respond to this issue, that would be great. I also kindly ask you guys not to suggest me "disabling the viewstate" or "not dynamically creating or moving controls" since all those have valid reasons for our project. Also, regenerating the problem is fairly easy and straightforward.

Thanks in advance.
Radoslav
Telerik team
 answered on 16 Jun 2010
2 answers
64 views
Hi,

We had installed Rad controls from the link (http://www.telerik.com/products/aspnet-ajax/whats-new/release-history/q1-2010-version-2010-1-309.aspx) and started working on the rad scheduler. Now after upgrading it to the new version (http://www.telerik.com/products/aspnet-ajax/whats-new/release-history/q1-2010-sp2-version-2010-1-519.aspx), we are facing an issue with the scheduler. Please help us on the same.

The issue is that, on click of the date (number on the cell) in month view, this would take us to the day view. Now after upgrading to new version, we are getting an alert saying 'String not recognized as a valid DateTime'. Please help us solve this issue ASAP.

Thanks,
Vasanthi
vasanthi r
Top achievements
Rank 1
 answered on 16 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?