如何使用添加和删除行按钮在Gridview中添加Combobox和文本框? [英] How Do I Add Combobox And Textbox In Gridview With Add And Delete Row Button?

查看:100
本文介绍了如何使用添加和删除行按钮在Gridview中添加Combobox和文本框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要gridview添加,删除,编辑按钮,gridview应该包含组合框和文本框..

组合框将填充数据库中的值,并且应该有selectedindexchanged事件..

文本框也应该有textchanged事件..



请参阅以下senario:在gridview中,



添加 编辑 删除 | column1 | column2 |第3栏



添加 编辑 删除 | combobox1 | textbox1 | textbox2



_______________________________________________________________________________

总计:textbox3 =加法(textbox2)





组合框包含%的比率,如2%,3%,4%等等



和文本框验证只允许数字



然后,



十进制总数= Convert.ToDecimal(textbox1.Text)* Convert.ToDecimal( combobox1.SelectedValue / 100);

TextBox2.Text = total.ToString();



textbox3.text =第3列中的总数< br $>




Plz help..URGENT ..

Jquery和Javascript首选..Plz ..因为它会在加载中花费这么多时间并添加/编辑/删除按钮

I want gridview with add,delete,edit buttons and also gridview should contain combobox and textbox..
combobox is to be filled with values from database and should have selectedindexchanged event..
textbox should also have textchanged event..

See the following senario : In gridview,

add edit delete | column1 | column2 | column3

add edit delete | combobox1 | textbox1 | textbox2

_______________________________________________________________________________
Total: textbox3 = addition(textbox2)


combobox contains rate in % like 2%, 3%, 4%... etc

and textbox have validation to allow only numbers

then,

Decimal total = Convert.ToDecimal(textbox1.Text)*Convert.ToDecimal(combobox1.SelectedValue/100);
TextBox2.Text = total.ToString();

textbox3.text= total in 3rd column


Plz help..URGENT..
Jquery and Javascript prefered..Plz.. because it will take so much time in load and add/edit/delete butons

推荐答案

使用模板字段列来创建添加,编辑,删除按钮以及文本框,组合框



通过此链接,



带文本框的可编辑网格视图, CheckBox,Radio Button和DropDown List [ ^ ]



如果您仍有疑问,请告知我......
use template field columns for creating add, edit, delete buttons as well as textbox, combobox

Go through this link,

Editable Gridview with Textbox, CheckBox, Radio Button and DropDown List[^]

If you still have doubts, inform me...


这篇关于如何使用添加和删除行按钮在Gridview中添加Combobox和文本框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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