DataGrid with MySQL Datasource

Posted by Community Admin on 03-Aug-2018 21:01

DataGrid with MySQL Datasource

All Replies

Posted by Community Admin on 18-Jan-2011 00:00

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.

Thanks,
John

Posted by Community Admin on 20-Jan-2011 00:00

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=127.0.0.1;User Id=xxxx;password=xxxx;database=mysitefinitydb"
    ProviderName="MySql.Data.MySqlClient"
    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

Posted by Community Admin on 13-Jan-2012 00:00

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 ?

Posted by Community Admin on 04-Jun-2012 00:00

hi Thiru
here is some sample of vb.net datagrid view connecting to database
http://vb.net-informations.com/datagridview/vb.net_datagridview_database.htm

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

robert.

This thread is closed