Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
192 views
I followed the example to create row-spanning column headers as shown here: Telerik Example, which works great until I add EnableRowHoverStyle="true" to the declaration.  The hover bar only works correctly on the non-Template columns.  On the Template columns, the rows contain an underline and some extra space... if you hover below that space the hover bar appears, but nowhere else on those columns. 

Is there a workaround or fix for this?  I've tried the latest version of the DLLs, but still have the problem.

Here's the code:

 

 

        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
        </telerik:RadScriptManager> 
        <cc1:CslaDataSource ID="cdsMain" runat="server" TypeAssemblyName="" TypeName="" 
            TypeSupportsPaging="False" TypeSupportsSorting="False">  
        </cc1:CslaDataSource> 
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True" AutoGenerateColumns="False" 
            DataSourceID="cdsMain" GridLines="None">  
            <ClientSettings EnableRowHoverStyle="true">  
            </ClientSettings> 
            <MasterTableView DataSourceID="cdsMain">  
                <RowIndicatorColumn> 
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </RowIndicatorColumn> 
                <ExpandCollapseColumn> 
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </ExpandCollapseColumn> 
                <Columns> 
                    <telerik:GridTemplateColumn UniqueName="TemplateColumn">  
                        <HeaderTemplate> 
                            <table id="Table1" width="100%">  
                                <tr> 
                                    <td colspan="2" align="center">  
                                        <b>Two-Column Header</b> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td width="50%">  
                                        <b>Cust Code</b> 
                                    </td> 
                                    <td width="50%">  
                                        <b>Cust Name</b> 
                                    </td> 
                                </tr> 
                            </table> 
                        </HeaderTemplate> 
                        <ItemTemplate> 
                            <table id="Table2" width="100%">  
                                <tr> 
                                    <td width="50%">  
                                        <%# DataBinder.Eval(Container.DataItem, "CUSTCODE")%> 
                                    </td> 
                                    <td width="50%">  
                                        <%# DataBinder.Eval(Container.DataItem, "CUSTNAME")%> 
                                    </td> 
                                </tr> 
                            </table> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridBoundColumn DataField="CUSTCODE" HeaderText="Cust Code" SortExpression="CUSTCODE" 
                        UniqueName="CUSTCODE">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="CUSTNAME" HeaderText="Cust Name" SortExpression="CUSTNAME" 
                        UniqueName="CUSTNAME">  
                    </telerik:GridBoundColumn> 
                </Columns> 
            </MasterTableView> 
        </telerik:RadGrid> 

 

Dimo
Telerik team
 answered on 24 Jun 2010
2 answers
100 views
OK, I prepared to accept that I'm doing this wrong but...

I have a grid that includes the following column definition ...
<telerik:GridBoundColumn  
  HeaderText="Name"  
  SortExpression="Name"  
  UniqueName="Name"> 
</telerik:GridBoundColumn> 

My code behind reads something like this ...

var l = from contact in contacts 
        select new 
        { 
           ContactID = contact.ContactID, 
           Name = contact.LastName + ", " + contact.FirstName, 
        }; 
gdContacts.MasterTableView.DataSource = l; 

When I run this, rather than a value of "Hemming, Stuart" the "Name" column contains a ".ToString()"-like value that reads "{ContactID=1, Name="Hemming, Stuart"}.

Things work as expected if I change my column definition to a template column like this...
<telerik:GridTemplateColumn 
  HeaderText="Name" 
  SortExpression="Name"  
  UniqueName="Name"> 
  <ItemTemplate> 
    <asp:Label runat="server" ID="lblName" Text='<%# DataBinder.Eval(Container, "DataItem.Name") %>' /> 
  </ItemTemplate>                     
</telerik:GridTemplateColumn> 

So, why is that?

Enquiring minds, and all that.

-- 
Stuart

Stuart Hemming
Top achievements
Rank 2
 answered on 24 Jun 2010
1 answer
147 views
Good Morning.

I'm having a problem with web apps telerik based and internet explorer 8.

On page load, the internet explorer hangs for a few seconds and after,  it loads fine.

I have applied  all best practices recommended for you but not works.

The problem occurs on your website too, bellow a URL where the problem occurs.
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/webmailgrid/defaultcs.aspx


Regards,
Fabio.
Radoslav
Telerik team
 answered on 24 Jun 2010
2 answers
200 views
hi telerik,

i have a grid with one row and one column. this column has a html data.. tables, images and etc..
but one of the image comes from database ( for security reasons )
when i open grid, i can see image in grid but when i want to pdf export there is an error about this image path..
System.Web.HttpException: '/async/display.ashx?id=1043' is not a valid virtual path.

as you can see '/async/display.ashx?id=1043'  streams image from db.

sample code;

<telerik:RadGrid ID="grvSchedules" runat="server" Width="100%" CssClass="GridVClass" 
        AutoGenerateColumns="False" AllowPaging="True" GridLines="None" PagerStyle-AlwaysVisible="false" 
        OnItemCommand="grvSchedule_ItemCommand" OnItemDataBound="grvSchedule_ItemDataBound" 
        OnNeedDataSource="grvSchedule_NeedDataSource" OnItemCreated="grvSchedule_ItemCreated" 
        HorizontalAlign="Left">  
        <ExportSettings IgnorePaging="true" ExportOnlyData="true">  
            <Pdf PageHeight="297mm" PageWidth="210mm" PageTitle="Client Schedule" /> 
        </ExportSettings> 
        <PagerStyle Mode="NumericPages" AlwaysVisible="False"></PagerStyle> 
        <MasterTableView Width="100%" DataKeyNames="RecId" CellSpacing="1" PageSize="20">  
            <Columns> 
                <telerik:GridTemplateColumn> 
                    <ItemTemplate> 
                                    <table width="800px">  
                                        <colgroup> 
                                            <col /> 
                                            <col /> 
                                        </colgroup> 
                                        <tr> 
                                            <td style="color: White;">  
                                                [Fax]<br /> 
                                            </td> 
                                            <td> 
                                            </td> 
                                        </tr> 
                                        <tr> 
                                            <td> 
                                                <img alt="" src="/Images/abc.png" /> 
                                            </td> 
                                            <td> 
                                                </td> 
                                        </tr> 
                                        <tr> 
                                            <td> 
                                                [DateToday]  
                                            </td> 
                                            <td> 
                                            </td> 
                                        </tr> 
                                        <tr> 
                                            <td> 
                                                [COMPANY]  
                                            </td> 
                                            <td>ClientName]                                            </td> 
                                        </tr> 
                                        <tr> 
                                            <td> 
                                                <img alt="" src="/Images/abc_sign.png" /> 
                                            </td> 
                                            <td> 
                                                <img alt="" src="/display.ashx?id=1043" /> 
                                            </td> 
                                        </tr> 
                                        <tr> 
                                            <td> 
                                                [Name]  
                                                <br /> 
                                                Executive Vice President  
                                            </td> 
                                            <td>[Principal]<br />[Title]  
                                            </td> 
                                        </tr> 
                                        <tr> 
                                            <td style="font-size: smaller;" colspan="2">  
                                                <br /> 
                                                [Descriptions]  
                                            </td> 
                                        </tr> 
                                        <tr> 
                                            <td colspan="2" style="color: White;">  
                                                @#  
                                            </td> 
                                        </tr> 
                                    </table> 
                                </td> 
                            </tr> 
                        </table> 
                    </ItemTemplate> 
                </telerik:GridTemplateColumn> 
            </Columns> 
        </MasterTableView> 
        <ClientSettings> 
            <Selecting AllowRowSelect="True" /> 
        </ClientSettings> 
        <AlternatingItemStyle Font-Size="X-Small"></AlternatingItemStyle> 
        <ItemStyle Font-Size="X-Small"></ItemStyle> 
    </telerik:RadGrid> 

Error ;

System.Web.HttpException: '/async/display.ashx?id=1043' is not a valid virtual path.
  at System.Web.VirtualPath.Create(String virtualPath, VirtualPathOptions options)
  at System.Web.HttpServerUtility.MapPath(String path)
  at Telerik.Web.Apoc.Image.ApocImageFactory.Make(String href)
  at Telerik.Web.Apoc.Fo.Flow.ExternalGraphic.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.TableCell.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.TableRow.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.AbstractTableBody.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Table.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.TableCell.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.TableRow.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.AbstractTableBody.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Table.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.TableCell.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.TableRow.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.AbstractTableBody.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Table.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area, Region region)
  at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Pagination.PageSequence.Format(AreaTree areaTree)
  at Telerik.Web.Apoc.StreamRenderer.Render(PageSequence pageSequence)
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.EndElement()
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)


thanks for your help..
Daniel
Telerik team
 answered on 24 Jun 2010
2 answers
147 views

After deleting items from grid, paging doesn't get refreshed.
After deleting all items from last page grid disappears as Pager Index doesn't get updated to previous page.

I tried updating PagingIndex manually but it didnt work.

Found a similar thread open on this issue...Is it a bug with telerik?

http://www.telerik.com/community/forums/aspnet-ajax/docking/radgrid-pager-does-not-getting-refreshed-on-item-deletion.aspx
spt3210
Top achievements
Rank 1
 answered on 24 Jun 2010
2 answers
823 views
I would like to make a suggestion/observation about the use of the JQuery library in the Telerik controls.  First of all, let me say that I am extremely appreciative of your use of it - I love JQuery and think it makes my development life easier.

That being said, I noticed that, in Telerik's implementation of JQuery, you have the following lines at the end of your jQuery library:

// Move jQuery to $telerik 
$telerik.$ = jQuery.noConflict(true); 
 

What I wonder is, why are you passing true to noConflict?  In the JQuery docs, it says this:

If necessary, we can free up the jQuery name as well by passing true as an argument to the method. This is rarely necessary, and if we must do this (for example, if we need to use multiple versions of the jQuery library on the same page), we need to consider that most plug-ins rely on the presence of the jQuery variable and may not operate correctly in this situation.

This is indeed the problem I am seeing when trying to use jQuery plugins with my installation.  I am having to modify every single plugin, so instead of it passing the jQuery object to the plugin, it passes $telerik.$.  I don't see the need to "hide" the jQuery object in this way.  Why can't we have access to the jQuery object just as it should be, through jQuery and through $?  Currently, to make my coding shorter, I am calling this line after the telerik scripts are loaded:

window.$ = $telerik.$; 

This is just so I can use typical jQuery shorthand, like $(document).ready().  What was the need for obscuring the JQuery object in $telerik.$?  Wouldn't it be better to keep it the way it was intended, and allow the developers using your framework to decide whether to call noConflict if they are using other frameworks in addition to yours?

Thanks,
Gene






Gene
Top achievements
Rank 1
 answered on 24 Jun 2010
1 answer
75 views
Hi,
   
    How can I avoid showing up timeslotcontext menu when right clicked on resource header or row header ?

Thanks
Raj
  
Veronica
Telerik team
 answered on 24 Jun 2010
3 answers
182 views
I am using nested view templates. To expand into the nested view, user needs to click the arrow image on the row's left. Is there a way to put some labels to make the template opening action more explicit? Can the left-most column with the clickable arrow have a header, like other columns in the grid, where I could put text "Details"?

Also, can I replace the tooltip of the expand bottom? I'd like to put there "Click to see more details...".

If I can do the above, I will have to introduce a hyperlink column with text "Details" to open the nested view programmatically upon clicking the link. Is that possible?

Radoslav
Telerik team
 answered on 24 Jun 2010
2 answers
122 views
Hi,
I have a problem with my RadScheduler.
The radscheduler displays my AdvancedEditTemplate when I set <AdvancedForm Modal="false" />,
but when I set <AdvancedForm Modal="true" />, nothing happend.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Planning.aspx.cs" Inherits="planning.Planning" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!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>Page sans titre</title> 
</head> 
<body> 
    <form id="form1" runat="server"> 
        <div> 
            <telerik:RadScriptManager  runat="server" ID="RadScriptManager1" /> 
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> 
                <AjaxSettings> 
                    <telerik:AjaxSetting AjaxControlID="RadScheduler1"> 
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                        </UpdatedControls> 
                    </telerik:AjaxSetting> 
                </AjaxSettings> 
            </telerik:RadAjaxManager> 
            <telerik:RadAjaxLoadingPanel  ID="RadAjaxLoadingPanel1" runat="server" /> 
            <telerik:RadScheduler ID="RadScheduler1" runat="server" Culture="French (France)"  
                DataSourceID="SqlDataSourcePlanning" DataEndField="date_fin" DataKeyField="id_planning"  
                DataStartField="date_debut" DataSubjectField="description" GroupBy="Ressource"  
                GroupingDirection="Vertical" ShowViewTabs="False" StartInsertingInAdvancedForm="True"> 
                <ResourceTypes> 
                    <telerik:ResourceType ForeignKeyField="id_ressource" DataSourceID="SqlDataSourceRessource" 
                        KeyField="id_ressource" Name="Ressource" TextField="ressource" /> 
                </ResourceTypes> 
                <AdvancedForm Modal="true" /> 
                <AdvancedEditTemplate> 
                    <div> 
                        <asp:Label ID="Label1"  AssociatedControlID="TitleTextBox" runat="server">Description</asp:Label> 
                        <asp:TextBox ID="TitleTextBox" Rows="5" Columns="20" runat="server" Text='<%# Bind("Subject") %>' Width="97%" TextMode="MultiLine"></asp:TextBox> 
                    </div> 
                    <div> 
                        <asp:Label ID="Label2" AssociatedControlID="StartInput" runat="server">Start time:</asp:Label> 
                        <telerik:RadDateInput ID="StartInput" SelectedDate='<%# Bind("Start") %>' runat="server"> 
                        </telerik:RadDateInput> 
                    </div> 
                    <div> 
                        <asp:Label ID="Label3" AssociatedControlID="EndInput" runat="server" CssClass="inline-label">End time:</asp:Label> 
                        <telerik:RadDateInput ID="EndInput" SelectedDate='<%# Bind("End") %>' runat="server"> 
                        </telerik:RadDateInput> 
                    </div> 
                    <div> 
                         
                    </div> 
                </AdvancedEditTemplate> 
            </telerik:RadScheduler> 
             
            <asp:SqlDataSource ID="SqlDataSourcePlanning" runat="server" ConnectionString="<%$ ConnectionStrings:PLANNING %>" 
                SelectCommand="SELECT [tbl_planning].[id_planning], [description], [date_debut], [date_fin], [lnk_planning_ressource].[id_ressource],  
                [lnk_planning_projet].[id_projet], [lnk_planning_role].[id_role], [tbl_projet].[id_couleur], [tbl_projet].[projet], [reccurence_rule], [recurrence_parent_id]  
                FROM [tbl_planning] INNER JOIN [lnk_planning_ressource] ON [lnk_planning_ressource].[id_planning] = [tbl_planning].[id_planning] 
                INNER JOIN [lnk_planning_projet] ON [lnk_planning_projet].[id_planning] = [tbl_planning].[id_planning]  
                INNER JOIN [tbl_projet] ON [lnk_planning_projet].[id_projet] = [tbl_projet].[id_projet]  
                INNER JOIN [lnk_planning_role] ON [lnk_planning_role].[id_planning] = [tbl_planning].[id_planning] 
                WHERE 1=1;"  
                InsertCommand="DECLARE @id_planning int; INSERT INTO [tbl_planning]([description], [date_debut], [date_fin], [reccurence_rule], [recurrence_parent_id], [duree]) VALUES (@description, @date_debut, @date_fin, @reccurence_rule, @recurrence_parent_id, DATEDIFF(mi, @date_debut, @date_fin)); SET @id_planning = @@identity; INSERT INTO [lnk_planning_ressource]([id_planning], [id_ressource]) VALUES (@id_planning, @id_ressource); INSERT INTO [lnk_planning_projet]([id_planning], [id_projet]) VALUES (@id_planning, @id_projet); INSERT INTO [lnk_planning_role]([id_planning], [id_role]) VALUES (@id_planning, @id_role); SELECT @id_planning2 = @id_planning;" 
                UpdateCommand="DELETE FROM [lnk_planning_ressource] WHERE [id_planning] = @id_planning; DELETE FROM [lnk_planning_projet] WHERE [id_planning] = @id_planning; DELETE FROM [lnk_planning_role] WHERE [id_planning] = @id_planning; UPDATE [tbl_planning] SET [description] = @description, [date_debut] = @date_debut, [date_fin] = @date_fin, [reccurence_rule] = @reccurence_rule, [recurrence_parent_id] = @recurrence_parent_id, [duree] = DATEDIFF(mi, @date_debut, @date_fin) WHERE [id_planning] = @id_planning; INSERT INTO [lnk_planning_ressource]([id_planning], [id_ressource]) VALUES (@id_planning, @id_ressource); INSERT INTO [lnk_planning_projet]([id_planning], [id_projet]) VALUES (@id_planning, @id_projet); INSERT INTO [lnk_planning_role]([id_planning], [id_role]) VALUES (@id_planning, @id_role);" 
                DeleteCommand="DELETE FROM [tbl_planning] WHERE [id_planning] = @id_planning; DELETE FROM [lnk_planning_ressource] WHERE [id_planning] = @id_planning; DELETE FROM [lnk_planning_projet] WHERE [id_planning] = @id_planning; DELETE FROM [lnk_planning_role] WHERE [id_planning] = @id_planning;"> 
                <DeleteParameters> 
                    <asp:Parameter Name="id_planning" Type="Int32" /> 
                </DeleteParameters> 
                <UpdateParameters> 
                    <asp:Parameter Name="description" Type="String" /> 
                    <asp:Parameter Name="date_debut" Type="DateTime" /> 
                    <asp:Parameter Name="date_fin" Type="DateTime" /> 
                    <asp:Parameter Name="id_planning" Type="Int32" /> 
                    <asp:Parameter Name="id_ressource" Type="Int32" /> 
                    <asp:Parameter Name="id_projet" Type="Int32" /> 
                    <asp:Parameter Name="reccurence_rule" Type="String" /> 
                    <asp:Parameter Name="recurrence_parent_id" Type="Int32" />                      
                </UpdateParameters> 
                <InsertParameters> 
                    <asp:Parameter Name="description" Type="String" /> 
                    <asp:Parameter Name="date_debut" Type="DateTime" /> 
                    <asp:Parameter Name="date_fin" Type="DateTime" /> 
                    <asp:Parameter Name="id_ressource" Type="Int32" /> 
                    <asp:Parameter Name="id_projet" Type="Int32" /> 
                    <asp:Parameter Name="id_role" Type="Int32" /> 
                    <asp:Parameter Name="reccurence_rule" Type="String" /> 
                    <asp:Parameter Name="recurrence_parent_id" Type="Int32" />  
                    <asp:Parameter Direction="Output" Name="id_planning2" Type="Int32" />  
                </InsertParameters> 
            </asp:SqlDataSource> 
            <asp:SqlDataSource ID="SqlDataSourceRessource" runat="server" ConnectionString="<%$ ConnectionStrings:PLANNING %>" 
                SelectCommand="SELECT [id_ressource], [ressource] FROM [tbl_ressource] WHERE [supprimer]=0"> 
            </asp:SqlDataSource> 
            <asp:SqlDataSource ID="SqlDataSourceProjet" runat="server" ConnectionString="<%$ ConnectionStrings:PLANNING %>" 
                SelectCommand="SELECT [id_projet], [projet], [id_couleur] FROM [tbl_projet] WHERE [supprimer]=0 ORDER BY [projet]"> 
            </asp:SqlDataSource> 
            <asp:SqlDataSource ID="SqlDataSourceRole" runat="server" ConnectionString="<%$ ConnectionStrings:PLANNING %>" 
                SelectCommand="SELECT [id_role], [role] FROM [ref_role] WHERE [supprimer]=0 ORDER BY [role]" 
                InsertCommand="INSERT INTO [lnk_planning_role] ([id_planning], [id_role]) VALUES (@id_planning, @id_role)"> 
                <InsertParameters> 
                    <asp:Parameter Name="id_planning" Type="int32" /> 
                    <asp:Parameter Name="id_role" Type="int32" /> 
                </InsertParameters> 
            </asp:SqlDataSource> 
        </div> 
    </form> 
</body> 
</html> 

Pierre MAUREL
Top achievements
Rank 1
 answered on 24 Jun 2010
7 answers
276 views
Hi,
I'm working with the Radtabstrip and multipage controls in 2010 release. I get an AJAX related javascript error when I click on any other tab (other than the active one) and it tries to make an AJAX callback. The error is:
i.get_postBackElement() is undefined
on the line:
if(Array.contains(c,i.get_postBackElement().id)){this._isRequestInProgress=true;

I've already tried compilation debug="false" in web.config and Scriptmode="release" on the scriptmanager. Any help will be appreciated.






Yana
Telerik team
 answered on 24 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?