More in this section
Forums / General Discussions / DataGrid with MySQL Datasource

DataGrid with MySQL Datasource

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
4 posts, 0 answered
  1. John
    John avatar
    1 posts
    18 Jan 2011
    18 Jan 2011
    Link to this post

    I am evaluating sitefinity and am wondering if someone could let me know how to use a MySQL database as the datasource for controls on my test site. I have not been able to find anything that tells a user, step-by-step, how to get this working properly. I have tried several things to get this to work but to no avail.

    If someone could help with this is would be much appreciated.

  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    01 Feb 2016
    20 Jan 2011
    Link to this post
    Hello John,

    Thank you for using our services.

    This can be done in Sitefinity 4.0, but can be used for custom controls at this time. You can create a user control which uses an SqlDataSource control to connect to your database and pull data from it. I have a small screen cast showing the process of creating this data source using it on a Sitefinity 4.0 site. Bellow is the generated markup:
    <asp:GridView runat="server" ID="GridView1" DataSourceID="MySQLData"></asp:GridView>
    <asp:SqlDataSource runat="server" ID="MySQLData"
        ConnectionString="server=;User Id=xxxx;password=xxxx;database=mysitefinitydb"
        SelectCommand="SELECT * FROM `mysitefinitydb`.`sf_cmscontentbase`;"></asp:SqlDataSource>

    Kind regards,
    Radoslav Georgiev
    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. Thiru
    Thiru avatar
    1 posts
    16 Sep 2011
    13 Jan 2012
    Link to this post
    Hello Radoslav Georgiev,
    Great post - Thanks for the same.

    I like to get the same for Vb.Net (windows application)
    I mean GridView is very easy with MSSql.
    but its not much easy with MySQL (compared with MSSQL)

    Do you have any sample code (windows application as well as web application)
    for handling GridView ?
  4. Robert
    Robert avatar
    1 posts
    04 Jun 2012
    04 Jun 2012
    Link to this post
    hi Thiru
    here is some sample of datagrid view connecting to database

    from the above form you can add/edit/load from database to datagridview

4 posts, 0 answered