如何删除文本框中的一些文本? [英] how to remove some text in textbox?

查看:84
本文介绍了如何删除文本框中的一些文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生,
如果我选中该行中的复选框,则在我的datagrid中放置复选框
cell [1]的值显示在文本框中.如果再次单击该值,则再次输入到文本框中.但我的要求是仅在文本框中输入一次cell [1]值.
请对此给出任何想法.
谢谢

hi sir,
in my datagrid i place checkboxes, if i select checkbox that row
cell[1] value is displayed in textbox. if again i click that value is again entered into textbox. but my requirement is cell[1] value is entered only one time into the textbox.
please give a any idea about this.
Thanks

推荐答案

对值是否已经存在进行逻辑检查,请不要这样做.
您还可以在每行中使用一些计数器或标记来跟踪复选框的单击.如果执行一次,请将flag的值设置为true,然后将值复制到文本框.随后的单击不会影响标志的更改,因此不会再进行复制.每行一次!
Place a logical check of if the value is already there then don''t do it.
You can also use some counter or a flag per row that tracks the checkbox click. If done once, set the value of flag to true and copy the value to the textbox. Subsequent clicking would not affect the flag change and thus no more copying. Once per row!


这篇关于如何删除文本框中的一些文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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