当前位置: 动力学知识库 > 问答 > 编程问答 >

Visual Web Part in Sharepoint 2010 shows only XMLDataSource in GridView

问题描述:

I created a new Visual Web Part in VS 2010 (using Sharepoint Server 2010), then dropped a GridView on the User Control.

However when setting up the DataSource for the GridView, I only get XMLDataSource as an option.

There is no option to create a SQLDataSource for instance.

does anyone know how to get over this limitation in Visual Studio 2010?

Thanks

网友答案:

If you are trying to access some sort of on-premise SQL server, you might want to look into BCS. Alternatively, you can also bind your grid to any datasource in the codebehind of your visual web part. For example, you can bind it to a ADO datatable.

分享给朋友:
您可能感兴趣的文章:
随机阅读: