简体   繁体   中英

DataGrid Row checkbox filed Not updated in asp.net

嗨,我有一个datagrid ...具有一个复选框字段...每当我选中该行将在数据库中插入的时间时复选框...但是复选框值未设置为true值...它总是返回假值...我正在使用C#asp.net 2003版本..请帮助我...

If you data bind the grid in Page_Load, maybe you don't check for IsPostBack, so, your grid gets rebound and all previous changes like check are not persisted.

if(! Page.IsPostBack)  
{
    // Data bind the grid  
}

Another possible reason is how you try to retrieve the checbox.

We really need to see some code in order to help you.

Its not immediately clear what your problem is. But if I had to guess, since ASP.NET 1.1. doesn't support two-way data binding, I would start with the code that reads the data from the form and updates your data source.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM