or
ExtractValuesFromItem and SavedOldValues. Both of them return nulls. Also I am using Bind and NeedDataSource as suggested in various posts.
I am left with following options :
1) Change the entity framework resultset to a Dataset and add that dataset as a public property and use
Dim changedRows As DataRow() = ordersTable.Select("OrderID = " + editedItem.OwnerTableView.DataKeyValues(editedItem.ItemIndex)("OrderID").ToString()
2) Add the OntextChanged event and then do some javascript.
Questions:
Q1 What is the best way of detecting changes and are there any other alternatives?
Q2 Is ther anything that I am missing in my current method of ExtractValuesFrom Item?
Please help. I have gone through numerous threads and downloaded many samples. They work but does not fit into my requirement.
Thanks
<telerik:RadButton runat="server" ID="btnTest" OnClientClicking="clicking" />var LastClickedItem = null;var clickCalledfromConfirm = false;function clicking(sender, args){ if (!clickCalledfromConfirm) { args.set_cancel(true); LastClickedItem = sender; radconfirm("Are you sure you want to do this?", confirmCallBack); } else { args.set_cancel(false); }}function confirmCallBack(args){ if (args) { clickCalledFromConfirm = true; LastClickedItem.click(); }}RadTextBox ( Works !
) ControlExtension.All(this.Controls).OfType<RadTextBox>().ToList().ForEach(radTb => radTb.Attributes.Add("onchange", "noticeChange(" + radTb.ClientID + ");"));ControlExtension.All(this.Controls).OfType<RadTextBox>().ToList().ForEach(radTb => radTb.Attributes.Add("onkeydown", "noticeChange(" + radTb.ClientID + ");"))
DropDownList ( Works !
) ControlExtension.All(this.Controls).OfType<DropDownList>().ToList().ForEach(dd => dd.Attributes.Add("onChange", "noticeChange(" + dd.ClientID + ");"));ControlExtension.All(this.Controls).OfType<DropDownList>().ToList().ForEach(dd => dd.Attributes.Add("onselectedindexchanged", "noticeChange(" + dd.ClientID + ");"));RadComboBox ( Doesn't
) ControlExtension.All(this.Controls).OfType<RadComboBox>().ToList().ForEach(radDd => radDd.Attributes.Add("onclientselectedindexchanging", "noticeChange(" + radDd.ClientID + ");"));ControlExtension.All(this.Controls).OfType<RadComboBox>().ToList().ForEach(radDd => radDd.Attributes.Add("OnClientSelectedIndexChanged", "noticeChange(" + radDd.ClientID + ");"));ControlExtension.All(this.Controls).OfType<RadComboBox>().ToList().ForEach(radDd => radDd.Attributes.Add("onclienttextchange", "noticeChange(" + radDd.ClientID + ");"));ControlExtension.All(this.Controls).OfType<RadComboBox>().ToList().ForEach(radDd => radDd.OnClientSelectedIndexChanged = "noticeChange(" + radDd.ClientID + ")");ControlExtension.All(this.Controls).OfType<RadComboBox>().ToList().ForEach(radDd => radDd.OnClientTextChange = "noticeChange(" + radDd.ClientID + ");");private void list_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e) { ((RadComboBox)o).DataTextField = this.DataField; ((RadComboBox)o).DataValueField = this.DataField; var employees = from emp in EmployeeBL.GetAllEmployees() where emp.FullName.ToLower().Contains(e.Text.ToLower()) select emp; ((RadComboBox)o).DataSource = employees; ((RadComboBox)o).DataBind(); }