After a few hours of searching the internet on the error "Specified argument was out of the range of valid values", I discovered that the cause was the GridTemplateColumn behaving differently that a GridBoundColumn with regards to filtering. In the code snippet below, you can use the one filter just fine. If you change the telerik:GridTemplateColumn (column 2) to AllowFiltering='true' while having a <FilterTemplate> element, using the filter on column 3 will throw an error. AllowFiltering='true' doesn't cause a problem if there's no <FilterTemplate> element. Note that changing the GridBoundColumn ( column 1) between AllowFiltering= true/false doesn't cause an issue. It's only the GridTemplateColumn type.
The different behavior between the GridBoundColumn and GridTemplateColumn types seems like a bug.
<
telerik:RadGrid
runat
=
"server"
DataSourceID
=
"sql_tables"
AllowFilteringByColumn
=
"true"
AutoGenerateColumns
=
"false"
>
<
MasterTableView
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"name"
HeaderText
=
"name"
AllowFiltering
=
"true"
UniqueName
=
"name1"
>
<
FilterTemplate
>
custom filter template on GridBoundColumn is OK
</
FilterTemplate
>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
DataField
=
"name"
HeaderText
=
"name-template"
AllowFiltering
=
"false"
UniqueName
=
"name2"
>
<
ItemTemplate
>
<%#Eval("name") %>
</
ItemTemplate
>
<
FilterTemplate
>custom filter on GridTemplateColumn breaks filtering.</
FilterTemplate
>
<
HeaderStyle
BackColor
=
"Pink"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridBoundColumn
DataField
=
"type"
HeaderText
=
"type"
AllowFiltering
=
"true"
UniqueName
=
"type"
/>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
<
asp:SqlDataSource
runat
=
"server"
ID
=
"sql_tables"
ConnectionString="<%$ ConnectionStrings:MyDB%>" SelectCommand="select top 4 name, object_id, schema_id, type, type_desc from sys.tables" />
Hi,
ich have a Grid with Enabled HeaderContextMenu. Is it possible to open the Contextmenu with Keyboard for selected item and also Navigate inside the Contextmenu with Keyboard?
Kind Regards
Hi,
How can i control the width of the resource in the advanced form view. Because of the data i am loading it does not expand and the text is long.
<telerik:ResourceType DataSourceID="Patients" Name="Patient" TextField="PatientName" KeyField="PatientId"
ForeignKeyField="AppPatientId"/>
Thanks
The official support for RadUpload has been discontinued in June 2013 (Q2’13) in favor of RadAsyncUpload, Telerik’s next-generation ASP.NET upload control. If you are considering Telerik’s Upload control for new development, check out the RadAsyncUpload documentation or its product page.
If you are already using RadUpload in your projects, you may be interested in reading how easy the transition to RadAsyncUpload is and how you can benefit from it in this blog post.
Although RadUpload is still available in the suite, we deeply believe that RadAsyncUpload can better serve your upload needs and we kindly ask you to transition to it to make sure you take advantage of its support and the new features we constantly add to it.
Hi,
Using the RadGrid in Batch Editing mode and the EditType is set to row.
aspx:
<
telerik:GridTemplateColumn
UniqueName
=
"2_1"
DataType
=
"System.Int32"
DataField
=
"2_1"
AllowSorting
=
"false"
>
<
ItemTemplate
>
<
asp:Label
runat
=
"server"
ID
=
"lbl2_1"
Text='<%# Eval("2_1") %>'></
asp:Label
>
<
asp:Label
runat
=
"server"
ID
=
"lblDay2_1"
ClientIDMode
=
"Static"
></
asp:Label
>
</
ItemTemplate
>
<
EditItemTemplate
>
<
span
>
<
telerik:RadNumericTextBox
runat
=
"server"
ID
=
"tb2_1"
Text='<%# Bind("2_1") %>' Type="Number" MinValue="0" MaxValue="999">
<
NumberFormat
DecimalDigits
=
"0"
/>
</
telerik:RadNumericTextBox
>
</
span
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
I want to access the label ""lblDay2_1" client-side to change the text when the user edit the RadNumericTextBox
I think the best way is to use the event "CellValueChanged" but I am not be able to access the Label "lblDay2_1" to change the text.
How can I do that?
Thanks in advance.
Wondering if someone wrote a code to read the recurring events details field and count it?
Let's say I have 5 events entered in 1 week, but 2 of those entered as recurring - the totals for the week would show as 4 events instead of 5, because the query count number of events as number of the rows in the table, using the date range specified. Since 2 of those are recurring - there is 1 row in the SQL table for both events and it would count it as 1 event instead of 2 events taking place in that week. Hope it makes sense. Please advise on how to calculate the events properly, when recurring events exist... The events are also can be of different type and I would need to count it in separate totals. I would like a way to setup the count in a query in SQL and pass date range as parameters, not on load of the scheduler, since I need to use the count in the gridview with the scheduler on the screen, as well as show the count on the reports. Thank you!
Hi,
Is there a way to turn the chart title of a RadHtmlChart into a hyperlink when you click on it like you could with the RadChart using the ActiveRegion properties?
Many thanks,
Andy
Hello,
I have an Ajax RadAutoCompleteBox and I would like to know if it's possible to filter being accent insensitive.
I saw we can do that in WPF (http://docs.telerik.com/devtools/wpf/controls/radautocompletebox/features/filteringbehavior) but I didn't find anything for the ASP.NET AJAX control.
Thanks
Hello! How to open a drawing directly on the full screen automatically?
Do not press the "maximization" and open directly into the maximization mode
I have EnableCheckAllItemsCheckBox property set to true.
I have javascript function which highlight all matches in the combobox when user starts typing.
For example I have combobox populated with 100 items. 5 are highlighted and visible after user stsrts typing.
When user clicks on Check All check box all 100 items are checked. But I need only 5 to be checked.
I have implemented OnClientCheckAllChecked function see below. It is working ok for the small sets of items.
But in some cases I have 550+ item in the combobox and it takes some time to finish procedure.
Is there any wau to get control of the Check All check box and check all visible items without the need to first uncheck all checked items and then check visible ones.
Please advise
Igor
<telerik:RadComboBox ID="cb" runat="server" Skin="Metro" CheckBoxes="True" CheckedItemsTexts="DisplayAllInInput" DropDownAutoWidth="Enabled"
EnableCheckAllItemsCheckBox="True" OnClientCheckAllChecked="OnClientCheckAllChecked" MaxHeight="200px" OnClientDropDownClosing="OnClientDropDownClosing">
<HeaderTemplate>
<telerik:RadTextBox runat="server" ID="txt" Width="100%" />
</HeaderTemplate>
</telerik:RadComboBox>
function HighlightAllMatches(textBoxId, comboBoxId)
{
var $T = window.Telerik.Web.UI;
var originalFunction = $T.RadComboBox.prototype.highlightAllMatches;
var comboBox = window.$find(comboBoxId);
var textBox = window.$find(textBoxId);
$T.RadComboBox.prototype.highlightAllMatches = function(text)
{
this.set_filter($T.RadComboBoxFilter.StartsWith);
originalFunction.call(this, text);
this.set_filter($T.RadComboBoxFilter.None);
};
comboBox.highlightAllMatches(textBox.get_textBoxValue());
}
function OnClientCheckAllChecked(sender, args)
{
var checkedItems = sender.get_checkedItems();
var visibleItems = sender.get_visibleItems();
if (args.get_checked() && (checkedItems.length != visibleItems.length))
{
for (var i = 0; i < checkedItems.length; i++)
checkedItems[i].set_checked(false);
for (var v = 0; v < visibleItems.length; v++)
visibleItems[v].set_checked(true);
}
}