Hello, i have really simple RadTreeView control.
but there is an issue, nodes only display if they have "0" ParentID. I put the code like telerik's examples and also table content is correct.
Why i cant put any child nodes which their ParentID is ParentID > 0
var ds = db.Finding.AsQueryable().ToList();
treeView.DataTextField =
"VulnerabilityCode"
;
treeView.DataValueField =
"ScanId"
;
treeView.DataFieldID =
"Id"
;
treeView.DataFieldParentID =
"ParentId"
;
// only shows where this value is ZERO
treeView.DataSource = ds;
treeView.DataBind();
<
telerik:RadPane
runat
=
"server"
Scrolling
=
"None"
>
<
telerik:RadSplitter
runat
=
"server"
Orientation
=
"Horizontal"
>
<
telerik:RadPane
runat
=
"server"
>
<
telerik:RadTreeView
ID
=
"RadTreeView2"
IsExpanded
=
"True"
runat
=
"server"
Skin
=
"WebBlue"
Height
=
"600px"
Width
=
"100%"
>
</
telerik:RadTreeView
>
</
telerik:RadPane
>
...
Hi
I have a simple Rad grid using the Bootstrap skin.
Based on the data I'm using the ItemDataBound to change the row COlour, however its not being applied to Alternate rows.
How can I fix this?
Here is my code:
Protected Sub rgHousekeeping_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles rgHousekeeping.ItemDataBound
If TypeOf e.Item Is GridDataItem Then
Dim RowDataItem As GridDataItem = CType(e.Item, GridDataItem)
Dim TaskComplete As System.Web.UI.WebControls.Image = DirectCast(RowDataItem("TaskComplete").Controls(0), System.Web.UI.WebControls.Image)
If CBool(e.Item.DataItem("TaskComplete")) Then
TaskComplete.ImageUrl = "Content/Images/Tick_24.png"
Else
RowDataItem.BackColor = Drawing.ColorTranslator.FromHtml("#ff7474")
End If
End If
End Sub
Andy
[HttpException (0x80004005): The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.]
System.Web.UI.ControlCollection.Add(Control child) +9600379
Telerik.Web.UI.RadDropDownTree.CreateHeader() +135
Telerik.Web.UI.RadDropDownTree.CreateChildControls() +57
System.Web.UI.Control.EnsureChildControls() +83
System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +27
System.Web.UI.Control.FindControl(String id) +12
Telerik.Web.UI.HierarchicalControlItemContainer.FindDataSourceControl() +124
Telerik.Web.UI.HierarchicalControlItemContainer.GetDataSource() +107
System.Web.UI.WebControls.DataBoundControl.ConnectToDataSourceView() +58
System.Web.UI.WebControls.DataBoundControl.OnLoad(EventArgs e) +19
System.Web.UI.Control.LoadRecursive() +54
System.Web.UI.Control.LoadRecursive() +145
System.Web.UI.Control.LoadRecursive() +145
System.Web.UI.Control.LoadRecursive() +145
System.Web.UI.Control.LoadRecursive() +145
System.Web.UI.Control.LoadRecursive() +145
System.Web.UI.Control.LoadRecursive() +145
System.Web.UI.Control.LoadRecursive() +145
System.Web.UI.Control.LoadRecursive() +145
System.Web.UI.Control.LoadRecursive() +145
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772
I've done some server side validation on Insert, and then called the confirmation box
RadWindowManager1.RadConfirm("Are you sure?", "confirmInsertCallBackFn", 330, 100, null, "System Alert");
So on my client side I can cancel the user response ...
function confirmInsertCallBackFn(arg) {
if (arg) {
$find("<%=RadGrid1.ClientID%>").get_masterTableView().fireCommand("InitInsert", "");
### NEED TO CLOSE THE INSERT FORM ###
}
}
The only issue is that the the Insert form doesn't close when the RadConfirm is OK. What is the java script equivalent of "RadGrid1.MasterTableView.IsItemInserted =False" in order to close the Insert form.
I found general guidance here, but the cancelInsert() call actually cancels the Insert altogether and closes the insert form, rather than just close the form.
https://docs.telerik.com/devtools/aspnet-ajax/controls/grid/client-side-programming/gridtableview-object/methods/cancelinsert
$find("<%=RadGrid1.ClientID%>").get_masterTableView().cancelInsert();
Hello,
I am using below code block to bind filter combobox but the not able to bind data to combobox. can anyone help me in this?
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridFilteringItem)
{
GridFilteringItem item = (GridFilteringItem)e.Item;
RadComboBox combo = (RadComboBox)item.FindControl("RadComboboxName");
combo.DataSource = Data(0,0).DefaultView.ToTable(true, "Name");
combo.DataTextField = "Name";
combo.DataValueField = "Name";
}
}
Hello,
I want to implement radgrid filter as per the screen shot attached. can anyone help me with Radgrid filter column with all the values in it. I came across this link but i dont know how to bind filter combobox since i am biding grid in code behind.
http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/filter-templates/defaultcs.aspx