Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
80 views
Hi,

I'm having a problem with hierarchical datagrid using EntityDataSource .  Hopefully its something very obvious that I've done wrong with this but I can't seem to find the issue so far. 

I have used this demo as the basis for a hierarchical grid below and substituted in my own EntityDataSource datasources as required.
http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/declarativerelations/defaultcs.aspx

Also I've been looking at this
http://www.telerik.com/help/aspnet-ajax/grid-binding-to-declarative-datasource-controls.html

The two entity datasources are effectively doctors referrals and any associated attached files.  The referrals table is linked to the attachments table by foreign key (0,1 to many).  The basic flow of operation should be that a referral can be created without any attachments.  Attachments can be added to a referral at time of creation or at a later point. 

Each attachment has a Referralid field which relates to the id field of the Referral table.

So based on this the master table should be.

                <MasterTableView DataSourceID="EntityDataSourceReferrals" DataKeyNames="ID" AllowMultiColumnSorting="True">

The detailsview table should be related based on the below, Mastertable id is related to the REFERRALID of the attachment table (detailsview).

                            <ParentTableRelation>
                                <telerik:GridRelationFields DetailKeyField="REFERRALID" MasterKeyField="ID">
                                </telerik:GridRelationFields>
                            </ParentTableRelation>

When I run the below code I get a result where the referrals show all attachments instead of showing only those attached to the referrals  .

(Incorrect as Referral 1 has one attachment, referral 2 has no attachments)
Referral 1
 ...............=> Attachment (Referralid 1)
Referral  2
............... => Attachment (Referralid 1)

Whereas the correct result should be

Referral 1
 ...............=> Attachment (Referralid 1)
Referral  2
............... => No attachments

Any pointers as to where I'm going wrong here would be welcome.

Thanks.

<%@ Page Language="c#" CodeBehind="testdetailsview.aspx.cs" Inherits="mWebPortal.test"%>
  
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <head>
        <title>Declarative relations in hierarchical ASP.NET Grid | RadGrid Demo</title>
    </head>
    <body>
        <form id="form1a" runat="server">
            <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
            <telerik:RadSkinManager ID="QsfSkinManager" runat="server" ShowChooser="true" />
            <telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All" EnableRoundedCorners="false" />
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="RadGrid1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadGrid1"></telerik:AjaxUpdatedControl>
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>
            <telerik:RadGrid ID="RadGrid1" ShowStatusBar="True"
                             DataSourceID="EntityDataSourceReferrals" runat="server" PageSize="7"
                             AllowSorting="True" AllowPaging="True" GridLines="None" CellSpacing="0">
                <PagerStyle Mode="NumericPages"></PagerStyle>
                <MasterTableView DataSourceID="EntityDataSourceReferrals" DataKeyNames="ID" AllowMultiColumnSorting="True">
                    <DetailTables>
                        <telerik:GridTableView DataKeyNames="REFERRALID" DataSourceID="EntityDataSourceRefAttachments" Width="100%"
                                               runat="server">
                            <ParentTableRelation>
                                <telerik:GridRelationFields DetailKeyField="REFERRALID" MasterKeyField="ID">
                                </telerik:GridRelationFields>
                            </ParentTableRelation>
                        </telerik:GridTableView>
                    </DetailTables>
                </MasterTableView>
            </telerik:RadGrid>
            <asp:EntityDataSource ID="EntityDataSourceReferrals" runat="server"
                ConnectionString="name=RefEntities"
                DefaultContainerName="RefEntities"
                EnableFlattening="False"
                EntitySetName="Referrals">
            </asp:EntityDataSource>
            <asp:EntityDataSource ID="EntityDataSourceRefAttachments" runat="server"
                ConnectionString="name=RefEntities"
                DefaultContainerName="RefEntities"
                EnableFlattening="False"
                EntitySetName="ReferralAttachments"
                AutoGenerateWhereClause="True">
            </asp:EntityDataSource>
        </form>
    </body>
</html>
Michael
Top achievements
Rank 1
 answered on 16 Apr 2013
4 answers
129 views
I want to use RadSpell inside of my RadGrid.  When in "edit mode" I want it to spell check a GridBoundColumn.

Is there an example of that anywhere?
Hossein
Top achievements
Rank 1
Iron
 answered on 16 Apr 2013
1 answer
58 views
Hi,

Current version we have installed on the server is Q1 2011 SP1 (version 2011.1.413) which doesn't have support for IE10.
What should be the best way to upgrade from Q1 2011 SP1 (version 2011.1.413) to Q1 2013 SP1 (version 2013.1.403) however I downloaded a trial version of 2013 and replaced my old Dlls after this change whole site is messed up in terms of style sheet.
Please advice!!!    

Thanks,
Anuj
Vessy
Telerik team
 answered on 16 Apr 2013
3 answers
153 views
We've been using the GridSettingsPersister provided in the help here.
What must be done to save the settings per user or per machine in a similar fashion with the new persistence framework?

Regards,

John
Maria Ilieva
Telerik team
 answered on 16 Apr 2013
8 answers
162 views
Hi,

Yesterday i upgraded from Telerik ASP.NET Ajax controls from v2012.3.1205.40 to 2013.1.220.40. I've noticed 2 issues so far, which were not there in the previous version :

1. RADGRID : In the client-side OnRowSelected event, the args.get_gridDataItem().get_element().rowIndex has changed from a 0 based index to 1 based index. So, for the first row, its returning 1, for 2nd row 2 ... and so on. Earlier it used to be 0 for the 1st row, 1 for the 2nd row ...and so on.

2. RADTEXTBOX : Multiline RadTextBox inside a table is not honoring the Width property specified and always showing a fixed size textbox (probably 160px) regardless of whether a fixed width like "420px" or a percentage value like "95%" is specified.

Please confirm if other developers have reported the same issues as well ? I can provide code samples if required !

Nishant
Vasil
Telerik team
 answered on 16 Apr 2013
7 answers
128 views
(This may or may not be a little too proactive but here goes.)

We seem to be having performance problems on our production server.  We have a Dot Net 4.0 web app with a main screen that is basically a RadGrid.  The system currently has 119 records in it and the grid pages at 15 to the page.  Some users are complaining about slowness.  (According to your white paper on page http://www.telerik.com/products/aspnet-ajax/getting-started/top-performance.aspx , the RadGrid is supposed to be able to handle up to a million records 'easily'.)

If I have a question at all it's this.  My grid is driven by a LinqToSQL datasource called from the NeedDataSource event.  I've traced and this is firing every time I page, and presumably bringing back a fresh set of 119 records each time.  Is this the way it's supposed to work?  Am I missing something basic?  Is there anything specific to LinqToSQL I can do to improve performance, if this is actually a data problem?
Jayesh Goyani
Top achievements
Rank 2
 answered on 16 Apr 2013
1 answer
55 views
hi

i m using the radscedular  but when i raise an event and set recureence rule and then go again and try to edit  any one of the event
 and click on " Edit only this occurrence" i get "e.ModifiedAppointment.ID" null here hence error.
    protected void RadScheduler1_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)
        {
            AppointmentInfo ai = FindById(e.ModifiedAppointment.ID);// get null
            ai.CopyInfo(e.ModifiedAppointment);
        }

 i was working on  older verion  and has updated to 2013 version of telerik. when i was usin the older version i use to get id . now not for the same case." any help".
Plamen
Telerik team
 answered on 16 Apr 2013
2 answers
86 views
Hi,

With many of our clients now moving to IE10, we've had to upgrade our Telerik products as well. We're using ASP.NET.
In most cases the RadEditor and its popups are displaying correctly.

However when I am trying to dynamically add it onto a webform, the popup does not display as expected and is completely non-functional.

Upon clicking the Image Manager, the following happens.
I am attaching a screen capture so you may have a look at it.

To me it looks like some CSS is not getting applied, but I cannot understand why there would be any missing CSS.

Any help would be appreciated.

FYI: I am using Visual Studio 2010, C#. The version we've upgraded to is: v4.0.30319.

Thanks,
Cameron
Cameron
Top achievements
Rank 1
 answered on 16 Apr 2013
3 answers
109 views
If you are using IE9 or IE10 with Compatibility View enabled the Highlighted Width of the TabStrip in Vertical Mode is no consistat

You can view it on your demo at 
http://demos.telerik.com/aspnet-ajax/tabstrip/examples/functionality/vertical/defaultcs.aspx
Turn Compatibility Mode On

I'm not overly worried about Compatibility Mode, but it is nice to have a constant website.
Nencho
Telerik team
 answered on 16 Apr 2013
2 answers
60 views
With regard to this example:  http://demos.telerik.com/aspnet-ajax/grid/examples/programming/custompaging/defaultcs.aspx

Am I reading this correctly?  It looks to me like in the NeedDataSource, if you have entered any filter or sort, custom paging is disabled.

In my own immediate project I implemented custom paging to deal with a rapidly growing database.  I now have a LinqToSql data layer that returns 15 records at a time (rather than the 1000+ it was doing before).  So far, so good.

Are you saying that if I do any filtering or sorting, I have to disable custom paging and download the whole record set again?
Boris
Top achievements
Rank 1
 answered on 16 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?