DataGrid issue-Urgent

Discussion in 'ASP .Net' started by settyv@gmail.com, Nov 7, 2006.

  1. Guest

    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
     
    , Nov 7, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jagbal
    Replies:
    1
    Views:
    451
    Craig Deelsnyder
    Jan 7, 2004
  2. Sachin Jagtap

    URGENT !! QUEUE STL PROBLEM URGENT!!

    Sachin Jagtap, Apr 28, 2005, in forum: C++
    Replies:
    4
    Views:
    1,064
    Mark Stijnman
    Apr 29, 2005
  3. =?Utf-8?B?ZGlub28=?=

    Urgent - Asp.NET Datagrid export Excel - landscape Issue

    =?Utf-8?B?ZGlub28=?=, Aug 7, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    2,796
    =?Utf-8?B?ZGlub28=?=
    Aug 7, 2006
  4. Rob
    Replies:
    3
    Views:
    457
  5. Replies:
    1
    Views:
    303
Loading...

Share This Page