任何人都可以解释下面的代码,它来自gridview_rowdatabound方法 [英] Can anyone explain the below code, which is from a gridview_rowdatabound method
本文介绍了任何人都可以解释下面的代码,它来自gridview_rowdatabound方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Dim tblIdTitleHdr = CType(e.Row.Parent, Table)
tblIdTitleHdr.Controls.AddAt(e.Row.RowIndex * 2 + 1, idTitleHdr)
我尝试过:
这里,idTitleHdr是一个新的GridViewRow。
基本上,本代码的作用是为Gridview中的每一行重复一个标题。守则工作正常。我只是想知道上面的代码行实际上是做什么的。任何帮助将不胜感激。
谢谢!
What I have tried:
Here, idTitleHdr is a new GridViewRow.
Basically, what this Code does is to repeat a header for each row in a Gridview. The Code's working fine. I just want to know what the above lines of Code do actually. Any help would be greatly appreciated.
Thanks!
推荐答案
它正在添加一个控件(idtitleHdr)另一个控件的子控件集合(可能是面板类型)。
只有你知道上下文:什么控制tblIdTitleHdr和idTitleHdr;以及其他控件在集合中导致标题插入范围(即...... * 2 + 1)。
控件添加到(父)集合的顺序会影响它们的呈现顺序。
It's adding a control (idtitleHdr) to another control's "child control" collection (probably a "panel" type).
Only you know the context: what controls tblIdTitleHdr and idTitleHdr are; and what OTHER CONTROLS are in the collection that cause the "headers" to be inserted over a "range" (i.e .... * 2 + 1).
The order in which controls are added to a (parent) collection influences to order in which they are rendered.
这篇关于任何人都可以解释下面的代码,它来自gridview_rowdatabound方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文