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

Adding new rows via Datatable for RadGrid (Help with Check Boxes)

3 Answers 91 Views
Grid
This is a migrated thread and some comments may be shown as answers.
TIM
Top achievements
Rank 1
TIM asked on 25 Oct 2011, 02:22 AM
Hey guys, having some issues, been racking my brain...

I am trying to provide list results in a radgrid.

my code so far is:

dt.Columns.Add("chk")
dt.Columns.Add("Profile Image")
dt.Columns.Add("Name")
dt.Columns.Add("Info1")
dt.Columns.Add("Info2")
dt.Columns.Add("Score")
dt.Columns.Add("Actions")
 
 
 
dt.Rows.Add(CheckBox, Image, "#Name#", "#Info#", "#Info2#", "#Score#", "##Actions##")
 
RadGrid1.DataSource = dt
RadGrid1.Rebind()

I am having issues setting checkbox, and image. I assume if I can get an example of 1, I can figure out the other.

I was also going to be adding buttons into the 'Actions' column as well.


Thanks in advance!

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 25 Oct 2011, 06:55 AM
Hello Tim,

I tried the same scenario and it worked as expected. Here is the sample code.

C#:
dt.Columns.Add("chk");
. . . .
dt.Columns.Add(myDataColumn);
DataRow row=dt.NewRow();
dt.Rows.Add(dt.Rows.Add(row);
RadGrid1.DataSource = dt;
RadGrid1.DataBind();

Thanks,
Shinu.
0
TIM
Top achievements
Rank 1
answered on 25 Oct 2011, 04:23 PM
In your code, that added a check box column?
0
Jonathan
Top achievements
Rank 1
answered on 21 Oct 2016, 04:57 PM
I'd like to add a DT to a radgrid which is already filled by SQL statement. Is there a way to append new rows from a NEW DataTable to an existing radGrid?
Tags
Grid
Asked by
TIM
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
TIM
Top achievements
Rank 1
Jonathan
Top achievements
Rank 1
Share this question
or