网格视图绑定 [英] grid view bind

查看:113
本文介绍了网格视图绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

public void BindGridView(string IncidentZone)
    {
        CDriver objDriver = new CDriver();
        DataTable dt = objDriver.GetDriversForIncident(IncidentZone);
        Session["Smsdata"] = dt;
        if (dt.Rows.Count > 0)
        {
            tblSearchCUser.Visible = true;
            DataView dv = dt.DefaultView;
            
            gvDriver.DataSource = dt;
            gvDriver.DataBind();
            
        }



我想逐行绑定gridview,并且在计时器刻度上要绑定下一行



I want to bind gridview row by row ,and on timer tick want to bind next rows

推荐答案

tejasvee写道:
tejasvee wrote:

den



窝是狼睡觉的地方.你的意思是那么"吗?

听起来您需要使用AJAX或编写大量JavaScript以级联方式显示数据.如果使用中继器,则可以更好地控制输出,然后可以在隐藏的行中发出数据,并使用有意义的id方案(例如row1,row2),并使用循环和计时器来显示一次一个.

这样的绑定将始终显示所有数据,您唯一希望做的就是对临时查看者隐藏其中的一部分并将其显示出来.或者,您需要创建一次返回一行的方法,并根据需要使用AJAX自己渲染它.



A den is what wolves sleep in. Did you mean ''then'' ?

Sounds like you need to either use AJAX, or write a lot of javascript to show your data in a cascading fashion. If you use a repeater, you will have more control over the output and you could then emit the data in rows that are hidden, and use an id scheme that makes sense ( like row1, row2 ) and use a loop and a timer to show them one at a time.

Binding like this will always show all the data, the only thing you can hope to do, is to hide some of it from the casual viewer and show it. Or you need to create methods that return one row at a time, and render it yourself with AJAX, if you prefer.


这篇关于网格视图绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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