English 中文(简体)
返回第一页
原标题:Sort to return to first page

我有一位有名的头盔的GridView。 如果我点击一个头盔,在除第1页外的某个页上打上acc升或 des,那就正确分类,并在该页上展示新的可喜结果。 我想知道,这是否能够做到,然后跳回第一页,保持最后的倾向。

例:

我有20个名“一等名”和“最后名”。 I m目前浏览第2页,记录为11-20。 这份清单目前分类为A-Z(发送)。 在点击第一名头盔时,我要把名单退回Z-A,但我希望电网跳回第1页,显示Z-A。 我如何这样做?

我的约束力目前是这样:

                gvBillers.DataSource = dataView;
                gvBillers.DataBind();
                gvBillers.PageIndex = 0;
                gvBillers.HeaderRow.TableSection = TableRowSection.TableHeader;

通过将Index页打到0之后,Bind数据回头页,但在点击电网中的超链接以打开这一记录时,它打开了错误的记录,因此,在Im会错......

最佳回答

You ll want to set your PageIndex before you DataBind:

gvBillers.PageIndex = 0; 
gvBillers.DataSource = dataView; 
gvBillers.DataBind(); 
问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签