Hi,
I have been struggling with this a fair bit.
I have a Telerik Raddatepicker control in a custom usercontrol. When a user Enters a date of 31/02/2000 (Invalid, as there never is 31 days in February), I need to display an error or, show the yellow triangle or something, instead of the control changing the date to 28/02/2000. The control must NOT automatically change the date.
I cannot use one of the latest versions of Telerik.Web.UI.Dll that has the EnableSmartParsing property.
I am bound to use version: 2013.2.717.40.
Please assist me with a script to accomplish this.
What I currently have is :
<script type="text/javascript">
Telerik.Web.UI.RadDateInput.prototype.parseDate = function (value, baseDate) {
{
if (new Date(value) != "NaN")
return new Date(value);
this.set_textBoxValue(value);
}
</script>
I am creating a RadGrid and within EditForm of RadGrid, I have taken an ASP.Net ListBox along with a TextBox and both of these controls are unbound controls. I created keyup event for the TextBox and after user enters a minimum of 3 characters in textbox, I am making a call to DB to search for items starting with the text given in textbox and want to add those items to the listbox.
My JavaScript code in keyup event function of textbox is as follows.
01.
function
KeyUpFunction(sender, args)
02. {
03.
var
value = document.getElementById(sender).value;
04.
if
(value.toString().length >= 3)
05. {
06. $.ajax({
07. type:
"GET"
,
08. url:
"/Test/Test.asmx/GetTests"
,
09. data: { searchTerm:
"'%"
+ value +
"%'"
},
10. contentType:
"application/json; charset=UTF-8"
,
11. dataType:
"json"
,
12. async:
"true"
,
13. success:
function
(result) {
14.
if
(result.d.length > 0) {
15.
var
grid = $find(
'<%= grdTest.ClientID %>'
);
16.
var
editItems = grid.get_editItems();
17.
var
editItem = editItems[0];
18.
var
listBox = $(editItem.get_editFormItem()).find(
"select[id*='lstImageSets']"
).get(0);
19. $(listBox).empty();
20.
for
(
var
item
in
result.d) {
21.
var
opt = document.createElement(
'OPTION'
);
22. opt.value = result.d[item].Id;
23. opt.innerHTML = result.d[item].Name;
24. listBox.add(option);
25. }
26. }
27.
else
{
28. alert(
"No records found"
);
29. }
30. },
31. error:
function
(jqXHR, textStatus, errorThrown) {
32. alert(textStatus +
' '
+ errorThrown);
33. }
34. });
35.
36. }
37. }
This code is working fine and adding items to listbox. But items added to the listbox are not visible. when I inspected the listbox in developer tools, it is rendered as a <div> and next to the div a <select> element, where <div> is specified as _rfdecoratedid for the <select> and all items that are added by the above code are there in <select> but not visible. I am suspecting this is because of <div>.
Please find attached screen shots that shows the developer tools elements screen before and after the above function is executed.
Please help me in solving this issue.
hello,
i'm want to filter all the results that i get, but the problem is the filter is work only in the page i'm in.
for page number 1 i get the result filter only for him not for all the 30 pages.
i use AutoGenerateColumns=" true", i think this is the problem.
How to find button in radlistview
1. client code
2. code behide
please help me
Thank you.
Hi!
How to choose radcombobox1 and then clear radcombobox 2 For radcombobox in radgrid
function OnClientSelectedIndexChanged(sender, eventArgs) {
var SenderId = sender.get_id();
var RadTextBox1 = $("#" + SenderId).get(0);
var RadTextBox2 = $("#" + SenderId.replace("combo_Examtion", "combo_ExamtionCount")).get(0);
//// for telerik /radcontrols
var RadTextBox2 = $telerik.findTextBox(SenderId.replace("combo_Examtion", "combo_ExamtionCount"));
}
<
telerik:GridTemplateColumn
HeaderText
=
"ข้à¸à¸ªà¸à¸š"
HeaderStyle-Width
=
"200px"
UniqueName
=
"NameExaminationID"
DataField
=
"NameExaminationID"
>
<
ItemTemplate
>
<
asp:Label
runat
=
"server"
ID
=
"lblNameExaminationID"
Text='<%# Eval("NameExamination")%>'></
asp:Label
>
</
ItemTemplate
>
<
EditItemTemplate
>
<
div
style
=
"width: 190px; float: left;"
>
<
telerik:RadComboBox
ID
=
"Radcombobox1"
runat
=
"server"
AllowCustomText
=
"True"
Filter
=
"Contains"
OnClientSelectedIndexChanged
=
"OnClientSelectedIndexChanged"
OnItemsRequested
=
"combo_Examtion_ItemsRequested"
Skin
=
"Vista"
DropDownWidth
=
"250px"
Width
=
"155px"
Height
=
"150px"
EnableVirtualScrolling
=
"true"
HighlightTemplatedItems
=
"true"
EnableLoadOnDemand
=
"True"
OnClientDropDownOpened
=
"MyClientBlur"
>
<
ItemTemplate
>
<
table
style
=
"width: 200px;"
>
<
tr
>
<
td
style
=
"width: 150px;"
>
<%# DataBinder.Eval(Container.DataItem, "NameExamination")%>
</
td
>
</
tr
>
</
table
>
</
ItemTemplate
>
</
telerik:RadComboBox
>
</
div
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"ชุดที่"
HeaderStyle-Width
=
"80px"
UniqueName
=
"Examination_No"
DataField
=
"Examination_No"
>
<
ItemTemplate
>
<
asp:Label
runat
=
"server"
ID
=
"lblExamination_No"
Text='<%# Eval("Examination_No")%>'></
asp:Label
>
</
ItemTemplate
>
<
EditItemTemplate
>
<
div
style
=
"width: 190px; float: left;"
>
<
telerik:RadComboBox
ID
=
"Radcombobox2"
runat
=
"server"
AllowCustomText
=
"True"
Filter
=
"Contains"
OnItemsRequested
=
"combo_ExamtionCount_ItemsRequested"
Skin
=
"Vista"
DropDownWidth
=
"100px"
Width
=
"70px"
Height
=
"150px"
EnableVirtualScrolling
=
"true"
HighlightTemplatedItems
=
"true"
EnableLoadOnDemand
=
"True"
OnClientDropDownOpened
=
"MyClientBlur"
>
<
ItemTemplate
>
<
table
style
=
"width: 50px;"
>
<
tr
>
<
td
style
=
"width: 50px;"
>
<%# DataBinder.Eval(Container.DataItem, "Examination_No")%>
</
td
>
</
tr
>
</
table
>
</
ItemTemplate
>
</
telerik:RadComboBox
>
</
div
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
using TreeList grid in Kendo UI v2017.3.1026 with AngularJS v1.6.1.
when i define my bindings in a template like this:
`<input ng-if="vm.foo(dataItem) ng-change="vm.priceChanged(dataItem)" ng-model="dataItem.currentPrice.value" />`
it sort of works. the events do fire but I noticed that the underlying object is no longer synchronized with the rest of the page.
dataItem appears to be a copy of the original object with additional properties, and the original [item in the collection the grid is bound to] does not get updated.
this is of course a problem since the page has more than the grid and any changes in the grid need to be propagated to the original objects in the controller.
I could manually find / synchronize the dataItem passed to the ng-change event with the original object in angular controller collection, but hoping there is a better way
second issue is that modifying the kendo version of dataItem OR the original, does not immediately show up in the grid. seems like it needs to be manually refreshed? I am using k-rebind technique:
<div id="grid" kendo-tree-list k-options="vm.treeListOptions" k-rebind="vm.dataVersion"></div>
and in my event I call this.dataVersion++ after updating underlying collection, but this does not refresh the grid.
I have minute data beginning from 2017-11-5 to 2017-11-6 which is crossing daylight saving day, the datetime of data is stored in utc time which is from 2017-11-5 4:00 to 2017-11-6 5:00 (25 hours data)
when i apply the data on chart there is 25 hours in Xaxis which is understandable.
this is what i want to achieve
if we have to show 25 hours data on chart(there is duplicate time from 1am to 2am),
we don't want there is gap there
PlotArea.XAxis.DataLabelsField use local time which convert from utc
or
I have move send 1am to 2am to different column, so i can show 24 hours data with 1 hour overlap, but don't want to gap as well.
i am not sure if i explain clearly or not.
attachment is the simple app and screen shot of the web
Hi
I have a RadGrid and binding the data on the pageload on the client side on the jquery load.
I have two buttons one search and one Reset
If i click the buttons they are binding the data to the RadGrid on the clientside buttonclick events.But on the second time of click on the Buttons the grid is not rebinding.Please find the attached sourcecode