如何配置Gridview仅显示信息? [英] How to configure Gridview to display information only ?

查看:76
本文介绍了如何配置Gridview仅显示信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello All,

我有一个gridview,我只是在显示信息。

我想用以下方式配置girdview属性

)禁用添加行功能

2)禁用编辑行功能

3)禁用删除行功能

4)删除默认选择。没有选择行

5)改变外观使它看起来像简单的表

Hello All ,
I have one gridview and there I am just displaying information .
I want to configure girdview property in below ways
1) Disable add row functionality
2) Disable edit row functionality
3) Disable remove row functionality
4) Remove default selection . No row selected
5) change look such that it will look like simple table

推荐答案

Repeater是一个基本的模板化数据绑定列表。它没有内置布局或样式,因此您必须在控件的模板中显式声明所有HTML布局,格式和样式标记。

Repeater是允许开发人员使用的唯一控件在模板中拆分HTML标记。要使用模板创建表,请在HeaderTemplate中包含begin table标记(< table>),在ItemTemplate中包含单个表行标记(< tr>),并在结束表标记(< / table>)中包含FooterTemplate。

Repeater没有内置的选择或编辑支持。用户可以使用ItemCommand事件来处理从模板引发到控件的控件事件。





http://msdn.microsoft.com/en-us/ library / system.web.ui.webcontrols.repeater(v = vs.71).aspx [ ^ ]
The Repeater is a basic templated data-bound list. It has no built-in layout or styles, so you must explicitly declare all HTML layout, formatting, and style tags within the control''s templates.
The Repeater is the only control that allows the developers to split HTML tags across the templates. To create a table using templates, include the begin table tag (<table>) in the HeaderTemplate, a single table row tag (<tr>) in the ItemTemplate, and the end table tag (</table>) in the FooterTemplate.
The Repeater has no built-in selection or editing support. The user may use the ItemCommand event to process control events that are raised from the templates to the control.


http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.repeater(v=vs.71).aspx[^]


这篇关于如何配置Gridview仅显示信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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