This is a migrated thread and some comments may be shown as answers.

GridButtonColumn

1 Answer 90 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Zsolt
Top achievements
Rank 1
Zsolt asked on 05 Mar 2009, 05:42 PM
Hi Folks,

I've tried to display data from MS SQL Server 2005 using RadGrid. I've placed some GridBoundColumn which display the data. I've placed a GridButtonColumn too. In case I click this button (by row) I would like to update the SQL table.

I placed the code into  protected void gBizonylatokJovahagyasa_ItemCommand(object source, GridCommandEventArgs e) to handle the command.

the following code is responsible to get the command name:

 

string _BizonylatID = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["BizonylatID"].ToString();

 

 

string _commandname = e.CommandName;

so I wrote a method to run the sql UPDATE statement: 

 

private

void AcceptCommand(string _BizonylatID)

so i've tried to test and clicked on Command on grid but nothing happaned?

what is the problem?

Thanks,

Zsolt Zombik

 

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 06 Mar 2009, 07:36 AM
Hi,

Try Rebinding the Grid after performing the Update operation and see whether it is working.

 
RadGrid1.MasterTableView.Rebind(); 

Shinu.
Tags
Grid
Asked by
Zsolt
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or