Hello,
I have a RadPanelBar with 4 items in it. They all are expanded at first and user can expand/collapse them at will with click on the title or the arrow. The contents are a bit long so a scrollbar appears on the body when there are items expanded.
This is my problem,
When a scrollbar is there, I cannot click and expand or collapse a panel right away. Clicking once is changing the scroll position, and clicking twice does the job. When all panels are collapsed (so there are no scrollbar) I can expand any of them with a single click.
What may be the problem?
Thanks,
Sedat.
I have a problem when inserting a new record into a TreeList. I am using advanced OnNeedDataSource binding and manually inserting the record into our DB during the InsertCommand. After the insert command completes I get the following error:
"Property accessor '[PK and DataKeyName]' on object '[Object]' threw the following exception:'Object does not match target type.'"
I can't find any helpful documentation on this exception, is there any help that you may be able to give on this matter?
Hello Telerik Community !
I'm trying to find a Telerik grid with paging in which I could filter, sort and select all items.
Is that possible ?
Thank you for any help.
http://demos.telerik.com/aspnet-ajax/grid/examples/overview/defaultcs.aspx
With this demo I could not select all items for example.
When I use "splitter.ajaxRequest" for a pane, it works in other browsers, but IE always uses its cache rather getting new data. If I clean IE's cache before I trigger the ajax request, then it works for IE.
As I searched online, there're two ways to fix it, one is to change the request type from GET to POST, the other is to disable cache. Both can be done easily with jQuery, but I wonder whether the "ajaxRequest" function takes arguments such as:
{ type: 'POST' } or { cache: false } ?
It's also fine if there're other ways to fix this issue. Thank you!
I've got a Master Grid, with a NestedViewTemplate that has a sub grid in it. I want this sub grid to databind when a row in the Master Grid is expanded. The sub grid's binding method needs the data key from the Master Grid row to bind. I'm having trouble connecting this key to the sub grid, its always 0. I've reviewed the documention for NestedViewTemplates and NestedViewSettings but must still be doing something wrong. The docs for the NestViewTemplates refer to the working demo but it uses a Label to stash the Master Table row key rather than the NestedViewSettings which I'm trying to use. I've have been able to bind the sub grid table using various techniques such as stashing the Master Table row key in the label or using NeedsDataSource. These other methods won't work for me as they want to bind sub grid data for all rows of the master grid when the page is loaded and this is too slow.
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
<telerik:RadScriptManager ID="BudgetAdjustmentScriptManager" runat="server" EnablePartialRendering="true"></telerik:RadScriptManager>
<telerik:RadGrid ID="BudgetAdjustmentRadGrid" runat="server" Width="100%" AllowPaging="True" AllowSorting="true" AutoGenerateColumns="False" PageSize="20" DataSourceID="BugetAdjustmentRadGrid_ObjectDataSource"
AlternatingItemStyle-BackColor="#e6e6e6" ShowFooter="True">
<MasterTableView CommandItemDisplay="Top" Width="100%" DataKeyNames="budget_adjustment_master_id" ShowGroupFooter="true" Name="Master">
<Columns>
<telerik:GridEditCommandColumn ButtonType="FontIconButton" UniqueName="Edit"></telerik:GridEditCommandColumn>
<telerik:GridBoundColumn DataField="name" HeaderText="Name" UniqueName="name" MaxLength="50" ></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="number" HeaderText="Number" UniqueName="number" readonly="true"></telerik:GridBoundColumn>
</Columns>
<NestedViewSettings DataSourceID="BudgetAdjustmentItem_ObjectDataSource">
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="budget_adjustment_master_id" MasterKeyField="budget_adjustment_master_id" />
</ParentTableRelation>
</NestedViewSettings>
<NestedViewTemplate>
<asp:Panel ID="InnerContainer" runat="server" CssClass="viewWrap" Visible="True">
<telerik:RadGrid ID="BudgetAdjustmentItemRadGrid" runat="server" DataSourceID="BudgetAdjustmentDetail_ObjectDataSource" AllowPaging="true" AllowSorting="true" AutoGenerateColumns="false" >
<MasterTableView DataKeyNames="budget_adjustment_master_id, budget_adjustment_detail_id" HierarchyLoadMode="ServerOnDemand" PageSize="10" CommandItemDisplay="Top">
<Columns>
<telerik:GridEditCommandColumn ButtonType="FontIconButton" UniqueName="Edit"></telerik:GridEditCommandColumn>
<telerik:GridBoundColumn DataField="budget_adjustment_detail_id" HeaderText="ID" SortExpression="budget_adjustment_detail_id" UniqueName="budget_adjustment_detail_id" ReadOnly="true"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="budget_adjustment_operation" HeaderText="Operation" SortExpression="budget_adjustment_operation" UniqueName="budget_adjustment_operation" ReadOnly="true"></telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
</asp:Panel>
</NestedViewTemplate>
</MasterTableView>
</telerik:RadGrid>
<asp:ObjectDataSource ID="BudgetAdjustmentDetail_ObjectDataSource" runat="server" TypeName="BudgetAdjustmentDetailDAL" SelectMethod="Get" SortParameterName="sort_expression" >
<SelectParameters>
<asp:Parameter Name="budget_adjustment_master_id" Type="Int32" />
<asp:Parameter Name="project_node_master_id" DefaultValue="25" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="BudgetAdjustmentItem_ObjectDataSource" runat="server" TypeName="BudgetAdjustmentMasterDAL" SelectMethod="Get">
<SelectParameters>
<asp:Parameter Name="budget_adjustment_master_id" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="BugetAdjustmentRadGrid_ObjectDataSource" runat="server" TypeName="BudgetAdjustmentMasterDAL" SelectMethod="Get" SortParameterName="sort_expression">
<SelectParameters>
<asp:Parameter Name="project_node_master_id" DefaultValue="33" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
</asp:Content>
With Telerik 2017 R2 version, the toolbar hided the drowdown menu when Toobar Mode property was not "default" (e.g. floating or pagetop,..). How to bring the dropdown menu to front ?(maybe a bug of this version)
OK in short, I have one grid that, based on row selection, populates another grid. I would like filtering on the first grid to "reset"/"clear" the second grid, and obviously filter the first grid. The problem I'm seeing is that only one event will fire - if I make the filter happen first, the filter works but the .fireCommand() event doesn't fire. If I make the .fireCommand() event first, the event is fired but the filter doesn't happen. Code for the filter function below.
function
NameChanged(sender) {
var
firstGrid = $find(
"<%= rgUsers.ClientID %>"
).get_masterTableView();
var
secondGrid = $find(
"<%= rgAccess.ClientID %>"
).get_masterTableView();
if
(sender.get_value() ==
""
) {
tableView.filter(
"gbcFullName"
, sender.get_value(),
"NoFilter"
);
}
else
{
tableView.filter(
"gbcFullName"
, sender.get_value(),
"Contains"
);
}
secondGrid.fireCommand(
"Clear"
,
""
);
}
<
telerik:RadGrid
ID
=
"radGridClientIdentifiers2"
runat
=
"server"
AutoGenerateColumns
=
"false"
OnUpdateCommand
=
"radGridClientIdentifiers2_UpdateCommand"
OnDeleteCommand
=
"radGridClientIdentifiers2_DeleteCommand"
OnInsertCommand
=
"radGridClientIdentifiers2_InsertCommand"
OnItemCreated
=
"radGridClientIdentifiers2_ItemCreated"
OnDataBound
=
"radGridClientIdentifiers2_DataBound"
OnNeedDataSource
=
"radGridClientIdentifiers2_NeedDataSource"
>
<
MasterTableView
DataKeyNames
=
"ID"
CommandItemDisplay
=
"Top"
>
<
Columns
>
<
telerik:GridEditCommandColumn
ButtonType
=
"PushButton"
UniqueName
=
"EditCommandColumn"
/>
<
telerik:GridBoundColumn
HeaderText
=
"Number"
DataField
=
"Identifier"
/>
<
telerik:GridDropDownColumn
HeaderText
=
"Type"
EnableEmptyListItem
=
"true"
DataField
=
"IdentifierTypeID"
ListTextField
=
"Description"
ListValueField
=
"ID"
DataSourceID
=
"objectDataSourceClientIdentifierTypes"
/>
<
telerik:GridButtonColumn
UniqueName
=
"DeleteColumn"
ButtonType
=
"ImageButton"
CommandName
=
"Delete"
/>
<
telerik:GridClientSelectColumn
UniqueName
=
"SelectColumn"
HeaderText
=
"Default"
/>
</
Columns
>
<
EditFormSettings
EditFormType
=
"Template"
>
<
FormTemplate
>
<
telerik:RadTextBox
ID
=
"radTextBox"
Label
=
"Number:"
Text='<%# Bind("Identifier") %>' runat="server">
</
telerik:RadTextBox
>
<
telerik:RadComboBox
ID
=
"radComboBox"
runat
=
"server"
Label
=
"Type:"
SelectedValue='<%# Bind("IdentifierTypeID") %>' DataSourceID="objectDataSourceClientIdentifierTypes" DataTextField="Description" DataValueField="ID" />
<
telerik:RadButton
ID
=
"radButtonInsert"
runat
=
"server"
Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' />
<
telerik:RadButton
ID
=
"radButtonCancel"
runat
=
"server"
Text
=
"Cancel"
CausesValidation
=
"false"
CommandName
=
"Cancel"
/>
</
FormTemplate
>
</
EditFormSettings
>
</
MasterTableView
>
<
ClientSettings
>
<
Selecting
AllowRowSelect
=
"true"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
So, I have a hierarchical Radgrid bound to two LinqToSQL Datasources, and I'm trying to get Updates working on the second level table. Inserts work perfectly but when attempting to update a row, I get an "Object Reference not set to an instance of an object" exception, but it doesn't cause any error to be displayed on the page. I can only see the error through Visual Studio while debugging. See ASPX code below. I have no code doing anything in the codebehind so far.
05.
<asp:UpdatePanel ID=
"upGrid"
runat=
"server"
ChildrenAsTriggers=
"true"
>
06.
<ContentTemplate>
07.
<telerik:RadGrid ID=
"masterGrid"
runat=
"server"
08.
AutoGenerateColumns=
"False"
09.
DataSourceID=
"linqDepots"
10.
OnUpdateCommand=
"masterGrid_UpdateCommand"
>
11.
<ClientSettings>
12.
<Selecting AllowRowSelect=
"true"
/>
13.
</ClientSettings>
14.
<GroupingSettings CollapseAllTooltip=
"Collapse all groups"
/>
15.
<MasterTableView DataSourceID=
"linqDepots"
DataKeyNames=
"dID,dCode"
>
16.
<Columns>
17.
<telerik:GridBoundColumn DataField=
"dID"
ForceExtractValue=
"Always"
Visible=
"false"
></telerik:GridBoundColumn>
18.
<telerik:GridBoundColumn DataField=
"dCode"
FilterControlAltText=
"Filter dCode column"
HeaderText=
"Depot Code"
ReadOnly=
"True"
SortExpression=
"Depot Code"
UniqueName=
"dCode"
>
19.
</telerik:GridBoundColumn>
20.
<telerik:GridBoundColumn DataField=
"dName"
FilterControlAltText=
"Filter dName column"
HeaderText=
"Depot Name"
ReadOnly=
"True"
SortExpression=
"Depot Friendly Name"
UniqueName=
"dName"
>
21.
</telerik:GridBoundColumn>
22.
<telerik:GridBoundColumn DataField=
"IncidentCount"
HeaderText=
"Incidents"
></telerik:GridBoundColumn>
23.
</Columns>
24.
<DetailTables>
25.
<telerik:GridTableView Name=
"Incident"
runat=
"server"
DataSourceID=
"linqIncidents"
CommandItemDisplay=
"Top"
AllowAutomaticInserts=
"true"
AllowAutomaticUpdates=
"true"
DataKeyNames=
"iID"
>
26.
<ParentTableRelation><telerik:GridRelationFields DetailKeyField=
"fk1_dID"
MasterKeyField=
"dID"
/></ParentTableRelation>
27.
<Columns>
28.
<telerik:GridEditCommandColumn Display=
"true"
EditText=
"Update"
></telerik:GridEditCommandColumn>
29.
<telerik:GridBoundColumn DataField=
"iID"
Visible=
"false"
ReadOnly=
"true"
></telerik:GridBoundColumn>
30.
<telerik:GridBoundColumn HeaderText=
"Acc Ref"
DataField=
"AccRef"
SortExpression=
"iID"
UniqueName=
"AccRef"
ReadOnly=
"true"
>
31.
<FilterTemplate>
32.
<telerik:RadComboBox ID=
"ddlFilterID"
runat=
"server"
Width=
"50px"
DataSourceID=
"LinqiID"
DataTextField=
"iID"
DataValueField=
"iID"
OnClientSelectedIndexChanged=
"SelectedRefIndexChanged"
SelectedValue=
'<%# ((GridItem)Container).OwnerTableView.GetColumn("AccRef").CurrentFilterValue %>'
AppendDataBoundItems=
"true"
>
33.
<Items><telerik:RadComboBoxItem Text=
"All"
Value=
""
/></Items>
34.
</telerik:RadComboBox>
35.
<telerik:RadScriptBlock ID=
"RadScriptBlock1"
runat=
"server"
>
36.
<script type=
"text/javascript"
> function SelectedRefIndexChanged(sender, args) { var tableView = $find(
" <%# ((GridItem)Container).OwnerTableView.ClientID %>"
); tableView.filter(
"AccRef"
, args.get_item().get_value(),
"EqualTo"
); } </script>
37.
</telerik:RadScriptBlock>
38.
</FilterTemplate>
39.
</telerik:GridBoundColumn>
40.
<telerik:GridDateTimeColumn DataField=
"iDate"
DataType=
"System.DateTime"
AllowFiltering=
"false"
ItemStyle-HorizontalAlign=
"Center"
FilterControlAltText=
"Filter iDate column"
HeaderText=
"Date"
SortExpression=
"iDate"
UniqueName=
"iDate"
DataFormatString=
"{0:d}"
></telerik:GridDateTimeColumn>
41.
<telerik:GridDropDownColumn DataField=
"fk2_dID"
DataSourceID=
"linqDrivers"
HeaderText=
"Driver"
ListTextField=
"dName"
ListValueField=
"dID"
></telerik:GridDropDownColumn>
42.
<telerik:GridDropDownColumn DataField=
"fk3_cID"
DataSourceID=
"linqVehicle"
HeaderText=
"Vehicle"
ListTextField=
"cReg"
ListValueField=
"cID"
></telerik:GridDropDownColumn>
43.
<telerik:GridCheckBoxColumn AllowFiltering=
"False"
DataField=
"iNotificationForm"
HeaderText=
"Notification Form"
SortExpression=
"iNotificationForm"
/>
44.
<telerik:GridCheckBoxColumn AllowFiltering=
"False"
DataField=
"iInterviewForm"
HeaderText=
"Interview Form"
SortExpression=
"iInterviewForm"
/>
45.
<telerik:GridCheckBoxColumn AllowFiltering=
"False"
DataField=
"iAccidentForm"
HeaderText=
"Accident Form"
SortExpression=
"iAccidentForm"
/>
46.
<telerik:GridBoundColumn AllowFiltering=
"False"
DataField=
"iEstimate"
HeaderText=
"Estimate"
SortExpression=
"iEstimate"
DataType=
"System.Decimal"
DataFormatString=
"{0:c}"
FilterControlAltText=
"Filter iEstimate column"
UniqueName=
"iEstimate"
/>
47.
<telerik:GridBoundColumn AllowFiltering=
"False"
DataField=
"iClarkesCost"
HeaderText=
"Cost"
SortExpression=
"iClarkesCost"
DataType=
"System.Decimal"
DataFormatString=
"{0:c}"
/>
48.
<telerik:GridCheckBoxColumn AllowFiltering=
"False"
DataField=
"iPaid"
HeaderText=
"Paid"
SortExpression=
"iPaid"
/>
49.
<telerik:GridBoundColumn AllowFiltering=
"False"
DataField=
"iDescription"
HeaderText=
"Description"
SortExpression=
"iDescription"
/>
50.
<telerik:GridBoundColumn DataField=
"iLocation"
HeaderText=
"Location"
SortExpression=
"iLocation"
/>
51.
<telerik:GridCheckBoxColumn DataField=
"iDriverAware"
Visible=
"false"
HeaderText=
"Driver Aware"
></telerik:GridCheckBoxColumn>
52.
<telerik:GridBoundColumn DataField=
"DriverAwareStr"
HeaderText=
"Driver Aware"
SortExpression=
"iDriverAware"
ReadOnly=
"true"
/>
53.
<telerik:GridCheckBoxColumn DataField=
"iDriverFault"
Visible=
"false"
HeaderText=
"Driver at Fault"
></telerik:GridCheckBoxColumn>
54.
<telerik:GridBoundColumn DataField=
"DriverFaultStr"
HeaderText=
"Driver at Fault"
SortExpression=
"iDriverFault"
ReadOnly=
"true"
/>
55.
<telerik:GridBoundColumn DataField=
"iAJGRef"
HeaderText=
"AJG Ref"
SortExpression=
"iAJGRef"
FilterControlAltText=
"Filter iAJGRef column"
UniqueName=
"iAJGRef"
ReadOnly=
"True"
/>
56.
</Columns>
57.
</telerik:GridTableView>
58.
</DetailTables>
59.
</MasterTableView>
60.
</telerik:RadGrid>
61.
<asp:LinqDataSource ID=
"linqDepots"
runat=
"server"
ContextTypeName=
"Forms_BI.RetorqueLinqDataContext"
Where=
"dID != 0"
62.
EntityTypeName=
""
TableName=
"Depots"
></asp:LinqDataSource>
63.
<asp:LinqDataSource ID=
"linqIncidents"
runat=
"server"
ContextTypeName=
"Forms_BI.RetorqueLinqDataContext"
64.
EntityTypeName=
""
65.
TableName=
"Incidents"
Where=
"fk1_dID == @fk1_dID"
66.
EnableInsert=
"True"
EnableUpdate=
"true"
OnUpdating=
"linqIncidents_Updating"
>
67.
<WhereParameters>
68.
<asp:Parameter Name=
"fk1_dID"
Type=
"Int32"
/>
69.
</WhereParameters>
70.
</asp:LinqDataSource>
71.
<asp:LinqDataSource ID=
"linqDrivers"
runat=
"server"
ContextTypeName=
"Forms_BI.RetorqueLinqDataContext"
EntityTypeName=
""
TableName=
"Drivers"
></asp:LinqDataSource>
72.
<asp:LinqDataSource ID=
"linqVehicle"
runat=
"server"
ContextTypeName=
"Forms_BI.RetorqueLinqDataContext"
EntityTypeName=
""
TableName=
"Cabs"
></asp:LinqDataSource>
73.
</ContentTemplate>
74.
</asp:UpdatePanel>
After upgrading from Telerik.Web.UI 2015.1.400.40 to 2017.2.621.45 the tooltip is not displayed any more.
The tooltip is on an click event from a button placed in a radgrid, the tooltip event fires and the code exceutes without any exception just as it did with the 2015 version, but the tooltip does not display on screen. The object to be displayed is a user control.