Solved

How to dynamically add a custom row to a DetailsView

Posted on 2009-05-12
3
614 Views
Last Modified: 2013-11-08
Hi,

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

Please help!
0
Comment
Question by:robaherne
  • 2
3 Comments
 
LVL 28

Expert Comment

by:chilternPC
ID: 24365450
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
 

Author Comment

by:robaherne
ID: 24365496
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
 

Accepted Solution

by:
robaherne earned 0 total points
ID: 24366072
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

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now