RadGrid in MS Dynamic Data

15 posts, 1 answers
  1. miksh
    miksh avatar
    275 posts
    Member since:
    Nov 2006

    Posted 09 Jul 2010 Link to this post

    I wonder if there is a guideline to substitute GridView with RadGrid in MS DynamicData 4.0?
  2. Tsvetina
    Admin
    Tsvetina avatar
    1876 posts

    Posted 15 Jul 2010 Link to this post

    Hello,

    You can check this blog post out and download the provided archive, as it contains the latest version of DynamicData integration of RadControls for ASP.NET AJAX, including a ReadMe file with guidelines provided.

    You can also find sample projects and a few different scenarios discussed on using RadGrid in MS DynamicData in these forum threads:

    RadGrid and DynamicData Entity Web Site
    Grid DynamicData metadata support

    Regards,
    Tsvetina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. miksh
    miksh avatar
    275 posts
    Member since:
    Nov 2006

    Posted 15 Jul 2010 Link to this post

    Hi Tsvetina,

    Thanks for links but first two ones including readme are done for DD 3.5 more than a year ago and may not be compatibale or not fully supporting the new features of DD4. The blog for using Telerik controls in DD has not been updated for a long time so it seems the integration of Rad controls with DynamicData not to be a priority at Telerik.
    I would be glad to know if I'm mistaken and you are going to change your priotities and publish good samples & articles on how to use Rad controls in DD4. The project which is attached in the last link works fine with DD4 but is not complete (e.g. no RadGrid in List.aspx). It can be a good start point. Ideally, there should be two VS2010 DD templates (or sample projects) for both Linq & Entity with full substitution of asp.net controls with Rad ones (or at least RadGrid and new Field templates with rad controls to choose from).

    Thanks in advance.
    Michael
  5. Answer
    Tsvetina
    Admin
    Tsvetina avatar
    1876 posts

    Posted 16 Jul 2010 Link to this post

    Hello,

    Our developers are working on implementing support of our controls for Dynamic Data 4.0 but it is a complicated task, requiring some time to complete. Keep track of our blogs, as it will be announced there as soon as we have an updated project.

    Kind regards,
    Tsvetina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. miksh
    miksh avatar
    275 posts
    Member since:
    Nov 2006

    Posted 16 Jul 2010 Link to this post

    Good news, thanks.
  7. Jeffery
    Jeffery avatar
    18 posts
    Member since:
    Sep 2006

    Posted 01 Oct 2010 Link to this post

    I have 2 questions about this:

    1) Will you still be able to continue development against 3.5 framework too?  Our production servers will be with v3.5 for a long time,

    2) I could not get the Export function work under both v4 and v3.5.  In both version, the exported file only gets the table header, but no data is exported.  Do you have an example somewhere to show how to get Export work?

    Thanks in advance.
  8. Stephen Naughton
    Stephen Naughton avatar
    19 posts
    Member since:
    Apr 2010

    Posted 01 Oct 2010 Link to this post

    Hi Miksh, I'm trying to work on that now, build an article for my blog and post it there.

    Steve Naugnton (MVP)
  9. Tsvetina
    Admin
    Tsvetina avatar
    1876 posts

    Posted 07 Oct 2010 Link to this post

    Hello Jeffery,

    Here is the latest version of RadControls for ASP.NET AJAX control integration with DynamicData. You can try the exporting on it. Currently our efforts in this field are centered mostly on 4.0 version of the .NET framework. 

    Regards,
    Tsvetina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  10. Jeffery
    Jeffery avatar
    18 posts
    Member since:
    Sep 2006

    Posted 07 Oct 2010 Link to this post

    Thanks.

    I really wish that you can at least port some of your bug fixes back to v3.5 version.

    I did try the export to csv feature on the new build.  It is sort of working.  (In fact, I have got the similar result on th v3.5 version too.  So the issue is not really specific for v4.0.)  Here are what I have found:

    1) Export to Excel as Html works, as long as you do not set ExportDataOnly  = true;

    2) ExportDataOnly does work.  If I turn this on, I will get the column header only, all data is missing.  In fact, I think that Export to ExcemlML and Expoert to csv all tuurn this on internally.  This is why I got no data export under them either;

    3) HideStrucureColumn does not work either.  I have to maunally set those columns to be invisible.
  11. Daniel
    Admin
    Daniel avatar
    4945 posts

    Posted 13 Oct 2010 Link to this post

    Hello Jeffery,

    The best way to export RadGrid in this scenario would be to replace the dynamic controls with plain text. For that purpose you should traverse the cells in each data item and replace the DynamicControl by casting the control to its base type and then extracting the plain text.
    For your convenience I modified the previous example to demonstrate how to achieve that.

    Sample code:
    if (e.Item is GridDataItem && isExport)
    {
        GridDataItem item = e.Item as GridDataItem;
        foreach (GridColumn column in RadGrid1.MasterTableView.RenderColumns)
        {
            if (!column.Visible ||
                column is GridExpandColumn ||
                column is GridRowIndicatorColumn ||
                column is GridGroupSplitterColumn)
                continue;
     
            foreach (Control ctrl in ((GridDataItem)item)[column.UniqueName].Controls)
            {
                if (ctrl is DynamicControl)
                {
                    Control fieldTemplate = (ctrl as DynamicControl).FieldTemplate;
                    Control control = (fieldTemplate as FieldTemplateUserControl).DataControl;
                    string data = string.Empty;
                    if (control is ITextControl)
                        data = (control as ITextControl).Text.Trim();
                    else if (control is HyperLink)
                        data = (control as HyperLink).Text.Trim();
                    else if (control is ICheckBoxControl)
                        data = (control as ICheckBoxControl).Checked.ToString();
                    else if (control is IButtonControl)
                        data = (control as IButtonControl).Text.Trim();
                    if (data != string.Empty)
                    {
                        Control parent = ctrl.Parent;
                        parent.Controls.Remove(ctrl);
                        parent.Controls.Add(new Label() { Text = data });
                    }
                }
            }
        }
    }

    Regards,
    Daniel
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  12. Jeffery
    Jeffery avatar
    18 posts
    Member since:
    Sep 2006

    Posted 14 Oct 2010 Link to this post

    Thanks a lot.  This is what I should do at the first place.
  13. Luis
    Luis avatar
    1 posts
    Member since:
    Jul 2008

    Posted 19 Nov 2010 Link to this post

    hi how i can enabled the RadGrid to enable Filtering, because when i change the property it said that the Autowhere has to be False in the GridDatasource i check it and is false !!! how i can solve this problem.
  14. Tsvetina
    Admin
    Tsvetina avatar
    1876 posts

    Posted 24 Nov 2010 Link to this post

    Hi Luis,

    Could you please elaborate more on your scenario, especially on the datasource you use and the way you are using it?

    Regards,
    Tsvetina
    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  15. Salman
    Salman avatar
    2 posts
    Member since:
    Jun 2012

    Posted 08 Jul 2014 in reply to Daniel Link to this post

    I have downloaded your dynamicdata-export.zip and tried after adding references to Telerik.Web.UI.dll and Telerik.Web.Design.dll but export is not working, it does a postback but no download/export after postback.

    Upon debugging I found that the ItemCommand event isn't firing at all. The website is build in .NET 4.0, right? Any other thoughts why it's not working?

  16. Daniel
    Admin
    Daniel avatar
    4945 posts

    Posted 11 Jul 2014 Link to this post

    Hello Salman,

    I tried to reproduce the problem you have described but unfortunately to no avail. Please download the attached video to see the behavior on my end.

    Regards,
    Daniel
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017