TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
shuchi
NA
10
0
Problem in binding DataBound Column in DataGrid
Dec 1 2006 2:37 PM
Problem in Binding Databound Columns of DataGrid.
I am using C#.net, Visual Web Developer 2005, SQL Server 2000.
I have a datagrid in my WebForm which has some Template Columns and DataBound Columns.
Now in One of my Bound Column, I would like to display database results based on my SQL query.
I know that I can display it using following code in HTML(.aspx file).
<asp:BoundColumn DataField="OSP_FSD" HeaderText="ETD Date" DataFormatString ="{0:MM/dd/yyyy}"></asp:BoundColumn>
Where OSP_FSD is one of the Database column name.
But My problem is I can not put DataField = "OSP_FSD" as it refers to only one column of database.
I have to bind ETD Date Column based on following cirteria. Split is one of the result of a main SQL query.
If Split = 1
{
// OSP_FSD is Database Column name
Bind it with OSP_FSD
}
else
{
// ORD_ETD is database column name
Bind it with ORD_ETD
}
I think I can not use DataItemBound Event has it just allows to play with binded data. and in my case I have to play with data before it binds the datagrid.
Please HELP!
Reply
Answers (
0
)
help me give smart solution --smart device and xml problem --urgent
setup password