How to dynamically add a custom row to a DetailsView

Hi,

I want to add a custom row to a DetailsView from the code behind.

Please help!
robaherneAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
robaherneConnect With a Mentor Author Commented:
Nevermind... I found a work around.

I added a column to the datatable that was to bind with the details view, entered a custom value into that field and then created a standard databound field to pick up hte value.

Thanks anyways
0
 
chilternPCCommented:
ok.
without seeing what you have already I would use a few tests with IF statemetns to add in the custom row for writing to the clients screen
0
 
robaherneAuthor Commented:
This is what I have so far...

// Create new Template
TemplateField jobdate = new TemplateField();

// Set the fields header
 jobdate.HeaderText = "Job Time";

//Now I want to set the value of the field but I don't know how!
//Something like jobdate.FieldText = "16:30"; would be nice but it doesn't exist.

// And finally Add the field to the DetailsView
grid_JobTable.Fields.Add(jobdate);
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.