更新进入第一记录问题 [英] Update goes to First Record Problem

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

问题描述

我有一个datasource1的gridview,我有一个dropdownlistdropdownlist我通过使用dropdownlist搜索gridview.

问题是当我搜索并尝试更新结果记录时,将刷新gridview并将更新移至数据库表中的第一条记录(即gridview中的第一条记录)

我将模板字段"用作主键"字段,并将其设置为自动递增"

I have a gridview with datasource1 and i have a dropdownlist with datasource2 i search the gridview by using dropdownlist.

The problem is when i search and try to update the resulted record the gridview is refreshed and the update goes to first record in the database table(ie first record in the gridview)

I used Template Field for the Primary Key field which is set to auto incriment

<asp:TemplateField HeaderText="SI.No.">
                            <itemtemplate>
                                <%# Container.DataItemIndex + 1 %>
                            </itemtemplate>


推荐答案

您好,克里希纳,

请更具体
我想不通你想要实现的目标
Hi Krishna,

Please be more specific
I cant figure out what you wanna achieve


这篇关于更新进入第一记录问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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