Hi guys...
After I write the private void Bindsequence function.... It will change my datagrid row sequence...
Too bad even though my datagrid changes...But my database never store the new sequence...
After I log out and log in again...The sequence are still the old one...
How can I store it???
private void Bindsequence(string cpjttemplt)
{
DataSet dsList = ProjectTaskTemplateLibrary.Get2(cpjttemplt);DataRow[] drResult = dsList.Tables[0].Select(this.strGlobalFilter, "Seq.#");
// Resequencedouble runSeq = double.Parse(this.txtSTART.Text.Trim());double skipSeq = double.Parse(this.txtSKIP.Text.Trim());
runSeq = runSeq - skipSeq;
for (int i = 0; i < drResult.Length; i++)
{
runSeq += skipSeq;
drResult[i]["Seq.#"] = runSeq;
}
//foreach (DataRow dr in dsList.Tables[0].Rows)
//{
// string nseq = dr["Seq.#"].ToString();
//}
DataSet dsFilter = dsList.Clone();for (int i = 0; i < drResult.Length; i++)
{
dsFilter.Tables[0].ImportRow(drResult[i]);
}
dsFilter.AcceptChanges();
this.dgptemp2.DataSource = dsFilter.Tables[0];
}
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).