Hello,
I am brand new to RadGrid.
I working on a grid that have only 3 columns.
Firstly, data are retrieved from database into a DataTable, like this:
then bind to radgrid using: .DataScource = dataTable;
I want to archive the followings:
1. Active column: i wanna use Image button to render "Activate", "Deactivate" command. When user click those buttons, how can i know from which rows, the buttons were clicked. If the data cell is empty, then do not show any button.
2. I wanna replace Duplicate and Delete with two image buttons inside the same cell.
It seems that i should use ItemTemplate or something like that but after reading documents from telerik, i still can not find out the solution. I am really appreciate your help. Thanks in advanced.
I am brand new to RadGrid.
I working on a grid that have only 3 columns.
Firstly, data are retrieved from database into a DataTable, like this:
static DataTable GetData() { DataTable table = new DataTable(); table.Columns.Add("Name", typeof(string)); table.Columns.Add("Activate", typeof(string)); table.Columns.Add("Actions", typeof(string)); table.Rows.Add("Toilets", "Activate", "Duplicate Delete"); table.Rows.Add("Swimming pools", "Activate", "Duplicate Delete"); table.Rows.Add("Pumps", "Deactivate", "Duplicate Delete"); table.Rows.Add("Taps", "", "Duplicate Delete"); table.Rows.Add("Boiler", "Activate", "Duplicate Delete"); return table; }"
then bind to radgrid using: .DataScource = dataTable;
I want to archive the followings:
1. Active column: i wanna use Image button to render "Activate", "Deactivate" command. When user click those buttons, how can i know from which rows, the buttons were clicked. If the data cell is empty, then do not show any button.
2. I wanna replace Duplicate and Delete with two image buttons inside the same cell.
It seems that i should use ItemTemplate or something like that but after reading documents from telerik, i still can not find out the solution. I am really appreciate your help. Thanks in advanced.