且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从网格视图动态删除行

更新时间:2023-10-10 11:54:16

我首先想到的是;

您可能有一个名为标志",状态"或类似名称的列.使该列可见性为假.在第一次加载gridview时,gridview中的foreach行将这个"flag"值设置为"false".因此,当用户添加新列时,将标志列"值分配为true.因此,在删除数据时,请检查此列是否为true或false.这可能不是***的答案,但可能会暂时解决您的问题.
Well first coming to my mind is;

You might have a column named "flag", "status" or something like that. Make that column visibilty false. At first load of the gridview foreach row in the gridview make this "flag" values as "false". So when the user adds a new column assign the "flag column" value to true. So while deleting the data check this column if it is true or false. This might not be the best answer but it might solve your problem temporary.


是的,首先要解决.首先暂时解决问题.还有一点需要注意,不是使可见性为假,而是从datable删除行并调用Grid填充函数....
Yeah, first things first. Solve the problems temporarily first. One more point which is coming in mind, instead of making the visibility false, delete the row from datable and Call Grid Populating Function....