如何将datalist的项目垂直对齐到顶部 [英] how to vertical align items of a datalist to top

查看:110
本文介绍了如何将datalist的项目垂直对齐到顶部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在GridView的Seven ItemTemplates中使用了七个数据主义者...



如何正确对齐数据列表的项目...



如果假设gridview的第一个itemtemplate的datalist1包含八个项目,并且如果gridview的第二个tetetemplate的datalist2只包含四个,则那些



四个项目显示在中心但不在顶部..



如何让它们在顶部对齐?

解决方案

尝试使用



ItemStyle-VerticalAlign =Top用于TemplateField。 />


这使得TemplateField中的Datalist顶部对齐。



此外,对于单个Datalist也使用相同的

I'm using a Seven Datalists in my Seven ItemTemplates of a GridView ...

how to align the items of a datalists properly...

if suppose my datalist1 of first itemtemplate of gridview contains Eight items and if my datalist2 of secondi temtemplate of gridview contains only four, then those

four items are displayed in center but not at the top..

How to make them to align at top ?

解决方案

Try with

ItemStyle-VerticalAlign="Top" for the TemplateField.

This makes the Datalist inside the TemplateField to top aligned.

Also , use the same for individual Datalist too.


这篇关于如何将datalist的项目垂直对齐到顶部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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