Gridview用户控件中的数据源问题 [英] Data source issue in Gridview usercontrol

查看:57
本文介绍了Gridview用户控件中的数据源问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序中,我要求在许多屏幕中使用gridview.因此,我想创建一个用户控件并在所有屏幕上使用它.但是,gridview中的列将针对每个屏幕而变化.所以我想要一个通用的用户控件,每个页面中的列和数据都会在其中改变.但是当我调用gridview usercontrol并绑定数据时,我看不到ASPX页面中的数据源.

In my application, I have the requirement to use gridview in many screens. So I want to create a user control and use it in all my screens. But, the columns in the gridview will change for every screen. So i want a generic user control for which the columns and data would be changing in every page.But I can''t see Datasource in ASPX page when I call gridview usercontrol and bind data.

推荐答案

这只是一个过程,但是您可以创建一个从原始GridView(asp.net,devexpress等)继承的WebControl,然后扩展基本的gridview.
This is just a though but you could create a WebControl that inherits from the original GridView (asp.net, devexpress, etc.) and then just extend the base gridview.


这篇关于Gridview用户控件中的数据源问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆