DataGrid with MySQL Datasource - General Discussions - General Discussions - Progress Community
 General Discussions

DataGrid with MySQL Datasource

  • DataGrid with MySQL Datasource
  • Hello,

    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.

    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
  • 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 ?
  • 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