private void tableView_TableViewDataClick(object sender, TableHelper.TableViewDataEventArgs e) { HtmlElement item = scrollTableView.TableBody[e.RowIndex][e.ColumnIndex].HtmlElement; if (item.Children.Count == 0) { item.InnerText = "클릭"; } }
private void browser_Navigating(object sender, WebBrowserNavigatingEventArgs e) { if ("event".Equals(e.Url.Scheme)) { string objectType = e.Url.Host; string eventType = e.Url.Segments[1]; if ("th".Equals(objectType) && "click".Equals(eventType)) { NameValueCollection parameters = HttpUtility.ParseQueryString(e.Url.Query); if (TableViewHeaderClick != null) { int rowIndex = int.Parse(parameters["rowIndex"]); int columnIndex = int.Parse(parameters["columnIndex"]); string value = parameters["data"]; TableViewDataEventArgs args = new TableViewDataEventArgs(TableHeader[rowIndex][columnIndex], rowIndex, columnIndex, value); TableViewHeaderClick(this, args); } } else if ("td".Equals(objectType) && "click".Equals(eventType)) { NameValueCollection parameters = HttpUtility.ParseQueryString(e.Url.Query); if (TableViewDataClick != null) { int rowIndex = int.Parse(parameters["rowIndex"]); int columnIndex = int.Parse(parameters["columnIndex"]); string value = parameters["data"]; TableViewDataEventArgs args = new TableViewDataEventArgs(TableBody[rowIndex][columnIndex], rowIndex, columnIndex, value); TableViewDataClick(this, args); } } else if ("th.checkbox".Equals(objectType) && "change".Equals(eventType)) { NameValueCollection parameters = HttpUtility.ParseQueryString(e.Url.Query); if (TableViewHeaderCheckBoxChange != null) { int rowIndex = int.Parse(parameters["rowIndex"]); int columnIndex = int.Parse(parameters["columnIndex"]); bool isChecked = "true".Equals(parameters["data"]); TableViewDataEventArgs args = new TableViewDataEventArgs(TableBody[rowIndex][columnIndex], rowIndex, columnIndex, isChecked); TableViewHeaderCheckBoxChange(this, args); } } else if ("td.checkbox".Equals(objectType) && "change".Equals(eventType)) { NameValueCollection parameters = HttpUtility.ParseQueryString(e.Url.Query); if (TableViewDataCheckBoxChange != null) { int rowIndex = int.Parse(parameters["rowIndex"]); int columnIndex = int.Parse(parameters["columnIndex"]); bool isChecked = "true".Equals(parameters["data"]); TableViewDataEventArgs args = new TableViewDataEventArgs(TableBody[rowIndex][columnIndex], rowIndex, columnIndex, isChecked); TableViewDataCheckBoxChange(this, args); } } else if ("th.radio".Equals(objectType) && "click".Equals(eventType)) { NameValueCollection parameters = HttpUtility.ParseQueryString(e.Url.Query); if (TableViewHeaderRadioClick != null) { int rowIndex = int.Parse(parameters["rowIndex"]); int columnIndex = int.Parse(parameters["columnIndex"]); string value = parameters["data"]; TableViewDataEventArgs args = new TableViewDataEventArgs(TableBody[rowIndex][columnIndex], rowIndex, columnIndex, value); TableViewHeaderRadioClick(this, args); } } else if ("td.radio".Equals(objectType) && "click".Equals(eventType)) { NameValueCollection parameters = HttpUtility.ParseQueryString(e.Url.Query); if (TableViewDataRadioClick != null) { int rowIndex = int.Parse(parameters["rowIndex"]); int columnIndex = int.Parse(parameters["columnIndex"]); string value = parameters["data"]; TableViewDataEventArgs args = new TableViewDataEventArgs(TableBody[rowIndex][columnIndex], rowIndex, columnIndex, value); TableViewDataRadioClick(this, args); } } else if ("th.button".Equals(objectType) && "click".Equals(eventType)) { NameValueCollection parameters = HttpUtility.ParseQueryString(e.Url.Query); if (TableViewHeaderButtonClick != null) { int rowIndex = int.Parse(parameters["rowIndex"]); int columnIndex = int.Parse(parameters["columnIndex"]); string value = parameters["data"]; TableViewDataEventArgs args = new TableViewDataEventArgs(TableBody[rowIndex][columnIndex], rowIndex, columnIndex, value); TableViewHeaderButtonClick(this, args); } } else if ("td.button".Equals(objectType) && "click".Equals(eventType)) { NameValueCollection parameters = HttpUtility.ParseQueryString(e.Url.Query); if (TableViewDataButtonClick != null) { int rowIndex = int.Parse(parameters["rowIndex"]); int columnIndex = int.Parse(parameters["columnIndex"]); string value = parameters["data"]; TableViewDataEventArgs args = new TableViewDataEventArgs(TableBody[rowIndex][columnIndex], rowIndex, columnIndex, value); TableViewDataButtonClick(this, args); } } else if ("th.select".Equals(objectType) && "change".Equals(eventType)) { NameValueCollection parameters = HttpUtility.ParseQueryString(e.Url.Query); if (TableViewHeaderSelectChangeClick != null) { int rowIndex = int.Parse(parameters["rowIndex"]); int columnIndex = int.Parse(parameters["columnIndex"]); string value = parameters["data"]; TableViewDataEventArgs args = new TableViewDataEventArgs(TableBody[rowIndex][columnIndex], rowIndex, columnIndex, value); TableViewHeaderSelectChangeClick(this, args); } } else if ("td.select".Equals(objectType) && "change".Equals(eventType)) { NameValueCollection parameters = HttpUtility.ParseQueryString(e.Url.Query); if (TableViewDataSelectChangeClick != null) { int rowIndex = int.Parse(parameters["rowIndex"]); int columnIndex = int.Parse(parameters["columnIndex"]); string value = parameters["data"]; TableViewDataEventArgs args = new TableViewDataEventArgs(TableBody[rowIndex][columnIndex], rowIndex, columnIndex, value); TableViewDataSelectChangeClick(this, args); } } e.Cancel = true; } else if ("about:black".Equals(e.Url.ToString())) { if (isLoad) { isLoad = false; } else { e.Cancel = true; } } }