进行DataGrid修改很热门? [英] hot to make DataGrid modification ?

查看:66
本文介绍了进行DataGrid修改很热门?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当数据来自sql数据库时,如何从数据网格中删除列+

示例:我在sqltable中有6个项目,所以我想在每个项目旁边添加购买按钮,我该怎么做?

How can I remove a column from a datagrid while the data is from sql database +

Example : I have 6 items in sqltable so i want do add purchase button next to each item how can i do this ?

推荐答案

您可以直接从中删除命名列将代码表中的数据表绑定到数据网格之前.

其次,您可以在ItemTemplate中添加Purchase按钮,以便为数据网格中的每一行呈现该按钮.
You can directly removed the named column from the datatable in the codebehind before binding it to the datagrid.

Secondly, you can add the Purchase button in the ItemTemplate so that it will be rendered for each row in the datagrid.


这篇关于进行DataGrid修改很热门?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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