[Solved] Set datagrid row background color WPF – Loop [closed]


I resolved this problem. So the problem is because I fill DataGrid again with Data. Instead that I don’t fill it I only get ID where I stopped from last time in that Table with some ID.

Code for Button Continue:

 int postID;
 string fbGroupID;
 int listID = int.Parse(cmbSelectList.SelectedValue.ToString());

 using (OleDbConnection connection = new OleDbConnection(conn))
 {

  ................

       commName.CommandText = "SELECT TOP 1 [FaceBookGroupID],[PostID] FROM [Advertiseing] WHERE [email] = @email AND [ListForGroupID]= @listID ORDER BY [Date-Time] DESC";

  ................

       postID = list[0].PostID;
       fbGroupID = list[0].FBGroupID;        
       *listID = list[0].ListForGroupID;* //Deleted
  }


  //cmbSelectList.SelectedValue = listID; - Deleted
    cmbSavedPosts.SelectedValue = postID;
  //loadGroupsInList(); - Deleted

  // Next part of code are the same
  ................

5

solved Set datagrid row background color WPF – Loop [closed]