1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Newsletter subscriber template

Newsletter subscriber template

4 posts, 0 answered
  1. Asit
    Asit avatar
    87 posts
    Registered:
    07 Nov 2009
    02 Feb 2010
    Link to this post
    Hi
     In the news letter module, in subscribertemplate.ascx the gridview1 is defaultly binding using sitefinity Datamanager.

    When i m adding 2 more gridview below the gridview1 it's working fine.
    But when i m placing the new gridview in place of gridview1 it's showing error.

    Both DataSource and DataSourceID are defined on 'grddeny'.  Remove one definition.

    Server Error in '/' Application.

    Both DataSource and DataSourceID are defined on 'grddeny'.  Remove one definition.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.InvalidOperationException: Both DataSource and DataSourceID are defined on 'grddeny'.  Remove one definition.


    My requirement is to place the sitefinty gridview1 in betweeen my newly created 2 gridviews.


    Thanks
    Asit
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    02 Feb 2010
    Link to this post
    Hello asit pani,

    Thank you for using our services.

    This error says that you have set both the DataSourceID and the DataSource properties of the grid control which you are using. You should set only one of those properties. Try setting only the the DataSource one. Most probably you are setting the DataSourceID property in the markup, where as the DataSource one is getting set in code. Remove the DataSourceID property setting from markup.

    Sincerely yours,
    Radoslav Georgiev
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
  3. Asit
    Asit avatar
    87 posts
    Registered:
    07 Nov 2009
    02 Feb 2010
    Link to this post
    i don't use the DatasourceID property. i only use datasource.

    When i m repositioning the gridview1 to below the new grid this errr dispalys otherwise if gridview1 is above the new grid or it's actual position then no error comes.


    Thanks.
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    02 Feb 2010
    Link to this post
    Hi asit pani,

    The thing is that the SubscribersList control will always get the first Grid it encounters in its CreateChildControls() method and bind this grid to a specific data source. You should either use it as it works or create a new SubscribersList control (which means creating a module which inherits from NewsLetters in order to override this control).

    Regards,
    Radoslav Georgiev
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
Register for webinar
4 posts, 0 answered