在RadGrid中插入和更新 [英] Insert and Update in RadGrid

查看:94
本文介绍了在RadGrid中插入和更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,

我正在使用rad网格,我在网格外部有添加,删除和编辑按钮.单击按钮并单击编辑并添加,我有一个在网格下滑动的asp面板.此面板有用于编辑和更新的文本框.具有保存的按钮然后取消.

如何编写代码服务器端,这样,当单击添加并打开面板,然后在保存按钮上运行插入查询,并在单击编辑时运行更新.如果在同一按钮上还使用其他事件,则单击事件保存.

我的编辑",删除"和添加"按钮在网格外部.


有人可以帮忙吗?...

谢谢
Amit.

Hey there,

I am using a rad grid,where i have add,delete and edit buttons outside the grid.On button click edit and add i have a asp panel which slides under the grid.this panel have textboxes for editing and updating.It have buttons save and cancel.

How to write code server side such that,when add is clicked and panel opens then insert query runs on save button,and Update when edit is clicked.Using if else on same button click event save.

My Edit,delete and Add Buttons are outside grid.


Could someone help?...

Thanks
Amit.

推荐答案

尽管您的问题是,但您需要的是:
1.检查是否在网格中选择了一行.
2.根据选择,使用其键获取完整的记录详细信息.
3.使用这些值填充编辑面板控件.
4.更改后单击保存后,在服务器端从控件获取值并将其保存到DB.更新围栏.
试试吧!
Though for your question, what you need is:
1. Check if a row is selected in a grid.
2. Based on selection, use its key to get the full record details.
3. Populate the edit panel controls with those values
4. Once save is clicked after a change, on server side get values from controls and save it to DB. Update gird.
Try!


这篇关于在RadGrid中插入和更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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