如何增加数据列表中第N个项目的高度 [英] how to increase height of Nth items in datalist

查看:72
本文介绍了如何增加数据列表中第N个项目的高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,

我想设计我的数据列表

我想创建我的数据列表,因为它的第一个项目应该放大,而不是其他项目.
如何显示

hello friends,

i want to design my datalist
such as
i want to create my datalist as its first items should be enlarge rather then other items.
how it possible to show

推荐答案

使用ItemDataBound事件更改第一项"的字体大小.

在该事件内部,增加所需元素的字体大小.
Use ItemDataBound event to change the font size of the First item.

Inside that event Increase the font size of required element.


绑定数据列表后,只需调用以下内容:
After binding the DataList just call this:
DataList1.Items[0].Height = new System.Drawing.Size(100, 100);
//instead of 100, 100 as height and width you can give according to your wish.




--Amit




--Amit


这篇关于如何增加数据列表中第N个项目的高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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