([date)] >= '23-11-2011 16:00:00')
For SQL however one expects:
([date)] >= CONVERT(DATETIME, '2011-11-23 16:00:00', 102))
The other providers of the Radfilter also don't give a result that could be used in a where clause of an SQL statement. Do you have a solution to this?
One would expect that a custom sqlprovider (with base class RadFilterSqlQueryProvider) would be available for e.g. ms-sql and mysql.
Thanks
Piet
I have two RadListBox. Data in first box is populated from database using RadListBoxItem and I have set an attribute for each item. In the second box, I've created custom context menu. After I adding the item from first box to second box, user can select some option using the context menu. On context menu selection, I need to get the Attribute I set before and update the attribute value according to the context menu selection so I can used it for later process.Currently, I unable to even the attributes I set previously using the context menu's javascript. Please guide how to read ListItem's attribute and update the attribute to a new value.
This is how I add the item to the first box with attribute.
this._sortingList = new List<
Sorting
>();
this._sortingList = DBConnection.getSortingList();
foreach (var s in this._sortingList)
{
RadListBoxItem item = new RadListBoxItem();
item.Text = s.Description;
item.Value = s.Id.ToString();
item.Attributes["myorder"] = "0";
this.RadListBox1.Items.Add(item);
}
Thus custom context menu javascript.
function showContextMenu(sender, e) {
var menu = $find("<%= cm1.ClientID %>");
var rawEvent = e.get_domEvent().rawEvent; menu.show(rawEvent);
e.get_item().select();
$telerik.cancelRawEvent(rawEvent);
}
function onItemClicked(sender, e) {
var listBox = $find("<%= RadListBox1.ClientID %>");
var listItem = listBox.get_selectedItem();
var menuItem = e.get_item();
if (menuItem.get_text() == "Ascending"){
alert(listItem.get_attributes().getAttribute("myorder"));
}
else if (menuItem.get_text() == "Descending") {
alert(listItem.get_attributes().getAttribute("myorder"));
}
}
I have two RadListBox. Data in first box is populated from database using RadListBoxItem and I have set an attribute for each item. In the second box, I've enabled custom context menu. After I adding the item from first box to second box, user can select some option using the context menu. On context menu selection, I need to get the Attribute I set before and update the attribute value according to the context menu selection so I can used it for later process.Currently, I unable to even the attributes I set previously using the context menu's javascript. Please guide how to read ListItem's attribute and update the attribute to a new value.
This is how I add the item to the first box with attribute.
this._sortingList = new List<
Sorting
>();
this._sortingList = DBConnection.getSortingList();
foreach (var s in this._sortingList)
{
RadListBoxItem item = new RadListBoxItem();
item.Text = s.Description;
item.Value = s.Id.ToString();
item.Attributes["myorder"] = "0";
this.RadListBox1.Items.Add(item);
}
This is custom context menu javascript.
function showContextMenu(sender, e) {
var menu = $find("<%= cm1.ClientID %>");
var rawEvent = e.get_domEvent().rawEvent; menu.show(rawEvent);
e.get_item().select();
$telerik.cancelRawEvent(rawEvent);
}
function onItemClicked(sender, e) {
var listBox = $find("<%= RadListBox1.ClientID %>");
var listItem = listBox.get_selectedItem();
var menuItem = e.get_item();
if (menuItem.get_text() == "Ascending"){
alert(listItem.get_attributes().getAttribute("myorder"));
}
else if (menuItem.get_text() == "Descending") {
alert(listItem.get_attributes().getAttribute("myorder"));
}
}
Hi,
Sorry if this has been asked elsewhere, I cannot find any answers on this topic..
I am using a media player in a dockzone control which works great. The only issue I have is the player, which is set to autoplay, shows the titlebar and play controls automatically on start and only disappears when the user hovers over the control and then off it. I would like the player ONLY to show the controls when the user hovers over it (ie do not show it until they want to control the video).
Thanks!
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
CellSpacing
=
"0"
GridLines
=
"None"
AllowMultiRowEdit
=
"True"
AutoGenerateColumns
=
"False"
AllowAutomaticInserts
=
"False"
AllowAutomaticUpdates
=
"False"
OnNeedDataSource
=
"GridNeedDataSource"
OnPreRender
=
"GridPreRender"
>
<
MasterTableView
AllowSorting
=
"True"
EditMode
=
"Batch"
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"Id"
HeaderText
=
"Id"
UniqueName
=
"IdColumn"
Display
=
"False"
ReadOnly
=
"True"
>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Test Values"
UniqueName
=
"TestValuesColumn"
ItemStyle-Width
=
"400px"
>
<
EditItemTemplate
>
<
telerik:RadComboBox
runat
=
"server"
ID
=
"TestValuesComboBox"
DropDownAutoWidth
=
"Enabled"
HighlightTemplatedItems
=
"True"
CheckBoxes
=
"True"
EnableCheckAllItemsCheckBox
=
"True"
>
</
telerik:RadComboBox
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
<
BatchEditingSettings
OpenEditingEvent
=
"DblClick"
/>
</
MasterTableView
>
</
telerik:RadGrid
>
protected
void
GridPreRender(
object
sender, EventArgs e)
{
RadGrid grid = sender
as
RadGrid;
if
(grid !=
null
)
{
GridTableView masterTable = grid.MasterTableView;
var editor = masterTable.GetBatchEditorContainer(
"TestValuesColumn"
);
var comboBox = (RadComboBox)editor.FindControl(
"TestValuesComboBox"
);
comboBox.Items.Clear();
for
(
int
i = 1; i <= 10; i++)
{
RadComboBoxItem item =
new
RadComboBoxItem();
item.Text = i.ToString();
item.Value = i.ToString();
comboBox.Items.Add(item);
item.DataBind();
}
}
}
function
ClearComboBox(sender, args) {
if
(sender.get_items().get_count() == 0) {
return
;
}
else
{
sender.clearItems();
sender.requestItems(
"parameter"
,
true
);
}
}
I have the following html:
<
sq8:GridTemplateColumn
DataField
=
"FieldToFillChoiceValue"
FilterImageToolTip
=
""
HeaderText
=
""
SortExpression
=
"FieldToFillChoiceValue"
UniqueName
=
"FieldToFillValue"
FilterControlAltText
=
""
>
<
EditItemTemplate
>
<
sq8:TextBox
runat
=
"server"
ID
=
"tbFieldToFill"
ValidationGroup
=
"DecisionGroup"
/>
<
sq:BindableControl
runat
=
"server"
TargetControlID
=
"tbFieldToFill"
DataField
=
"FieldToFillTextValue"
></
sq:BindableControl
>
<
asp:CustomValidator
runat
=
"server"
ErrorMessage
=
"CustomValidator"
ID
=
"cvFieldToFill"
ValidationGroup
=
"DecisionGroup"
></
asp:CustomValidator
>
<
sq8:ComboBox
runat
=
"server"
ID
=
"cmbFieldToFill"
ValidationGroup
=
"DecisionGroup"
>
<
Localization
NoMatches
=
""
ShowMoreFormatString
=
""
AllItemsCheckedString
=
""
ItemsCheckedString
=
""
CheckAllString
=
""
MoreItemsWithoutTotalRowCount
=
""
NoMoreItemsWithoutTotalRowCount
=
""
></
Localization
>
</
sq8:ComboBox
>
<
sq:BindableControl
runat
=
"server"
TargetControlID
=
"cmbFieldToFill"
DataField
=
"FieldToFillChoiceValue"
/>
</
EditItemTemplate
>
<
ItemTemplate
>
<
asp:Literal
runat
=
"server"
ID
=
"FieldToFillChoiceValue"
Mode
=
"Encode"
/>
<
sq:BindableControl
runat
=
"server"
TargetControlID
=
"FieldToFillChoiceValue"
DataField
=
"FieldToFillChoiceValue"
/>
<
asp:HiddenField
runat
=
"server"
ID
=
"hfFieldType"
/>
<
sq:BindableControl
runat
=
"server"
TargetControlID
=
"hfFieldType"
DataField
=
"FieldToFillType"
></
sq:BindableControl
>
</
ItemTemplate
>
</
sq8:GridTemplateColumn
>
And I'm signed to OnBatchEditOpening and OnBatchEditOpened events.
My problem is that when I get to the OnBatchEditOpened handler, the value of tbFieldToFill is "TextBox" (which is the value of the hidden field) without me setting or binding any value to the control.
In the OnBatchEditOpening handler, the text box still haven't been rendered.
How and why does the value get into the textbox control?
Thanks for any help.
Hello,
I have 3 web parts each of which raise a different client side event to which the other 2 web parts react. Two of the web parts are asp .NET (Telerik) while the third is strictly client side JavaScript and REST services.
My issue is that the 2 asp .net web parts each perform a post back when they react to the event, passing some data to the server. Only one of the asp .net web parts processes their post back correctly. If the other ASP .NET web part is removed, everything works correctly.
I have considered serializing the post backs, so that one does not occur until the first has completed and rendered back to the client.
Is there a better way? Also my post backs are not showing the loading panel which does appear normally.
My client side event listener and post back code looks like this:
document.addEventListener(
'ADSBarcodeEvent'
,
function
(evt) {
var
barcode = evt.detail[0];
var
assetType = evt.detail[1];
__doPostBack(
"<%=HiddenSearchRadButton.UniqueID%>"
, barcode +
"||"
+ assetType);
},
false
);
and on the server:
protected
void
HiddenSearchRadButton_Click(
object
sender, EventArgs e)
{
ProcessingExternalEvent =
true
;
// stop infinite loop of events
string
passedArgument = Request.Params.Get(
"__EVENTARGUMENT"
);
// barcode + "||" + assetType
if
(passedArgument.Contains(
"||"
))
{
string
[] delimiter =
new
string
[] {
"||"
};
string
[] arguments = passedArgument.Split(delimiter, StringSplitOptions.None);
string
barcode = arguments[0];
string
assetType = arguments[1];
Dears,
I am new to RadGrid. I've a grid displayed without the Add New Record button.
I dont understand that. I am using NeedDataSource event to bind the data
Regards,
Endashaw