在asp.net中删除gridview中自动生成列的默认控件 [英] Remove default controls for autogenerated columns in gridview in asp.net

查看:95
本文介绍了在asp.net中删除gridview中自动生成列的默认控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hai先生,



我正在为gridview创建自动生成的列,默认情况下会添加文本框控件,我想将文本框替换为自动生成列中的下拉列表在gridview。你可以解决我的问题

Hai sir,

I am creating auto generated columns for gridview and by defaultly textbox control will be added and i want to replace textbox to dropdowns in auto generated columns in gridview .can you please solve my problem

推荐答案

你必须将你的字段转换为模板字段。这将允许您编辑模板并根据需要更改控件。



单击gridview的智能标记,然后单击编辑字段。然后找到要更改的字段,然后单击隐藏到模板。然后再次在智能标记中,选择编辑模板。这样您就可以访问默认文本框,并可以更改它。
You will have to covert your fields into templated fields. This will allow you to edit the template and alter the controls as you need.

Click the smart tag of the gridview and click "Edit Fields". Then find the field you want to change and click covert to template. Then in the smart tag again, select edit templates. This will give you access to the default textbox and give you the ability to change it.


这篇关于在asp.net中删除gridview中自动生成列的默认控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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