or
protected void Page_Load(object sender, EventArgs e){ if (!Page.IsPostBack) { List<ANYTYPE> list = SOMEDATASOURCE; treeView.DataSource = SOMEDATASOURCE; treeView.DataBind(); }}// only one item in page - select itfunction MasterTableViewCreated(sender, eventArgs) { var theGrid = sender.get_masterTableView(); var kount = theGrid.get_dataItems().length; if (kount == 1) { dont_rebuild_grid = true; theGrid.selectItem(theGrid.get_dataItems()[0].get_element()); dont_rebuild_grid = false; }}function ItemsRowSelected(sender, eventArgs) { var theGrid = sender.get_masterTableView(); var k = eventArgs.get_itemIndexHierarchical(); var row = theGrid.get_dataItems()[k]; var getValues = theGrid.extractValuesFromItem(k); var ItemID = theGrid.getCellByColumnUniqueName(row, "ItemID").innerHTML; var ShipStart = theGrid.getCellByColumnUniqueName(row, "ShipStart").innerHTML; var ShipEnd = theGrid.getCellByColumnUniqueName(row, "ShipEnd").innerHTML; var ItemDescription = theGrid.getCellByColumnUniqueName(row, "ItemDescription").innerHTML; var NetCost = theGrid.getCellByColumnUniqueName(row, "NetCost").innerHTML; var BoothNumber = theGrid.getCellByColumnUniqueName(row, "BoothNumber").innerHTML; var VendorNumber = theGrid.getCellByColumnUniqueName(row, "VendorNumber").innerHTML; var rntbOrderCode = $find('<%=rntbOrderCode.ClientID %>'); var rcbVendor = $find('<%=rcbVendor.ClientID %>'); if (dont_rebuild_grid) { if (rcbVendor) { var rcbiVendor = rcbVendor.findItemByValue(VendorNumber); if (rcbiVendor) { rcbiVendor.select(); } dont_rebuild_grid = false; } } // IE if (ItemDescription.indexOf("NOBR") > 0) { ItemDescription = ItemDescription.replace('</NOBR>', ''); ItemDescription = ItemDescription.replace('<NOBR>', ''); } // just about everything else else { ItemDescription = ItemDescription.replace('</nobr>', ''); ItemDescription = ItemDescription.replace('<nobr>', ''); } ItemDescription = ItemDescription.replace('&', '&'); document.forms["form1"].txtItemID.value = ItemID; document.forms["form1"].lblInfo.value = ItemDescription + ' ' + ItemID; document.forms["form1"].lblDelivery.value = ""; document.forms["form1"].txtNetCost.value = NetCost.replace('$', '');// document.forms["form1"].txtBoothNumber.value = BoothNumber; document.forms["form1"].txtVendor.value = VendorNumber; var startDate = $find("<%= rtbStart.ClientID %>"); var endDate = $find("<%= rtbEnd.ClientID %>"); if (startDate != null) { startDate.set_value(ShipStart); } if (endDate != null) { endDate.set_value(ShipEnd); } var i = 0; var j = 0; for (j = 0; j < 1; j++) { for (i = 0; i < document.forms["form1"].txtStoreCount.value; i++) { var actual = $find("sd" + j + i + "_rntbQty"); actual.set_value(''); } } var first_date = $find("<%= del.ClientID %>"); var ship_start = createDate(ShipStart); first_date.set_selectedDate(ship_start); // order code textbox not always found if (rntbOrderCode != null) { rntbOrderCode.set_value(''); } return true;}<script type="text/javascript"> function pageLoad() { $find('<%= RadButtonClickTest.ClientID %>').focus(); } function RadButtonClickTest_OnClientClicking(sender, args) { args.set_cancel(!confirm("Are you sure cancel?")); }</script><div> Has fired server side event?: <asp:Label ID="LabelTest" runat="server" Text="No"></asp:Label> <telerik:RadButton ID="RadButtonClickTest" runat="server" Skin="Simple" Text="Cancel" UseSubmitBehavior="false" TabIndex="1" OnClientClicking="RadButtonClickTest_OnClientClicking" OnClick="RadButtonClickTest_Click" /></div><script type="text/javascript"> function ClientClick(gridName, templateColumnName) { var count = 0; var grid = $find(gridName);
var MasterTable = grid.get_masterTableView(); for (var i = 0; i < MasterTable.get_dataItems().length; i++) { var gridItemElement = MasterTable.get_dataItems()[i].findElement("CheckBox1");
// Instead of hard codeing, I need to find what type of control is in template column
// and based on that write code if (gridItemElement.checked) { count++; break; } } if (count == 0) { alert("Please check atleast one !"); return false; } }</script>The cellspacing attribute on the table element is obsolete. Use CSS insteadThe summary attribute is obsolete. Consider describing the structure of the table in a caption element or in a figure element containing the table; or, simplify the structure of the table so that no description is neededThe abbr attribute on the th element is obsolete. Consider instead beginning the cell contents with concise text, followed by further elaboration if needed.