本文介绍了如何将选定的行从gridview1移到gridview2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在处理购物车应用程序.

当购物者在gridview1中选择产品时,它将被添加到购物车中,即gridview2.

(将gridview用于购物车是一种好习惯吗?有什么建议吗?)

我可以将一行从gv1移到gv2.

但是当第二行移至gv2时,则应将其添加到
gv2的第二行以及相应的gv2的第三行到第三行.

现在,每次我在gridview1中选择一行时,它将替换gridview2的第一行.

如何克服这个问题?

谢谢
Pradeep

Hi

I am working on a shopping cart application.

When shopper selects a product in gridview1 it will be added to cart ie gridview2.

(is it good practice to use gridview for shopping cart?? any suggestions??)

I am able to move one row from gv1 to gv2.

but when the second row is moved to gv2, then it should be added to
the second row of the gv2 and accordingly third row to third row of the gv2.

now every time i select a row in gridview1, it replaces the first row of gridview2.

how to overcome this problem??

Thanks
Pradeep

推荐答案

Get the last row index of the gridview and add your row at the lastrowindex+1
If you coludnot make it out post your code


这篇关于如何将选定的行从gridview1移到gridview2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 13:55