This is a migrated thread and some comments may be shown as answers.

RadGrid in MS Dynamic Data

14 Answers 182 Views
Grid
This is a migrated thread and some comments may be shown as answers.
miksh
Top achievements
Rank 1
Iron
miksh asked on 09 Jul 2010, 06:38 PM
I wonder if there is a guideline to substitute GridView with RadGrid in MS DynamicData 4.0?

14 Answers, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 15 Jul 2010, 08:30 AM
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
0
miksh
Top achievements
Rank 1
Iron
answered on 15 Jul 2010, 03:28 PM
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
0
Accepted
Tsvetina
Telerik team
answered on 16 Jul 2010, 12:04 PM
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
0
miksh
Top achievements
Rank 1
Iron
answered on 16 Jul 2010, 01:08 PM
Good news, thanks.
0
Jeffery
Top achievements
Rank 1
answered on 01 Oct 2010, 07:26 PM
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.
0
Stephen Naughton
Top achievements
Rank 1
answered on 01 Oct 2010, 09:12 PM
Hi Miksh, I'm trying to work on that now, build an article for my blog and post it there.

Steve Naugnton (MVP)
0
Tsvetina
Telerik team
answered on 07 Oct 2010, 08:28 AM
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
0
Jeffery
Top achievements
Rank 1
answered on 07 Oct 2010, 03:29 PM
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.
0
Daniel
Telerik team
answered on 13 Oct 2010, 11:42 AM
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
0
Jeffery
Top achievements
Rank 1
answered on 14 Oct 2010, 03:25 PM
Thanks a lot.  This is what I should do at the first place.
0
Luis
Top achievements
Rank 1
answered on 20 Nov 2010, 12:23 AM
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.
0
Tsvetina
Telerik team
answered on 24 Nov 2010, 12:21 PM
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.
0
Salman
Top achievements
Rank 1
answered on 08 Jul 2014, 03:01 PM
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?

0
Daniel
Telerik team
answered on 11 Jul 2014, 11:36 AM
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.

 
Tags
Grid
Asked by
miksh
Top achievements
Rank 1
Iron
Answers by
Tsvetina
Telerik team
miksh
Top achievements
Rank 1
Iron
Jeffery
Top achievements
Rank 1
Stephen Naughton
Top achievements
Rank 1
Daniel
Telerik team
Luis
Top achievements
Rank 1
Salman
Top achievements
Rank 1
Share this question
or