Datagridview-从底部添加行? [英] Datagridview- Add rows going up from bottom?

查看:104
本文介绍了Datagridview-从底部添加行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

而不是在添加行时,它从上到下添加。如何从下到上添加行。最高限额。



这可能吗?如果没有,那么我可以用它来获得这个?





我会看到,当你在自助结账时去商店屏幕,行增加了。这是一个datagridview吗?





谢谢

解决方案

添加 FlowLayoutPanel [ ^ ]到你的表单并将FlowDirection属性设置为 BottomUp

然后你可以添加控件,FlowLayoutPanel从下往上填充它们。

for示例下面的代码添加按钮以按钮点击事件的流程布局

 公共  Form1 

Dim id As 整数 = 0
私人 苏b Button1_Click(发件人作为系统。对象,e 作为 System.EventArgs)句柄 Button1.Click
id = id + 1
Dim btn 作为 Button()
btn.Text = id.ToString()
FlowLayoutPanel1.Controls.Add(btn)
End < span class =code-keyword> Sub
结束


Instead of when adding a row it adds from top to bottom. How can I make rows add from bottom to top. Acending To top.

Is This Possible?. If Not, then what can I use to get this ?


I would see, when you go to the store in the self checkout screen, the rows add going up. Is That a datagridview?


Thanks

解决方案

Add FlowLayoutPanel[^] to your form and set FlowDirection property as BottomUp
then you can add controls to it and FlowLayoutPanel fill them from the bottom up.
for example below code add buttons to flow layout on button click event

Public Class Form1

    Dim id As Integer = 0
    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        id = id + 1
        Dim btn As New Button()
        btn.Text = id.ToString()
        FlowLayoutPanel1.Controls.Add(btn)
    End Sub
End Class


这篇关于Datagridview-从底部添加行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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