Hello I have some trouble with my coding due the changes in codes from Kentico 5.5 to 7.
It's been 2 days try to figure out the errors but I didn't found the solution.
First error:I get Error Cannot implicitly convert type 'CMS.DocumentEngine.TreeNodeDataSet' to 'System.Data.DataSet'. And 'CMS.DocumentEngine.TreeNode' does not contain a constructor that takes 3 arguments
The code for this part is
public static void AddInDocsAndFields(Dictionary<string, List<string>> docsAndFields, List<string> keywordsList)
{
foreach (KeyValuePair<string, List<string>> pair in docsAndFields)
{
string key = pair.Key;
List<string> columns = pair.Value;
TreeProvider provider = new TreeProvider(CMSContext.CurrentUser);
DataSet set = provider.SelectNodes(CMSContext.CurrentSiteName, null, CMSContext.CurrentUser.PreferredCultureCode, false, key);
if (((set != null) && (set.Tables.Count != 0)) && (set.Tables[0].Rows.Count != 0))
{
for (int i = 0; i < set.Tables[0].Rows.Count; i++)
{
TreeNode node = new TreeNode(set.Tables[0].Rows, key, provider);
AddInFields(node, columns, keywordsList);
}
}
}
}
Second major error I get:get_DataRow, I tried to found something similar but no success
if (node2..Table.Columns.Contains(columns[j]))
{
string columnHtml = node2.get_DataRow()[columns[j]] as string;
list2 = GetJustNeededKeywords(columnHtml, node2.get_DocumentID().ToString(), keywordsAndUrlDocIds);
if ((list2 != null) && (list2.Count != 0))
{
str2 = replacer.ChangeKeywordsSgml(columnHtml, list2);
if (columnHtml != str2)
{
node2.SetValue(columns[j], str2);
flag = true;
}
Thank you for your time