I am trying to test the custom command button functionality. The function does not appear to run.
aspx
<CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false" />
<CommandItemTemplate>
Custom command item template
<asp:LinkButton ID="TestButton" runat="server" CommandName="Test" >Test</asp:LinkButton>
<br />
</CommandItemTemplate>
C#
protected void RadGrid2_ItemCommand(object sender, GridCommandEventArgs e)
{
if (e.CommandName == "Test")
{
string scriptstring = "radalert('Welcome to Rad<b>window</b>!', 330, 210);";
ScriptManager.RegisterStartupScript(this, this.GetType(), "radalert", scriptstring, true);
}
}
Hi,
I had designed ItemTemplate, LayoutTemplate, DataGroupTemplate in RadListView. Its working fine. Right now I am currently grouping by Date.
In my scenario, user can select groupby option either by 'Date' or 'Name'. I tried to declare two DataGroupTemplates, buts its throwing error 'RadListView doesn't have Item place holder specified' . I am pointing to the same ItemPlaceholder(Item Template) in both the DataGroups.
Is there a way to achieve this in RadListView, or should I create two RadListViews for each group and make visible/invisible accordingly.
Please advice,
thank you,
Madhavi
I notice when I have Batch edit and Keyboard navigation, that hitting the ESC key fires the OnBatchEditCellValueChanging event if the value in the editor has changed. I handle this event to process the changed info, but I would think hitting the ESC key would cancel out of any changes. Otherwise, there really doesn't appear to be any way to prevent a changed status once any of the text has been modified.
IMO the ESC key should cancel any changes and take the cell/row out of edit mode without any changed values. Your thoughts? Is there any way to circumvent this behavior? Obviously, if the value is changed, I want to capture that in all instances... except when a user hits the ESC key.
I cant get the item template to reflect the text of the selected item in the radcombobox that is in the edititemtemplate of my programmatically created gridtemplatecolumn
Code for creating the template column:
01.Dim tempDB As New SqlDataSource02.Dim templateColumnName As String = col.Caption03.Dim templateColumn As New GridTemplateColumn()04. 05.templateColumn.DataField = col.Caption06.templateColumn.ItemTemplate = New LCDisp(templateColumnName, ddQuery, DiConnectionString)07.templateColumn.EditItemTemplate = New DDEdit(templateColumnName, ddQuery, DiConnectionString)08.templateColumn.HeaderText = templateColumnName09. 10.templateColumn.UniqueName = col.Caption11. 12.grdReport.Columns.Add(templateColumn)
Code for LCDisp template:
01.Private Class LCDisp02. Implements ITemplate03. Protected lblCont As Label04. Private colname As String05. Private DSQuery As String06. Private DiConnectionString As String07. 08. Public Sub New(ByVal cName As String, ByVal query As String, ByVal connString As String)09. colname = cName10. DSQuery = query11. DiConnectionString = connString12. End Sub13. 14. Public Sub InstantiateIn(container As UI.Control) Implements ITemplate.InstantiateIn15. lblCont = New Label16. lblCont.ID = "lControl" + colname17. AddHandler lblCont.DataBinding, AddressOf litCont_DataBinding18. container.Controls.Add(lblCont)19. End Sub20. 21. Sub litCont_DataBinding(ByVal sender As Object, ByVal e As EventArgs)22. Dim l As Label = DirectCast(sender, Label)23. Dim container As GridDataItem = DirectCast(l.NamingContainer, GridDataItem)24. l.Text = (DirectCast(container.DataItem, DataRowView))(colname).ToString()25. End Sub26.End Class
Code for DDEdit:
01.Private Class DDEdit02. Implements ITemplate03. Protected DropDown As RadComboBox04. Private colname As String05. Private DSQuery As String06. Private DiConnectionString As String07. Private MyContainerDataItem As GridDataItem08. 09. Public Sub New(ByVal cName As String, ByVal query As String, ByVal connString As String)10. colname = cName11. DSQuery = query12. DiConnectionString = connString13. End Sub14. 15. Public Sub InstantiateIn(container As UI.Control) Implements ITemplate.InstantiateIn16. DropDown = New RadComboBox17. 18. Dim dv2 As New DataView19. Dim oQuery As New cWjCoQuery20. 21. oQuery.Load(DSQuery, ConfigurationManager.ConnectionStrings(DiConnectionString).ConnectionString)22. 23. Dim tempDB As New SqlDataSource24. tempDB.ID = colname + "DB"25. 26. tempDB.SelectCommand = oQuery.SQLQuery27. tempDB.ConnectionString = ConfigurationManager.ConnectionStrings(DiConnectionString).ConnectionString28. 29. dv2 = tempDB.Select(DataSourceSelectArguments.Empty)30. DropDown.DataSource = tempDB31. If dv2.Table.Columns.Count > 1 Then32. DropDown.DataTextField = dv2.Table.Columns.Item(0).Caption33. DropDown.DataValueField = dv2.Table.Columns.Item(1).Caption34. Else35. DropDown.DataTextField = dv2.Table.Columns.Item(0).Caption36. DropDown.DataValueField = dv2.Table.Columns.Item(0).Caption37. End If38. 39. DropDown.DataBind()40. 41. MyContainerDataItem = TryCast(container.Parent, GridDataItem)42. If MyContainerDataItem Is Nothing Then43. MyContainerDataItem = TryCast(container.Parent.Parent, GridDataItem)44. End If45. If MyContainerDataItem IsNot Nothing Then46. Dim tmpSelVal = MyContainerDataItem.GetDataKeyValue(colname).ToString47. If Trim(tmpSelVal) <> "" Then48. DropDown.SelectedIndex = DropDown.FindItemIndexByValue(CInt(tmpSelVal))49. End If50. End If51. 52. container.Controls.Add(DropDown)53. End Sub54.End Classis there any way to mark by any way a filter button when its filters are being used? I need to know when a filter is being used without having to open it.

Hi to all!
I have an issue with a RadComboBox during an insert.
Context:
I've made an ASP.Net app for my company to visualize dependencies between our apps by using a RadGrid for raw data and D3.JS for graphic visualization. The logic is easy: FromApp (id) is link to ToApp (id) and you have a comment field too. To do a new insertion I use the "Add new record" button from the grid, in the EditTemplate I've put one FromAppRadComboBox where you can select one app, a ToAppRadComboBox with checkboxes where you can select all the apps link to the one selected befor and a Textbox for comments. For having a record per link, I've made a CustomInsertion function called during the OnInsertCommand of the grid.
Problem:
Regardless the amount of app I check in the ToAppRCB, it will always inserts the first item in addition to the others. I manage to fix this by using a default item, but once the insertion is done, when the app want to refresh then display the grid, it breaks, because of a convertion problem (maybe because of Entity Framework).
Code-Behind:
001.#region002.using ServerMap.DAL;003.using System;004.using System.Collections;005.using System.Collections.Generic;006.using System.Data;007.using System.Data.SqlClient;008.using System.Linq;009.using System.Web;010.using System.Web.Configuration;011.using System.Web.UI;012.using System.Web.UI.WebControls;013.using Telerik.Web.UI;014. 015.#endregion016. 017.namespace ServerMap018.{019. public partial class ApplicationsDependencies : Page020. {021. private List<int> selectedToApplications = new List<int>();022. 023. protected void Page_Load(object sender, EventArgs e)024. {025. if (!IsPostBack)026. {027. string FromApplicationName = HttpContext.Current.Request.QueryString["FromApplicationId"];028. string ToApplicationName = HttpContext.Current.Request.QueryString["ToApplicationId"];029. 030. if (!string.IsNullOrEmpty(FromApplicationName) || !string.IsNullOrEmpty(ToApplicationName))031. {032. string filterColumn = "",033. filterValue = "";034. if (!string.IsNullOrEmpty(FromApplicationName))035. {036. filterColumn = "FromAppId";037. filterValue = FromApplicationName;038. }039. else040. {041. filterColumn = "ToAppId";042. filterValue = ToApplicationName;043. }044. 045. ApplicationDependency.MasterTableView.FilterExpression =046. String.Format(047. "(it.[{0}] = {1}) && ((it.FromApplication.[IT_DECOMMISSION_DATE] is null) && (it.ToApplication.[IT_DECOMMISSION_DATE] is null))",048. filterColumn, filterValue);049. ;050. GridColumn gridColumn = ApplicationDependency.MasterTableView.GetColumnSafe(filterColumn);051. gridColumn.CurrentFilterFunction = GridKnownFunction.EqualTo;052. gridColumn.CurrentFilterValue = filterValue;053. ApplicationDependency.Rebind();054. }055. else056. {057. ApplicationDependency.MasterTableView.FilterExpression =058. "((it.FromApplication.[IT_DECOMMISSION_DATE] is null) && (it.ToApplication.[IT_DECOMMISSION_DATE] is null))";059. ApplicationDependency.Rebind();060. }061. }062. }063. 064. //protected void ToApplicationCombobox_OnDataBound(object sender, EventArgs e)065. //{066. // var combo = (RadComboBox)sender;067. // combo.Items.Insert(0, new RadComboBoxItem("Please select an application", "-1"));068. //}069. 070. //protected void PreSelectItem(string comboboxname, string field, GridItemEventArgs e)071. //{072. // GridEditableItem editableItem = e.Item as GridEditableItem;073. 074. // RadComboBox combo = (RadComboBox)editableItem.FindControl(comboboxname);075. // if (!string.IsNullOrEmpty(editableItem[field].Text) && editableItem[field].Text != " ")076. // {077. // RadComboBoxItem selectedItem = new RadComboBoxItem078. // {079. // Text = editableItem[field].Text.ToString(),080. // Value = editableItem[field].Text.ToString()081. // };082. // combo.Items.Add(selectedItem);083. // if (combo.CheckBoxes)084. // {085. // combo.Items.FindItemByValue(editableItem[field].Text).Checked = true;086. // }087. // selectedItem.DataBind();088. // Session[field] = selectedItem.Value;089. // }090. //}091. 092. protected void CustomCreation(object sender, GridCommandEventArgs e)093. {094. var FromDropDown = (RadComboBox)e.Item.FindControl("FromApplicationCombobox");095. var ToDropDown = (RadComboBox)e.Item.FindControl("ToApplicationCombobox");096. var CommentsTextBox = (RadTextBox)e.Item.FindControl("CommentsTextBox");097. 098. try099. {100. using (var db = new ServerMapContext())101. {102. System.Data.Entity.DbSet<AppToAppDependency> context = db.Set<AppToAppDependency>();103. 104. foreach (RadComboBoxItem item in ToDropDown.CheckedItems)105. {106. if (!LinkExists(Convert.ToInt32(FromDropDown.SelectedValue), Convert.ToInt32(item.Value)))107. {108. var itemToInsert = new AppToAppDependency109. {110. FromApp = Convert.ToInt32(FromDropDown.SelectedValue),111. ToApp = Convert.ToInt32(item.Value),112. Comment = CommentsTextBox.Text113. };114. context.Attach(itemToInsert);115. context.Add(itemToInsert);116. db.SaveChanges();117. }118. }119. }120. }121. catch (EntityDataSourceValidationException validationException)122. {123. ApplicationDependency.Controls.Add(new LiteralControl("ENTITY: Unable to insert application dependencie(s). Reason: " + validationException.Message));124. e.Canceled = true;125. }126. catch (Exception ex)127. {128. ApplicationDependency.Controls.Add(new LiteralControl("Unable to insert application dependencie(s). Reason: " + ex.Message));129. e.Canceled = true;130. }131. finally132. {133. e.Canceled = false;134. }135. }136. 137. protected bool LinkExists(int from, int to)138. {139. try140. {141. using (var db = new ServerMapContext())142. {143. System.Data.Entity.DbSet<AppToAppDependency> context = db.Set<AppToAppDependency>();144. 145. var test = context.Where(x => x.FromApp == from && x.ToApp == to);146. 147. if (test.Any())148. {149. return true;150. }151. return false;152. }153. }154. catch (Exception ex)155. {156. ApplicationDependency.Controls.Add(new LiteralControl(ex.Message));157. return false;158. }159. }160. 161. //protected void AppCombobox_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)162. //{163. // InitAppList(sender);164. //}165. 166. //protected void InitAppList(object sender)167. //{168. // IList<Applications_List> apps = null;169. // using (var db = new ServerMapContext())170. // {171. // System.Data.Entity.DbSet<Applications_List> context = db.Set<Applications_List>();172. 173. // apps = context.Select(x => x).Where(x => x.IT_DECOMMISSION_DATE == null).OrderBy(x => x.BU_APP_NAME).ToList();174. // }175. 176. // RadComboBox Combobox = (RadComboBox)sender;177. 178. // foreach (var app in apps)179. // {180. // RadComboBoxItem item = new RadComboBoxItem();181. // item.Text = app.BU_APP_NAME;182. // item.Value = Convert.ToString(app.id);183. // if (!string.IsNullOrEmpty(item.Text) && item.Text != " ")184. // {185. // Combobox.Items.Add(item);186. // item.DataBind();187. // }188. // }189. //}190. }191.}
ASPX:
001.<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"002. CodeBehind="ApplicationsDependencies.aspx.cs" Inherits="ServerMap.ApplicationsDependencies" %>003. 004.<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" runat="server">005. 006. <telerik:RadScriptManager runat="server" />007. <telerik:RadSkinManager runat="server" Skin="Metro" />008. 009. <telerik:RadGrid010. ID="ApplicationDependency"011. runat="server"012. DataSourceID="AppToAppDependenciesDS"013. AutoGenerateColumns="False"014. AllowPaging="True"015. AllowFilteringByColumn="True"016. PageSize="50"017. AllowCustomPaging="True"018. AllowAutomaticDeletes="True"019. AllowAutomaticInserts="True"020. AllowAutomaticUpdates="False"021. ClientSettings-AllowColumnsReorder="false"022. OnInsertCommand="CustomCreation"023. AllowSorting="True"024. CellSpacing="0"025. GridLines="None"026. Height="800px">027. 028. <ClientSettings>029. <Scrolling030. ScrollHeight="700px"031. SaveScrollPosition="True"032. AllowScroll="true"033. UseStaticHeaders="True"></Scrolling>034. </ClientSettings>035. 036. <MasterTableView037. CommandItemDisplay="TopAndBottom"038. AutoGenerateColumns="False"039. DataKeyNames="id"040. DataSourceID="AppToAppDependenciesDS">041. 042. <PagerStyle AlwaysVisible="true" />043. 044. <SortExpressions>045. <telerik:GridSortExpression SortOrder="Ascending" FieldName="FromApplication.BU_APP_NAME" />046. </SortExpressions>047. 048. <Columns>049. 050. <telerik:GridEditCommandColumn051. UniqueName="EditCommand"052. Exportable="false">053. </telerik:GridEditCommandColumn>054. 055. <telerik:GridBoundColumn056. DataField="id"057. DataType="System.Int32"058. FilterControlAltText="Filter id column"059. HeaderText="id"060. ReadOnly="True"061. SortExpression="id"062. UniqueName="id"063. CurrentFilterFunction="NoFilter"064. AutoPostBackOnFilter="true"065. Visible="False"066. Exportable="true">067. <ColumnValidationSettings>068. <ModelErrorMessage Text="" />069. </ColumnValidationSettings>070. </telerik:GridBoundColumn>071. 072. <telerik:GridBoundColumn073. UniqueName="FromAppId"074. Visible="false"075. ReadOnly="true"076. Exportable="false">077. <ColumnValidationSettings>078. <ModelErrorMessage Text="" />079. </ColumnValidationSettings>080. </telerik:GridBoundColumn>081. 082. <telerik:GridHyperLinkColumn083. UniqueName="FromApp"084. DataNavigateUrlFormatString="~/ApplicationListNew.aspx?ApplicationName={0}"085. DataNavigateUrlFields="FromApplication.BU_APP_NAME"086. HeaderText="From App"087. DataTextField="FromApplication.BU_APP_NAME"088. AllowSorting="true"089. AutoPostBackOnFilter="true"090. CurrentFilterFunction="EqualTo"091. AllowFiltering="true">092. <ItemStyle Wrap="false" />093. <FilterTemplate>094. <telerik:RadComboBox095. Skin="Metro"096. ID="FromAppFilterCombobox"097. Sort="Ascending"098. DataSourceID="ApplicationDS"099. DataTextField="BU_APP_NAME"100. DataValueField="BU_APP_NAME"101. AppendDataBoundItems="true"102. OnClientSelectedIndexChanged=" FromApplicationNameChanged "103. SelectedValue='<%# Container.OwnerTableView.GetColumn("FromApp").CurrentFilterValue %>'104. runat="server"105. Width="400px">106. <Items>107. <telerik:RadComboBoxItem Text="All" />108. </Items>109. </telerik:RadComboBox>110. <telerik:RadScriptBlock ID="FromAppRadScriptBlock" runat="server">111. <script type="text/javascript">112. function FromApplicationNameChanged(sender, args) {113. var tableView = $find("<%# Container.OwnerTableView.ClientID %>");114. tableView.filter("FromApp", args.get_item().get_value(), "EqualTo");115. }116. </script>117. </telerik:RadScriptBlock>118. </FilterTemplate>119. </telerik:GridHyperLinkColumn>120. 121. <telerik:GridBoundColumn122. UniqueName="ToAppId"123. Visible="false"124. ReadOnly="true"125. Exportable="false">126. <ColumnValidationSettings>127. <ModelErrorMessage Text="" />128. </ColumnValidationSettings>129. </telerik:GridBoundColumn>130. 131. <telerik:GridHyperLinkColumn132. UniqueName="ToApp"133. DataNavigateUrlFormatString="~/ApplicationListNew.aspx?ApplicationName={0}"134. DataNavigateUrlFields="ToApplication.BU_APP_NAME"135. HeaderText="To App"136. DataTextField="ToApplication.BU_APP_NAME"137. AllowSorting="true"138. AutoPostBackOnFilter="true"139. CurrentFilterFunction="EqualTo"140. AllowFiltering="true">141. <ItemStyle Wrap="false" />142. <FilterTemplate>143. <telerik:RadComboBox144. Skin="Metro"145. ID="ToAppFilterCombobox"146. Sort="Ascending"147. DataSourceID="ApplicationDS1"148. DataTextField="BU_APP_NAME"149. DataValueField="BU_APP_NAME"150. AppendDataBoundItems="true"151. OnClientSelectedIndexChanged=" ToApplicationNameChanged "152. SelectedValue='<%# Container.OwnerTableView.GetColumn("ToApp").CurrentFilterValue %>'153. runat="server"154. Width="400px">155. <Items>156. <telerik:RadComboBoxItem Text="All" />157. </Items>158. </telerik:RadComboBox>159. <telerik:RadScriptBlock ID="ToAppRadScriptBlock" runat="server">160. <script type="text/javascript">161. function ToApplicationNameChanged(sender, args) {162. var tableView = $find("<%# Container.OwnerTableView.ClientID %>");163. tableView.filter("ToApp", args.get_item().get_value(), "EqualTo");164. }165. </script>166. </telerik:RadScriptBlock>167. </FilterTemplate>168. </telerik:GridHyperLinkColumn>169. 170. <telerik:GridBoundColumn171. DataField="Comment"172. FilterControlAltText="Filter Comment column"173. HeaderText="Comments"174. SortExpression="Comment"175. UniqueName="Comments"176. CurrentFilterFunction="NoFilter">177. <ColumnValidationSettings>178. <ModelErrorMessage Text="" />179. </ColumnValidationSettings>180. </telerik:GridBoundColumn>181. 182. <telerik:GridButtonColumn183. CommandName="Delete"184. Text="Delete"185. HeaderText="Delete"186. UniqueName="DeleteCommand"187. Exportable="false"188. ButtonType="ImageButton"189. ImageUrl="Images/delete.png">190. </telerik:GridButtonColumn>191. 192. </Columns>193. <EditFormSettings EditFormType="Template">194. <FormStyle BackColor="White" />195. <FormTemplate>196. <table197. id="Table4"198. cellspacing="1"199. cellpadding="5"200. width="auto"201. border="0"202. class="module"203. style="padding: 20px;">204. 205. <tr>206. <td>From Application:</td>207. <td>208. <telerik:RadComboBox209. Skin="Metro"210. ID="FromApplicationComboBox"211. Sort="Ascending"212. DataSourceID="ApplicationDS"213. DataTextField="BU_APP_NAME"214. DataValueField="id"215. AppendDataBoundItems="true"216. SelectedValue='<%# Bind("FromApp") %>'217. runat="server"218. Width="300">219. </telerik:RadComboBox>220. <%--<telerik:RadComboBox221. ID="FromApplicationComboBox"222. runat="server"223. Width="300"224. DataTextField="BU_APP_NAME"225. DataValueField="id"226. AllowCustomText="false"227. EnableLoadOnDemand="true"228. MarkFirstMatch="true"229. OnItemsRequested="AppCombobox_ItemsRequested"230. OnClientItemChecking="clientItemChecking"231. Text='<%# Bind("FromApp") %>'>232. </telerik:RadComboBox>--%>233. </td>234. </tr>235. <tr>236. <td>To Application:</td>237. <td>238. <telerik:RadComboBox239. Skin="Metro"240. ID="ToApplicationCombobox"241. ClientIDMode="Static"242. Sort="Ascending"243. DataSourceID="ApplicationDS1"244. DataTextField="BU_APP_NAME"245. DataValueField="id"246. AppendDataBoundItems="true"247. SelectedValue='<%# Bind("ToApp") %>'248. runat="server"249. CheckBoxes="true"250. Width="300"251. AutoPostBack="False">252. <%--<DefaultItem253. Text="Please select an application"254. Value="" />--%>255. </telerik:RadComboBox>256. <%--<telerik:RadComboBox257. ID="ToApplicationCombobox"258. runat="server"259. Width="300"260. DataTextField="BU_APP_NAME"261. DataValueField="id"262. MarkFirstMatch="true"263. AllowCustomText="false"264. EnableLoadOnDemand="true"265. RenderMode="Lightweight"266. CheckBoxes="true"267. CheckedItemsTexts="FitInInput"268. OnItemsRequested="AppCombobox_ItemsRequested"269. OnClientItemChecked=" OnClientItemChecked "270. Text='<%# Bind("ToApp") %>'>271. </telerik:RadComboBox>--%>272. </td>273. </tr>274. <tr>275. <td>Comments:</td>276. <td>277. <telerik:RadTextBox278. ID="CommentsTextBox"279. Width="300"280. runat="server"281. Text='<%# Bind("Comment") %>'>282. </telerik:RadTextBox>283. </td>284. 285. </tr>286. <tr>287. <asp:CustomValidator288. ID="CustomValidator1"289. ErrorMessage="Please choose at least one app to link!"290. ClientValidationFunction="selectionFormValidationGroup"291. ValidationGroup="SelectionFormValidationGroup"292. runat="server"293. CssClass="validator" />294. <td align="right" colspan="2" style="padding-top: 15px;">295. <asp:Button296. ID="btnUpdate"297. Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'298. runat="server"299. CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'300. ValidationGroup="SelectionFormValidationGroup"></asp:Button> 301. <asp:Button302. ID="btnCancel"303. Text="Cancel"304. runat="server"305. CausesValidation="False"306. CommandName="Cancel" />307. </td>308. </tr>309. </table>310. </FormTemplate>311. </EditFormSettings>312. </MasterTableView>313. </telerik:RadGrid>314. 315. <asp:EntityDataSource316. ID="AppToAppDependenciesDS"317. runat="server"318. ConnectionString="name=ServerMapContext"319. DefaultContainerName="ServerMapContext"320. EnableFlattening="False"321. EntitySetName="AppToAppDependencies"322. Include="FromApplication, ToApplication"323. EnableUpdate="true"324. EnableInsert="true"325. EnableDelete="True"326. Where="(it.FromApplication.[IT_DECOMMISSION_DATE] is null) && it.ToApplication.[IT_DECOMMISSION_DATE] is null">327. </asp:EntityDataSource>328. 329. <asp:EntityDataSource330. ID="ApplicationDS"331. runat="server"332. ConnectionString="name=ServerMapContext"333. DefaultContainerName="ServerMapContext"334. EnableFlattening="False"335. EntitySetName="Applications_List"336. EntityTypeFilter="Applications_List"337. Select="it.[id], it.[BU_APP_NAME],it.[IT_DECOMMISSION_DATE]"338. OrderBy="it.[BU_APP_NAME]"339. Where="(it.[IT_DECOMMISSION_DATE] is null)">340. </asp:EntityDataSource>341. 342. <asp:EntityDataSource343. ID="ApplicationDS1"344. runat="server"345. ConnectionString="name=ServerMapContext"346. DefaultContainerName="ServerMapContext"347. EnableFlattening="False"348. EntitySetName="Applications_List"349. EntityTypeFilter="Applications_List"350. Select="it.[id], it.[BU_APP_NAME],it.[IT_DECOMMISSION_DATE]"351. OrderBy="it.[BU_APP_NAME]"352. Where="(it.[IT_DECOMMISSION_DATE] is null)">353. </asp:EntityDataSource>354. 355. <script type="text/javascript">356. function selectionFormValidationGroup(sender, args) {357. var combos = $telerik.$(".selection-form .RadComboBox");358. 359. args.IsValid = true;360. 361. for (var i = 0; i < combos.length; i++) {362. if (combos[i].value == "-1") {363. args.IsValid = false;364. break;365. }366. }367. }368. </script>369.</asp:Content>
Having done a lot of work with RadScheduler over the last couple of weeks, I have discovered that it has a serious bug in how it determines the end of day.
Conventionally, a day starts at 00:00:00 and runs through to 23:59:59. Adding one more second moves to the start of the next day.
If you are looking at the week view and you set SelectedDate to 26Dec2016 00:00:00 (I use this notation here to avoid confusion, it is of course, a DateTime value), VisibleRangeStart is correctly set to 26Dec2016 00:00:00. VisibleRangeEnd is set to 2Jan2017 00:00:00. This is wrong! VisibleRangeEnd should be 1Jan2017 23:59:59 ie the week starting 26Dec runs from 26Dec to 1Jan, NOT 2Jan !
Unfortunately, it appears that RadScheduler has been entirely coded on the principal that the day runs from 00:00:00 to 00:00:00.values which is fundamentally wrong. This causes all kinds of problems and errors proliferating when trying to do anything with the scheduler because you end up having to code to correct for the error. Drag/Drop is similarly affected.
I should clarify that visually, the scheduler appears fine, but it transacts in the background with wrong data!
Does Telerik have any plans to correct this error ?
I have often tootipified server-side bound grids. But now I would like to do so with a client-side bound grid. Is this possible?
When done server-side, I alter the tootip manager's targetcontrols collection in the grid's ItemDatabound event. Client-side I have access to the RowDataBound event which appears to be analogous, but I'm not sure how I would modify the tooltip manager's targetcontrols collection through client-side code.