Click here to Skip to main content
15,896,154 members

Comments by eraser950 (Top 8 by date)

eraser950 13-Oct-10 5:01am View    
still the same problem can any one have idea how to resolve
eraser950 13-Oct-10 2:54am View    
is there any way to show all data when i search but just highlight the searched data so that this problem will solve
eraser950 13-Oct-10 2:47am View    
no dear its not worrking
eraser950 13-Oct-10 2:43am View    
thnx i willl try this
eraser950 13-Oct-10 2:34am View    
this is my complete code behind
" protected void GVCity_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GVCity.PageIndex = e.NewPageIndex;
BindData();
}

protected void GVCity_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
GVCity.EditIndex = -1;
BindData();
}

protected void GVCity_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
a = ct.DeleteCity(((int)(GVCity.DataKeys[e.RowIndex].Value)));
BindData();
lblMesg.Text = a;
}

protected void GVCity_RowEditing(object sender, GridViewEditEventArgs e)
{
GVCity.EditIndex = e.NewEditIndex;
BindData();
}

protected void GVCity_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
GridViewRow row = GVCity.Rows[e.RowIndex];
a = ct.UpdateCity(((int)GVCity.DataKeys[e.RowIndex].Value), ((TextBox)(row.Cells[1].Controls[0])).Text, ((TextBox)(row.Cells[2].Controls[0])).Text);

//Reset the edit index.
GVCity.EditIndex = -1;
BindData();
lblMesg.Text = a;
}
public void BindData()
{
string SP = "SelectCity";
DataTable dt = esp.ExecSP(SP);
GVCity.DataSource = dt;
GVCity.DataBind();
lblMesg.Text = string.Empty;
}

protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
BindData();
}
lblMesg.Text = string.Empty;
}
}
string SP="SearchCity";//store procedure
DataTable dt= sr.ExecSP(SP, txtSearch.Text);//execute //sp //and //return datatable


GVCity.DataSource = dt;

GVCity.DataBind();"

plz tell me wt i m missing