DataGrid issue-Urgent

S

settyv

Hi,

I am using DataGrid control and am binding to the Dataset that is
returned from Business layer.
Now the problem is that am using hyperlink column for CaseID which is
displaying twice in the grid.
But it should not be like that.What could be the problem? Any idea.
Here is the code below:


CaseSearch.aspx

<asp:datagrid id="grdCaseSearch" Width="800" Runat="server"
Headerstyle-BackColor="#9B9BB4" AllowPaging="True"
OnPageIndexChanged="NewPage" PagerStyle-Mode="NextPrev"
PagerStyle-NextPageText="Next" PagerStyle-PrevPageText="Previous"
Font-Name="verdana" AllowCustomPaging="false"
AllowSorting="true" HeaderStyle-CssClass="tableheader"
HeaderStyle-ForeColor="#000000" HeaderStyle-Font-Bold="True">
<AlternatingItemStyle BackColor="#e2e2e2" Font-Name="verdana"
/>
<Columns>
<asp:HyperLinkColumn DataNavigateUrlField="Case Number"
DataNavigateUrlFormatString="CaseInformationSummary.aspx?CaseN0={0}"
DataTextField="Case Number" HeaderText="Case
Number"></asp:HyperLinkColumn>
</Columns>
</asp:datagrid>



CaseSearch.aspx.cs

Here is the method am calling :

public void DisplayCaseSearchResults()
{
DataSet ds;

SearchParams sp=new SearchParams ();

lblResultCase.Visible=true;

sp.CaseCatCode=ddlCaseCategory.SelectedItem.Value;
if(txtToFiledDate.Text.ToString()!="" &&
txtFromFiledDate.Text.ToString()!="" )
{
sp.FiledTo = DateTime.Parse(txtToFiledDate.Text);
sp.FiledFrom = DateTime.Parse(txtFromFiledDate.Text);
}

if(txtToFiledDate.Text.ToString()=="")
{
sp.FiledTo = new DateTime(0);
}

if(txtFromFiledDate.Text.ToString()=="")
{
sp.FiledFrom = new DateTime(0);
}

sp.FirstName = txtFirstName.Text;
sp.MiddleName = txtMidName.Text ;
sp.LastName = txtLastName.Text;
sp.Organization = txtBusinessEntity.Text;

if (txtSearchCase.Text.ToString() == "")
{
if(txtCaseNo1.Text.ToString()=="" ||
txtCaseNo2.Text.ToString()=="")
sp.DisplayCaseNum = null;
else
sp.DisplayCaseNum=txtCaseNo.Text + "-" + txtCaseNo1.Text + "-" +
txtCaseNo2.Text ;

}
else
sp.DisplayCaseNum = txtSearchCase.Text;
//sp.DispositionDate=DateTime.MinValue;
//Call BL for getting CaseSearchDataset
Case BCase=new Case ();
BCase.SearchCases(sp,out ds);
grdCaseSearch.DataSource =ds;
grdCaseSearch.DataBind();

}


Please let me know how can i solve this issue.

Thanks,
Vishnu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top