how to bind two values in the same grid.how to bind two values in the same grid.
Old forum URL: forums.lhotka.net/forums/t/6339.aspx
oneinone posted on Thursday, February 05, 2009
hi,
how to bind two values in the same grid.
Here is my code
private ProjectTracker.Library.IssueTrackerList GetProject()
{
object businessObject = Session["currentObject"];
if (businessObject == null ||
!(businessObject is IssueTrackerList))
{
try
{
string fdate = txtfdate.Text;
string tdate = txttdate.Text;
string name = txtsearch.Text;
string subject = txtsearch.Text;
if (!string.IsNullOrEmpty(subject))
{
businessObject = ProjectTracker.Library.IssueTrackerList.GetProjectList(name);
}
else if (!string.IsNullOrEmpty(fdate) && !(string.IsNullOrEmpty(tdate)))
{
businessObject = ProjectTracker.Library.IssueTrackerList.GetProjectListfdate(fdate);
businessObject = ProjectTracker.Library.IssueTrackerList.GetProjectListtdate(tdate);
}
}
catch (System.Security.SecurityException)
{
Response.Redirect("TimeSheetList.aspx");
}
}
return (ProjectTracker.Library.IssueTrackerList)businessObject;
}
actaully i need to display records between two dates.
but im getting only last date records alone.
one thing i understood is im returning businessobject.so it is taking.
and this is my search click
protected void Search_Click(object sender, EventArgs e)
{
if ((txtsearch.Text != null) || (txtfdate.Text != null && txttdate.Text != null))
{
GridView1.DataSource = GetProject();
GridView1.DataBind();
}
}
how can i solve this?
Copyright (c) Marimer LLC