I have the following grid (as a sample)
<
telerik:RadGrid
runat
=
"server"
ID
=
"RadGrid1"
AllowSorting
=
"true"
AllowPaging
=
"true"
PageSize
=
"15"
AutoGenerateColumns
=
"false"
ShowDesignTimeSmartTagMessage
=
"false"
Width
=
"9700px"
AllowFilteringByColumn
=
"true"
GroupingSettings-CaseSensitive
=
"false"
>
<
MasterTableView
GroupLoadMode
=
"Client"
DataKeyNames
=
"Id"
NoMasterRecordsText
=
"No records."
>
<
ColumnGroups
>
<
telerik:GridColumnGroup
HeaderText
=
"[Group1]"
Name
=
"grp1"
/>
<
telerik:GridColumnGroup
HeaderText
=
"[Group2]"
Name
=
"grp2"
/>
</
ColumnGroups
>
<
Columns
>
<
telerik:GridBoundColumn
UniqueName
=
"Item1a"
DataField
=
"Item1a"
HeaderText
=
"[Item 1a]"
ColumnGroupName
=
"grp1"
AutoPostBackOnFilter
=
"true"
FilterListOptions
=
"VaryByDataType"
CurrentFilterFunction
=
"Contains"
FilterControlWidth
=
"100px"
>
<
HeaderStyle
HorizontalAlign
=
"Left"
Width
=
"120px"
Wrap
=
"false"
/>
<
ItemStyle
HorizontalAlign
=
"Left"
Width
=
"120px"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"Item1b"
DataField
=
"Item1b"
HeaderText
=
"[Item 1b]"
ColumnGroupName
=
"grp1"
AutoPostBackOnFilter
=
"true"
FilterListOptions
=
"VaryByDataType"
CurrentFilterFunction
=
"Contains"
FilterControlWidth
=
"100px"
>
<
HeaderStyle
HorizontalAlign
=
"Left"
Width
=
"120px"
Wrap
=
"false"
/>
<
ItemStyle
HorizontalAlign
=
"Left"
Width
=
"120px"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"Standalone"
DataField
=
"Standalone"
HeaderText
=
"[Stand Alone]"
AutoPostBackOnFilter
=
"true"
FilterListOptions
=
"VaryByDataType"
CurrentFilterFunction
=
"Contains"
FilterControlWidth
=
"100px"
>
<
HeaderStyle
HorizontalAlign
=
"Left"
Width
=
"120px"
Wrap
=
"false"
/>
<
ItemStyle
HorizontalAlign
=
"Left"
Width
=
"120px"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"Item2a"
DataField
=
"Item2a"
HeaderText
=
"[Item 2a]"
ColumnGroupName
=
"grp2"
AutoPostBackOnFilter
=
"true"
FilterListOptions
=
"VaryByDataType"
CurrentFilterFunction
=
"Contains"
FilterControlWidth
=
"100px"
>
<
HeaderStyle
HorizontalAlign
=
"Left"
Width
=
"120px"
Wrap
=
"false"
/>
<
ItemStyle
HorizontalAlign
=
"Left"
Width
=
"120px"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"Item2b"
DataField
=
"Item2b"
HeaderText
=
"[Item 2b]"
ColumnGroupName
=
"grp2"
AutoPostBackOnFilter
=
"true"
FilterListOptions
=
"VaryByDataType"
CurrentFilterFunction
=
"Contains"
FilterControlWidth
=
"100px"
>
<
HeaderStyle
HorizontalAlign
=
"Left"
Width
=
"120px"
Wrap
=
"false"
/>
<
ItemStyle
HorizontalAlign
=
"Left"
Width
=
"120px"
/>
</
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
I am trying to alter the text on both the ColumnGroup items and the GridHeader items.
I can change the ColumnGroup text like this (in ItemDataBound):
RadGrid1.MasterTableView.ColumnGroups.FindGroupByName(
"grp1"
).HeaderText =
"First Group"
But when I try to rename the GridHeader (as I have done numerous times before), there is no change
Private
Sub
RadGrid1_ItemDataBound(sender
As
Object
, e
As
GridItemEventArgs)
Handles
RadGrid1.ItemDataBound
If
(
TypeOf
e.Item
Is
GridHeaderItem)
Then
Dim
header
As
GridHeaderItem = e.Item
CType
(header(
"Item1a"
).Controls(0), LinkButton).Text =
"Group 1 - Item 1"
CType
(header(
"Item1b"
).Controls(0), LinkButton).Text =
"Group 1 - Item 2"
CType
(header(
"Item2a"
).Controls(0), LinkButton).Text =
"Group 2 - Item 1"
CType
(header(
"Item2b"
).Controls(0), LinkButton).Text =
"Group 2 - Item 2"
End
if
What am I doing wrong?
Hi,
in my web application I data bind a list of simple POCO objects into the grid. In the ItemDataBound event handler I add some additional columns with generated values.
E.g.:
protected
void
radGridResult_ItemDataBound(
object
sender, GridItemEventArgs e)
{
GridDataItem lGridDataItem = e.Item
as
GridDataItem;
if
( lGridDataItem !=
null
)
{
lGridDataItem[
"Address"
].Text =
"Foobar"
;
}
}
This works fine unless I try to group the "Address" column inside the web application. Then I get an exception that the "Address" property cannot be found inside the data object.
Is there a way to solve this problem or is it better to create a new POCO data object containing all neccessary properties instead.
Best regards
Martin Horst
Hello I have two nested radlistbox with itemtemplates
the problem is when I select an item of sub Radlistbox how I can access the value of Parent item
Please Help Or if anybody has a better way please tell me
this my Asp.net code
<telerik:RadListBox ID="Chk_ProjectList" CssClass="Chk_Filters" runat="server" RenderMode="Classic" AutoPostBack="true" OnItemCheck="Chk_ProjectList_ItemCheck"
Width="100%" RepeatDirection="Horizontal" Font-Size="13px"
DataValueField="ProjectId" >
<%--OnItemCheck="Chk_ProjectList_ItemCheck" AutoPostBack="true" OnClientItemChecking="Chk_ProjectList_OnClientItemChecking"--%>
<ItemTemplate>
<table style="width: 100%; border: none;">
<tr style="width: 100%;" runat="server" id="tds">
<td style="width: 18%; display: inline;">
<%--<input class="rlbCheck" type="checkbox"/>--%>
<div class="PrjClassTitle">
<%# DataBinder.Eval(Container.DataItem, "ProjectName") %> ( <%# DataBinder.Eval(Container.DataItem, "Count") %> )
</div>
</td>
</tr>
<tr style="width: 100%;">
<td id="Td1" style="width: 18%; display: inline;" runat="server">
<div runat="server" id="ActionTypeStatus" class="GPart">
<%--style="display: none"--%>
<%--<div class="divFilterTitle">وضعیت واگن </div>--%>
<telerik:RadListBox ID="Chk_ActionTypeStatusList" runat="server" RenderMode="Lightweight" AutoPostBack="true"
Width="100%" RepeatDirection="Horizontal" RepeatColumns="1" Font-Size="13px"
DataValueField="ActionTypeId"><%--OnSelectedIndexChanged="Chk_ActionTypeStatusList_SelectedIndexChanged" OnClientSelectedIndexChanging="Chk_ActionTypeStatusList_SelectedIndexChanging" --%>
<ItemTemplate>
<table style="width: 100%;">
<tr style="width: 100%;">
<td style="width: 18%; display: inline;">
<%# DataBinder.Eval(Container.DataItem, "ActionTypeName") %> ( <%# DataBinder.Eval(Container.DataItem, "Count") %> )
</td>
</tr>
</table>
</ItemTemplate>
<EmptyMessageTemplate>
NO RECORDES
</EmptyMessageTemplate>
</telerik:RadListBox>
<%--<div class="GPartLn"></div>--%>
</div>
</td>
</tr>
</table>
</ItemTemplate>
<EmptyMessageTemplate>
NO RECORDES
</EmptyMessageTemplate>
</telerik:RadListBox>
For some reason, on both iOS Safari and Android Chrome, when I or a user scrolls vertically in a listbox, it is "selecting" the item under their finger when they lift it off the screen and have finished scrolling.
I would normally expect a user to be able to scroll vertically in the list and then "tap" an item to select it.
I've seen older threads claiming this was fixed in ~2013 builds, but I'm on a 2016 build and I'm still experiencing the issue.
Also on a side note, scrolling down in listboxes on Android Chrome also seems to occasionally trigger chrome's "pull-to-refresh" functionality, which I'm trying to avoid.
The following code works and updates the literal control perfectly. When I add the ajax manager, it doesn't update the control at all . Its still Showing Chart...
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"ddlFromDay"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"litTargetSales"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
></
telerik:AjaxUpdatedControl
>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
>
</
telerik:RadAjaxLoadingPanel
>
<
telerik:RadFormDecorator
RenderMode
=
"Lightweight"
ID
=
"FormDecorator1"
runat
=
"server"
DecoratedControls
=
"Buttons"
></
telerik:RadFormDecorator
>
<
fieldset
>
<
telerik:RadPageLayout
ID
=
"rplTargetAcheived"
runat
=
"server"
GridType
=
"Fluid"
>
<
Rows
>
<
telerik:LayoutRow
>
<
Columns
>
<
telerik:LayoutColumn
Span
=
"6"
CssClass
=
"tdmakeright"
>
<
telerik:RadLabel
ID
=
"lblFromDay"
runat
=
"server"
Text
=
"From Day"
Skin
=
"MetroTouch"
RenderMode
=
"Lightweight"
></
telerik:RadLabel
>
<
telerik:RadComboBox
ID
=
"ddlFromDay"
runat
=
"server"
Filter
=
"StartsWith"
Skin
=
"MetroTouch"
RenderMode
=
"Lightweight"
Width
=
"59px"
AutoPostBack
=
"true"
OnSelectedIndexChanged
=
"ddlFromDay_SelectedIndexChanged"
></
telerik:RadComboBox
>
<
telerik:RadLabel
ID
=
"lblToDay"
runat
=
"server"
Text
=
"To Day"
Skin
=
"MetroTouch"
RenderMode
=
"Lightweight"
></
telerik:RadLabel
>
<
telerik:RadComboBox
ID
=
"ddlToDay"
runat
=
"server"
Filter
=
"StartsWith"
Skin
=
"MetroTouch"
RenderMode
=
"Lightweight"
Width
=
"59px"
AutoPostBack
=
"true"
OnSelectedIndexChanged
=
"ddlToDay_SelectedIndexChanged"
></
telerik:RadComboBox
>
</
telerik:LayoutColumn
>
<
telerik:LayoutColumn
Span
=
"6"
CssClass
=
"tdmakeleft"
>
<
telerik:RadLabel
ID
=
"lblof"
runat
=
"server"
Text
=
"of"
Skin
=
"MetroTouch"
RenderMode
=
"Lightweight"
></
telerik:RadLabel
>
<
telerik:RadComboBox
ID
=
"ddlMonth"
runat
=
"server"
Filter
=
"StartsWith"
Skin
=
"MetroTouch"
RenderMode
=
"Lightweight"
Width
=
"100px"
AutoPostBack
=
"true"
OnSelectedIndexChanged
=
"ddlMonth_SelectedIndexChanged"
></
telerik:RadComboBox
>
<
telerik:RadComboBox
ID
=
"ddlYear"
runat
=
"server"
Filter
=
"StartsWith"
Skin
=
"MetroTouch"
RenderMode
=
"Lightweight"
Width
=
"100px"
AutoPostBack
=
"true"
OnSelectedIndexChanged
=
"ddlYear_SelectedIndexChanged"
></
telerik:RadComboBox
>
</
telerik:LayoutColumn
>
</
Columns
>
</
telerik:LayoutRow
>
</
Rows
>
<
Rows
>
<
telerik:LayoutRow
>
<
Columns
>
<
telerik:LayoutColumn
Span
=
"12"
CssClass
=
"tdmakeright"
>
<
asp:Literal
ID
=
"litTargetSales"
runat
=
"server"
></
asp:Literal
>
</
telerik:LayoutColumn
>
</
Columns
>
</
telerik:LayoutRow
>
</
Rows
>
</
telerik:RadPageLayout
>
</
fieldset
>
Hi, I have a site running on an unsupported version of windows. I is using older RadControls (i.e. RadAjax.Net2.dll version 1.7.1.0) and functions well, but I need to move it to a supported version of windows server. Of course any older VS project or installation media or documentation is missing. I've moved the root directory to the new server and configured IIS as best I can. I've created a new web project in VS2015The RadControls are not functioning.
Can anyone point me to documentation/resources to troubleshoot the issue.
Thanks
I have a RadAsyncUpload button on my form. When it displays the right border of the Select button is cut off. What am I doing wrong? You can see the table borders so I know I have plenty of room.
<td>
<telerik:RadAsyncUpload RenderMode="Lightweight" ID="productImportFile" runat="server" Skin="WebBlue" MaxFileInputsCount="1" Width="221px">
<FileFilters>
<telerik:FileFilter Description="Text(txt)" Extensions="txt" />
</FileFilters>
</telerik:RadAsyncUpload>
</td>
Hello,
I was wondering if it was possible to group on the same field twice. For instance:
<
DataGroups
>
<
telerik:ListViewDataGroup
GroupField
=
"GroupNumber"
DataGroupPlaceholderID
=
"GroupPlaceHolder1"
SortOrder
=
"Ascending"
>
<
DataGroupTemplate
>
<
div
class
=
"row-group-heading"
><%#(Container as RadListViewDataGroupItem).DataGroupKey %>
<
asp:PlaceHolder
runat
=
"server"
ID
=
"GroupPlaceHolder2"
></
asp:PlaceHolder
>
</
DataGroupTemplate
>
</
telerik:ListViewDataGroup
>
<
telerik:ListViewDataGroup
GroupField
=
"GroupNumber"
DataGroupPlaceholderID
=
"GroupPlaceHolder2"
SortOrder
=
"Ascending"
>
<
DataGroupTemplate
>
<
div
class
=
"row-group-heading"
><%#(Container as RadListViewDataGroupItem).DataGroupKey %></
div
>
<
asp:PlaceHolder
runat
=
"server"
ID
=
"ItemPlaceHolder"
></
asp:PlaceHolder
>
</
DataGroupTemplate
>
</
telerik:ListViewDataGroup
>
</
DataGroups
>
If not is there a work around?
I have a class derived from GridTextColumnEditor. It overrides the function AddControlsToContainer. I want the added controls (textboxes) to do a postback. When I have a textbox on my page and set AutoPostBack to true, the resulting html looks like this:
<
input
name
=
"ctl00$_mCPH$AssetClassSettings1$p1c4r6"
id
=
"ctl00__mCPH_AssetClassSettings1_p1c4r6"
style
=
"width: 30px; text-align: right;"
onkeypress
=
"if (WebForm_TextBoxKeyHandler(event) == false) return false;"
onfocus
=
"FormatNumberAsDecimal(this)"
onblur
=
"FormatDecimalAsNumber(this)"
onchange
=
"javascript:setTimeout('__doPostBack(\'ctl00$_mCPH$AssetClassSettings1$p1c4r6\',\'\')', 0)"
type
=
"text"
value
=
"0"
precision
=
"0"
originalamount
=
"0"
nomatch
=
"0"
group
=
"1"
maxamount
=
"100"
minamount
=
"0"
negativecolor
=
"Red"
>
But when added via the GridTextColumn Editor, the html is:
<
input
name
=
"ctl00$_mCPH$BG1$BudgetGrid$ctl01$ctl08$ctl01"
style
=
"width:60px;text-align:Right;"
onkeypress
=
"if (WebForm_TextBoxKeyHandler(event) == false) return false;"
onfocus
=
"FormatNumberAsDecimal(this)"
onblur
=
"FormatDecimalAsNumber(this)"
onchange
=
"javascript:setTimeout('RadGridNamespace.AsyncRequest(\'ctl00$_mCPH$BG1$BudgetGrid$ctl01$ctl08$ctl01\',\'\', 'ctl00__mCPH_BG1_BudgetGrid', event)', 0)"
type
=
"text"
value
=
"0"
precision
=
"2"
originalamount
=
"0"
nomatch
=
"0"
group
=
"1"
maxamount
=
"99999"
minamount
=
"-100000000"
negativecolor
=
"Red"
>
This "RadGridNamespace.AsyncRequest" is not a post back and I don't know what it is or why it would be added rather than the doPostBack. How do I make this work?