protected void CollapseAllButton_Click(object sender, EventArgs e) { try { if (CollapseAllButton.Text == "Collapse All") { NodesTreeList.CollapseAll(); CollapseAllButton.Image.Url = "~/images/icons/add.png"; CollapseAllButton.Text = "Expand All"; } else { NodesTreeList.ExpandAll(); CollapseAllButton.Image.Url = "~/images/icons/forbidden.png"; CollapseAllButton.Text = "Collapse All"; } } catch (Exception ex) { //Log.Entry.Ins.Write(Server.MapPath("~/LogFiles/"), "VSPlusLog.txt", DateTime.Now.ToString() + " Error in Page: " + // Request.Url.AbsolutePath + ", Method: " + System.Reflection.MethodBase.GetCurrentMethod().Name + // ", Error: " + ex.ToString()); //6/27/2014 NS added for VSPLUS-634 Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); } }
public void expandButton() { try { if (CollapseAllButton.Text == "Collapse All") { NodesTreeList.ExpandAll(); //CollapseButton.Image.Url = "~/images/icons/add.png"; //CollapseButton.Text = "Expand All Rows"; } else { NodesTreeList.CollapseAll(); //CollapseButton.Image.Url = "~/images/icons/forbidden.png"; //CollapseButton.Text = "Collapse All Rows"; } } catch (Exception ex) { throw ex; } }
protected void CollapseAllButton_Click(object sender, EventArgs e) { try { if (CollapseAllButton.Text == "Collapse All") { NodesTreeList.CollapseAll(); CollapseAllButton.Image.Url = "~/images/icons/add.png"; CollapseAllButton.Text = "Expand All"; } else { NodesTreeList.ExpandAll(); CollapseAllButton.Image.Url = "~/images/icons/forbidden.png"; CollapseAllButton.Text = "Collapse All"; } } catch (Exception ex) { Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); } }