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
Omar
NA
12
10.2k
How to disable button in a listView
Feb 27 2013 1:47 PM
I have a list view that displays all the classes a student is in. The second column is the class ID in which I have a tool tip that displays the class end date. Here is the function for the toolTip...
public string GetClassEndDate(object eval)
{
string retVal = ""
if(Convert.IsDBNull(eval)) return retval;
int classID = Convert.ToInt32(eval);
Datatable data = GetData("SELECT classID, EndDate FROM classes where classId = " + classID);
List<DataRow> list = data.AsEnumerable().ToList();
var result = list.Where(row=> row["ClassID"].Equals(classID));
foreach ( var datarow in result){
retVal = dataRow["EndDate"].ToString();
}
return Convert.ToDateTime(retVal).ToShortDateTime();
}
How can I call the result (end date value) of this function to use in another function where I disable the EDIT button if the class end date is 3 days previous from today. In other words, if it has been 3 days since the class end date, I need to disable that EDIT button for that row in the listview. I am stuck, any help please! Thanks.
Reply
Answers (
0
)
How to retrieve the blob image from oracle database.
click gridview link button"view" and show all details