Hi,
RadDropDownList does not show the list of items when EnableVirtualScrolling="true". For my data source I'm using ObjectDataSource. Radgrid is also bound to this data source. I am working with UI for ASP.NET AJAX, v. 2014.3.1209.40
Any work around?
<
telerik:RadDropDownList
id
=
"ddlBlockDeleteHigh"
runat
=
"server"
DataValueField
=
"CODE"
DataTextField
=
"CODE"
DataSourceID
=
"ObjectDataSource1"
EnableVirtualScrolling
=
"true"
DropDownHeight
=
"200px"
Width
=
"100px"
></
telerik:RadDropDownList
>
and here's the code for Object Data Source:
<
asp:ObjectDataSource
id
=
"ObjectDataSource1"
runat
=
"server"
UpdateMethod
=
"Update"
TypeName
=
"VUE.CouponOracleDataObject"
SelectMethod
=
"Select"
OldValuesParameterFormatString
=
"original_{0}"
InsertMethod
=
"Insert"
DeleteMethod
=
"Delete"
></
asp:ObjectDataSource
>
Hi collegues,
I would like to bind my inherited TreeView to a custom object list.
It should automatically make the nodes based on parent-child relationships.
But at the databind (line 10.) I get a runtime error "Object of type TreeViewItem does not have a ParentId property.".
Which is a lie, as you can see :)
When i comment line 7. It also happens with the other properties(DataTextField and DataNavigateUrlField), but this is the first to run into.
Do you have any idea what is going wrong here?
Kind regards,
Bob Gladon
01.
public
class
NavigateTreeView : RadTreeView
02.
{
03.
protected
void
NavigateTreeView_Load(
object
sender, EventArgs e)
04.
{
05.
this
.DataTextField =
"Name"
;
06.
this
.DataFieldID =
"ItemId"
;
07.
this
.DataFieldParentID =
"ParentId"
;
08.
this
.DataNavigateUrlField =
"UrlPath"
;
09.
this
.DataSource = GetTreeViewItems();
10.
DataBind();
11.
}
12.
13.
private
List<TreeViewItems> GetTreeViewItems()
14.
{
15.
//Some implementation
16.
}
17.
}
18.
19.
public
class
TreeViewItem
20.
{
21.
public
TreeViewItemType Type;
22.
public
int
ParentId;
23.
public
int
? ItemId;
24.
public
string
Name;
25.
public
string
UrlPath;
26.
}
Hello,
Using a radGrid, when I go into Add Mode programmatically, using "IsItemInserted = true" in PreRender, then call RadConfirm in the InsertCommand code, the confirm question pops up, but the page freezes. I cannot answer "ok" or "cancel." The JavaScript is never invoked. There is no way forward or backward, the page remains frozen on the popup question.
CODE IN PRERENDER:
protected void rgContract_PreRender(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
string addFlag = Request.QueryString["addmode"];
if (addFlag == "true")
{
rgContract.MasterTableView.IsItemInserted = true;
rgContract.Rebind();
}
else
{
Session["lastClientAdded"] = null;
}
}
}
CODE FROM INSERCOMMAND:
protected void rgContract_InsertCommand(object source, GridCommandEventArgs e)
{
windowManagerContract.RadConfirm("Would you like to set up a new Account for this Contract?", "confirmCallBackFn", 350, 200, null, "Please confirm");
}
Hi,
I am using the telerik controls version: 2012.1.411.40 Runtime Version: v4.0.30319. I am laying out a very simple RadTextBox where TextMode="Multiline" as shown in the codes sample below. For some reason, only in IE 11, IE 10, and IE 9 (works in IE 8, Chrome and Firefox) the Wrap="True" is completely ignored. Instead IE is attaching a horizontal scroll bar every time. Any ideas how to correct this? I've attached some images of the rendering in IE 11. I've also attached the CSS code block in case the CSS is causing an issue, but I can't see how, it's very minimal.
CSS in case it helps
.DetailsLabel {
width:117px;
display: inline-block;
}
.right-column-controls{
width: 418px;
display:inline-block;
vertical-align:top;
}
.right-column-item {
padding-top: 20px;
width:400px;
}
<
div
class
=
"right-column-item"
>
<
asp:Label
ID
=
"lblBoundaryDescriptionLabel"
runat
=
"server"
CssClass
=
"DetailsLabel"
>Boundary Description:</
asp:Label
>
<
telerik:RadTextBox
ID
=
"rtxtBoundaryDescription"
TextMode
=
"MultiLine"
MaxLength
=
"1000"
Wrap
=
"True"
Columns
=
"18"
Rows
=
"5"
runat
=
"server"
Enabled
=
"false"
/>
</
div
>
As I understand from reading various posts, when the Grid is in Batch mode, and you add a new row (via "Add new record" button or with the javascript addNewRecord function via batch manager) it only creates a new tr element, but doesn't populate it with the components that make up the columns you've defined. Instead, it appears you have to manually create those elements in code. This doesn't make sense to me, but seems it should be part of the built-in functionality when the tr element is added. The current result is the new row is basically worthless.
Still, if that's how you insist it must be done, please help me with my grid below. After a new row is added (via the javascript below which is called from a button separate from the grid) it appears I need to use OnRowCreated to populate all the columns with the necessary elements. Is that correct? If so, can you take my grid below and give me the javascript for how this is done? I can't find any concrete examples on the forum or in your help docs.
var
grd = GetControlRAD(
"grdPODetails"
);
var
masterTable = grd.get_masterTableView();
var
batchManager = grd.get_batchEditingManager();
batchManager.addNewRecord(masterTable);
<
telerik:RadGrid
ID
=
"grdPODetails"
runat
=
"server"
AllowSorting
=
"True"
AutoGenerateColumns
=
"False"
Skin
=
"Office2010Blue"
GridLines
=
"None"
>
<
HeaderContextMenu
EnableAutoScroll
=
"True"
>
</
HeaderContextMenu
>
<
MasterTableView
CommandItemDisplay
=
"Top"
EditMode
=
"Batch"
InsertItemDisplay
=
"Bottom"
ClientDataKeyNames
=
"PurchaseOrderDetailKey"
DataKeyNames
=
"PurchaseOrderDetailKey"
>
<
BatchEditingSettings
EditType
=
"Cell"
OpenEditingEvent
=
"Click"
/>
<
CommandItemSettings
ShowRefreshButton
=
"False"
ShowSaveChangesButton
=
"true"
ShowCancelChangesButton
=
"true"
/>
<
NoRecordsTemplate
>
No detail lines to display.
</
NoRecordsTemplate
>
<
Columns
>
<
telerik:GridTemplateColumn
DataField
=
"PrintOnPurchaseOrder"
HeaderText
=
"Print"
UniqueName
=
"PrintOnPurchaseOrder"
DataType
=
"System.Boolean"
>
<
HeaderStyle
Width
=
"40px"
/>
<
ItemStyle
Width
=
"40px"
/>
<
ItemTemplate
>
<
input
id
=
"chkPrintRead"
type
=
"checkbox"
checked='<%# Eval("PrintOnPurchaseOrder") %>' onclick="changeCheckbox(this);" />
</
ItemTemplate
>
<
EditItemTemplate
>
<
asp:CheckBox
ID
=
"chkPrint"
runat
=
"server"
Checked='<%# Bind("PrintOnPurchaseOrder") %>' />
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
DataField
=
"ChartOfAccountNumber"
UniqueName
=
"ChartOfAccountNumber"
HeaderText
=
"Account Number"
DataType
=
"System.String"
>
<
ItemTemplate
>
<
asp:Label
ID
=
"lblChartOfAccountNumber"
runat
=
"server"
Text='<%# Eval("ChartOfAccountNumber") %>'>
</
asp:Label
>
</
ItemTemplate
>
<
EditItemTemplate
>
<
span
style
=
"width:100%; display:inline-block; white-space:nowrap"
>
<
telerik:RadTextBox
ID
=
"txtChartOfAccountNumber"
runat
=
"server"
MaxLength
=
"36"
Width
=
"90%"
Text='<%# Bind("ChartOfAccountNumber") %>'>
<
ClientEvents
OnValueChanged
=
"Grid_COANumChanged"
/>
</
telerik:RadTextBox
>
<
asp:ImageButton
ID
=
"imgChartOfAccountNumber"
OnClientClick
=
"Grid_COANumSearch(this); return false;"
runat
=
"server"
ImageUrl
=
"images/icons/search-16.png"
TabIndex
=
"-1"
ToolTip
=
"Search"
style
=
"vertical-align:middle"
/>
</
span
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
DataField
=
"PurchaseOrderDetailQuantity"
HeaderText
=
"Quantity"
UniqueName
=
"PurchaseOrderDetailQuantity"
DataType
=
"System.Double"
>
<
ItemTemplate
>
<
asp:Label
ID
=
"lblPurchaseOrderDetailQuantity"
runat
=
"server"
Text='<%# Eval("PurchaseOrderDetailQuantity") %>'>
</
asp:Label
>
</
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadNumericTextBox
ID
=
"txtPurchaseOrderDetailQuantity"
runat
=
"server"
DataType
=
"System.Decimal"
MaxLength
=
"23"
Width
=
"100%"
IncrementSettings-InterceptArrowKeys
=
"false"
Culture
=
"English (United States)"
DbValue='<%# Bind("PurchaseOrderDetailQuantity") %>' Type="Number" NumberFormat-DecimalDigits="4" />
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
DataField
=
"UnitPrice"
HeaderText
=
"UnitPrice"
UniqueName
=
"UnitPrice"
DataType
=
"System.Double"
>
<
ItemTemplate
>
<
asp:Label
ID
=
"lblUnitPrice"
runat
=
"server"
Text='<%# Eval("UnitPrice") %>'>
</
asp:Label
>
</
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadNumericTextBox
ID
=
"txtUnitPrice"
runat
=
"server"
DataType
=
"System.Decimal"
MaxLength
=
"23"
Width
=
"100%"
IncrementSettings-InterceptArrowKeys
=
"false"
Culture
=
"English (United States)"
DbValue='<%# Bind("UnitPrice") %>' Type="Number" NumberFormat-DecimalDigits="4" />
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
DataField
=
"UnitDescription"
UniqueName
=
"UnitDescription"
HeaderText
=
"Unit Desc"
DataType
=
"System.String"
>
<
ItemTemplate
>
<
asp:Label
ID
=
"lblUnitDescription"
runat
=
"server"
Text='<%# Eval("UnitDescription") %>'>
</
asp:Label
>
</
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadTextBox
ID
=
"txtUnitDescription"
runat
=
"server"
MaxLength
=
"10"
Width
=
"100%"
Text='<%# Bind("UnitDescription") %>' >
</
telerik:RadTextBox
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
DataField
=
"PurchaseOrderDetailAmount"
HeaderText
=
"Amount"
UniqueName
=
"PurchaseOrderDetailAmount"
DataType
=
"System.Double"
>
<
ItemTemplate
>
<
asp:Label
ID
=
"lblPurchaseOrderDetailAmount"
runat
=
"server"
Text='<%# Eval("PurchaseOrderDetailAmount") %>'>
</
asp:Label
>
</
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadNumericTextBox
ID
=
"txtPurchaseOrderDetailAmount"
runat
=
"server"
DataType
=
"System.Decimal"
MaxLength
=
"21"
Width
=
"100%"
IncrementSettings-InterceptArrowKeys
=
"false"
Culture
=
"English (United States)"
DbValue='<%# Bind("PurchaseOrderDetailAmount") %>' Type="Number" NumberFormat-DecimalDigits="2" />
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridNumericColumn
DataField
=
"PurchaseOrderDetailKey"
HeaderText
=
"PurchaseOrderDetailKey"
UniqueName
=
"PurchaseOrderDetailKey"
DataType
=
"System.Int32"
Visible
=
"False"
ReadOnly
=
"True"
>
</
telerik:GridNumericColumn
>
<
telerik:GridClientDeleteColumn
ConfirmText
=
"Are you sure you want to delete the selected item?"
ButtonType
=
"LinkButton"
Text
=
"Delete"
UniqueName
=
"DeleteColumn"
>
<
HeaderStyle
Width
=
"50px"
HorizontalAlign
=
"Right"
/>
<
ItemStyle
Width
=
"50px"
HorizontalAlign
=
"Right"
/>
</
telerik:GridClientDeleteColumn
>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
AllowKeyboardNavigation
=
"true"
>
<
Selecting
AllowRowSelect
=
"True"
/>
<
ClientEvents
OnRowSelected
=
"RowSelected"
OnBatchEditCellValueChanged
=
"BatchEditCellValueChanged"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
Hi - I've been able to setup RadGrids which use either the row dragging functionality to reorder rows OR the batch edit command to allow for batch editing / inserting of data. However, I'm trying to combine the two in one grid now and I'm having an issue if I try to move a record which I've created.
<
telerik:RadGrid
ID
=
"rg"
runat
=
"server"
OnNeedDataSource
=
"rg_NeedDataSource"
OnRowDrop
=
"rg_RowDrop"
OnBatchEditCommand
=
"rg_BatchEditCommand"
Width
=
"550px"
>
<
ClientSettings
AllowRowsDragDrop
=
"true"
>
<
Selecting
AllowRowSelect
=
"true"
/>
</
ClientSettings
>
<
MasterTableView
AutoGenerateColumns
=
"False"
DataKeyNames
=
"ID"
EditMode
=
"Batch"
CommandItemDisplay
=
"Top"
>
<
BatchEditingSettings
EditType
=
"Row"
/>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"Name"
HeaderText
=
"Name"
HeaderStyle-Width
=
"100px"
/>
<
telerik:GridBoundColumn
DataField
=
"Value"
HeaderText
=
"Value"
HeaderStyle-Width
=
"50px"
/>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
protected
void
rg_NeedDataSource(
object
sender, EventArgs e)
{
DataTable dt =
new
DataTable();
dt.Columns.Add(
"ID"
);
dt.Columns.Add(
"Name"
);
dt.Columns.Add(
"Value"
);
dt.Rows.Add(1,
"Name 1"
,
"Value 1"
);
dt.Rows.Add(2,
"Name 2"
,
"Value 2"
);
rg.DataSource = dt;
}
protected
void
rg_RowDrop(
object
sender, GridDragDropEventArgs e)
{
// Update datasource
}
protected
void
rg_BatchEditCommand(
object
sender, GridBatchEditingEventArgs e)
{
// Update datasource
}
The error occurs if the user creates a new row and then attempts to drag that row - I've attached a screenshot that shows the error as well as the steps necessary to produce it. The user can still drag existing rows without any issues, although this causes the new row to disappear and it does not appear to be accessible in the server-side RowDrop event (which is understandable, although still undesirable). My ideal solution would be a way to allow the user to add and edit rows, as well as being able to drag the rows to reorder them, all on the client-side without any server-side postbacks, before hitting a save button (either internal to the RadGrid or outside of it) which causes a single postback and allows all of the information necessary for each row (the data values as well as its row index) to be available on the server-side. If that is not possible, I could live with a single postback after each row is added or moved, but I'm not sure how to make the RadGrid cause a postback after an item is added.
Thanks.
We have a custom dialog added to the radeditor that allows a user to select an image and open a pop-up window. Everything has worked as expected until recently. The functionality still works correctly in Firefox, but not in Chrome, Safari, or Opera; I believe those 3 use web-kit
When choosing 'inspect element' in Chrome, the body tag is highlighted for the image in the 'Elements' tab of the developer tools window, whereas, when doing the same thing in Firefox, the image tag is highlighted for the image in the 'Inspector' tab of the developer tools window.
There is an older post that references this same issue: http://www.telerik.com/forums/getselectedelement-issue-on-ff-e-chrome
The version of Telerik we are using is: 2015.3.930.45
However, we've been on that version for a while now. The issue we're experiencing seems to be relatively new as our users would have already alerted us since the related functionality is used quite frequently.
The version of Chrome that I used to test the issue is: Version 46.0.2490.86 m (64-bit). I suspect our users are at the same version since Chrome auto-updates itself.
Please let me know what additional information I can provide.
Thanks!