| strPopUpScript = strPopUpScript & "function ClientTabSelected(sender, args) {" & vbCrLf |
| strPopUpScript = strPopUpScript & " var tab = args.get_tab();" & vbCrLf |
| strPopUpScript = strPopUpScript & "// if (tab.get_text() == 'New User') {" & vbCrLf |
| strPopUpScript = strPopUpScript & "// var oWnd = $find(" & RadWindow1.ClientID & ");" & vbCrLf |
| strPopUpScript = strPopUpScript & "// oWnd.setUrl('MyPage.aspx');" & vbCrLf |
| strPopUpScript = strPopUpScript & "// oWnd.show();" & vbCrLf |
| strPopUpScript = strPopUpScript & "// }" & vbCrLf |
| strPopUpScript = strPopUpScript & " alert(tab.get_text());" & vbCrLf |
| strPopUpScript = strPopUpScript & "}" & vbCrLf |
| <!-- Current Navigation |
| --><BR> <telerik:RadPanelBar |
| ID="RadPanelBar1" runat="server" DataSourceID="SiteMapDS" |
| Skin="Office2007"/><BR> |
| <PublishingNavigation:PortalSiteMapDataSource ID="SiteMapDS" |
| Runat="server"<BR> |
| SiteMapProvider="CurrentNavSiteMapProvider" |
| EnableViewState="true"<BR> |
| StartFromCurrentNode="true" StartingNodeOffset="0" |
| ShowStartingNode="false"<BR> |
| TrimNonCurrentTypes="Heading"/><BR> |
| </asp:ContentPlaceHolder> |
| Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init |
| createDocks() |
| End Sub |
| Sub createDocks() |
| Try |
| Dim dr As IDataReader = "Calling from the database here" |
| While dr.Read() |
| Dim aDock As New RadDock() |
| aDock.DockMode = DockMode.Docked |
| aDock.UniqueName = Guid.NewGuid().ToString() |
| aDock.ID = CStr(dr.Item("ID")) |
| aDock.Title = CStr(dr.Item("Title")) |
| Dim custCMD As New DockCommand() |
| custCMD.Name = "deleteCMD" |
| custCMD.CssClass = "pullImage" |
| custCMD.Text = "Delete" |
| custCMD.AutoPostBack = True |
| custCMD.OnClientCommand = "CustomCommand" |
| aDock.Commands.Add(custCMD) |
| AddHandler aDock.Command, AddressOf dock_Command |
| aDock.DefaultCommands = Dock.DefaultCommands.None |
| Dim triger As New AsyncPostBackTrigger() |
| triger.ControlID = aDock.ID |
| triger.EventName = "DockPositionChanged" |
| uPanel.Triggers.Add(triger) |
| rdZone.Controls.Add(aDock) |
| End While |
| dr.Dispose() |
| Catch ex As Exception |
| Dim exp As New exHandle |
| lblmsg.Text = exp.processExp(ex, "", Now) |
| End Try |
| End Sub |
| Sub dock_Command(ByVal sender As Object, ByVal e As DockCommandEventArgs) |
| If Session("ClassID") Is Nothing Then |
| mainPNL.Visible = False |
| notAllowed.Visible = True |
| Else |
| If e.Command.Name = "deleteCMD" Then |
| Dim aDock As RadDock = sender |
| Dim ID_int As Integer = aDock.ID |
| Dim ClassID As Integer = CInt(Session("ClassID")) |
| Dim SetsCount As Integer = "Calling from database to check if there is anything" |
| If (SetsCount > 0) Then |
| "NOT SHOWING THIS THING HERE." |
| lblmsg.Text = "<BR>There are " & SetsCount & " in this section. Please delete them first." |
| Else |
| 'delete from database here and release session |
| ScriptManager.RegisterStartupScript(uPanel, Me.[GetType](), "RemoveDock", String.Format("function _removeDock() {{" & Chr(13) & "" & Chr(10) & "" & Chr(9) & "Sys.Application.remove_load(_removeDock);" & Chr(13) & "" & Chr(10) & "" & Chr(9) & "$find('{0}').undock();" & Chr(13) & "" & Chr(10) & "" & Chr(9) & "$get('{1}').appendChild($get('{0}'));" & Chr(13) & "" & Chr(10) & "" & Chr(9) & "$find('{0}').doPostBack('DockPositionChanged');" & Chr(13) & "" & Chr(10) & "}};" & Chr(13) & "" & Chr(10) & "Sys.Application.add_load(_removeDock);", (DirectCast(sender, RadDock)).ClientID, uPanel.ClientID), True) |
| End If |
| End If |
| End If |
| End Sub |
| <asp:ScriptManager id="ScriptManager" runat="server"/> |
| <radT:radformdecorator id="FormDecorator1" runat="server" decoratedcontrols="all" |
| skin="Default"> |
| </radT:radformdecorator> |
| <div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div> |
| <script type="text/javascript"> |
| function GetRadWindow() |
| { |
| var oWindow = null; |
| if (window.radWindow) oWindow = window.radWindow; |
| else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; |
| return oWindow; |
| } |
| function returnToParent() |
| { |
| var oWnd = GetRadWindow(); |
| oWnd.close(); |
| } |
| function CustomCommand(dock, args) |
| { |
| //You can implement your custom logic in this method |
| if (!confirm("Are you sure you want to delete this section?")) |
| { |
| args.set_cancel(true); |
| } |
| } |
| </script> |
| <table width="100%" id="notAllowed" runat="server"> |
| <tr> |
| <td>You don't have permission to view this page. Please contact support.<br /> |
| <input id="Button1" onclick="returnToParent(); return false;" type="button" |
| value="Close" class="button" /></td> |
| </tr> |
| </table> |
| <asp:Panel runat="server" ID="mainPNL" Width="500"> |
| <table cellpadding="0" cellspacing="0" border="0" width="100%"> |
| <tr> |
| <td> |
| Select a section and drag it up and down to change its order. |
| <asp:Label ID="lblmsg" runat="server" Font-Bold="True" |
| ForeColor="#C00000"></asp:Label> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <radT:raddocklayout runat="server" id="rdLayout" Skin="Sunset"> |
| <radT:raddockzone runat="server" id="rdZone" Width="100%" Skin="Sunset"> |
| </radT:raddockzone> |
| <div style="display:none"> |
| Hidden UpdatePanel, which is used to receive the new dock controls. |
| We will move them with script to the desired initial dock zone. |
| <asp:updatepanel runat="server" id="uPanel"> |
| <triggers> |
| </triggers> |
| </asp:updatepanel> |
| </div> |
| </radT:raddocklayout> |
| </td> |
| </tr> |
| <tr> |
| <td><br /> |
| <input id="closeBTN" onclick="returnToParent(); return false;" type="button" |
| value="Exit" class="button" /> |
| |
| <%-- <asp:Button ID="exitBTN" runat="server" Text="Exit" Width="130px" |
| CausesValidation="False" />--%> |
| <asp:Button ID="resetBTN" runat="server" |
| CausesValidation="False" Text="Reset" Width="130px" /> |
| |
| <asp:Button ID="submitBTN" runat="server" Text="Save & Exit" Width="130px" |
| CausesValidation="False" /> |
| </td> |
| </tr> |
| </table> |
| </asp:Panel> |
var grid = <%= rgDRFormASPPFQuestion.ClientID %>;
var groupColumnImage;
var tableView = grid.DetailTablesCollection[0]; //Problem here
groupColumnImage = tableView.Rows[RowIndex].Control.cells[0].firstChild;
if(groupColumnImage.src)
{
groupColumnImage.click();
}
nestedView.DetailTableIndex
For example, the above code give me back index of 0 and javascript show me that I click on item 6 in DetailTablesCollection.<telerik:radgrid id="ProjectPlanningRadGrid"
AllowFilteringByColumn="True"
AllowSorting="True"
AutoGenerateColumns="False"
DataSourceID="ProjectPlansDataSource"
GridLines="Horizontal"
OnDataBound="ProjectPlanningRadGrid_DataBound"
OnInit="ProjectPlanningRadGrid_Init"
OnItemCommand="ProjectPlanningRadGrid_ItemCommand" OnSortCommand="ProjectPlanningRadGrid_SortCommand"
runat="server"
ShowGroupPanel="True"
ShowFooter="True"
Skin="Office2007"
Height="600px"
OnItemCreated="ProjectPlanningRadGrid_ItemCreated"
GroupHeaderItemStyle-HorizontalAlign="Left" >
<
MasterTableView TableLayout="Fixed" DataSourceID="ProjectPlansDataSource"
CommandItemDisplay="Top" ShowGroupFooter="True" DataKeyNames="ProjectID" Width="350%" >

HI!, Hope my TITLE is right... not pretty sure.....Is there a way i could achieve this and have the same functionality with this rather than doing checkboxes="true" because i will be using both radio button and checkbox. the controls depend on the parameter of the parent form in which for example when i call Form A. radiobutton will appear and when i call Form B checkbox will appear.
I could not implement the example we have here at the site and it only take effect when i enable checkboxes="true". i have successfully bind the labels with the database to the radtreeview but the two control event are not. hope you could help me out with this one.. been trying a lot of ways for days. :-(
below is a sample of my code hope you guys could understand it. :-)
thanks in advance and more power to telerik.......
.ACSX Code
<telerik:RadTreeView ID="_uscRadTrvSelectAuthority" runat="server" skin="Office2007" checkboxes="true" on>
<NodeTemplate > <asp:RadioButton ID="_uscRBtnSeleAuth" runat="server" Visible="false"/>
<asp:CheckBox ID="_uscCboxSeleAuth" runat="server" Visible="false"/> <asp:Label ID="_uscLblSeleAuth" runat="server"> </asp:Label>
</NodeTemplate>
<CollapseAnimation Type="OutQuint" Duration="100"></CollapseAnimation> <ExpandAnimation Duration="100"></ExpandAnimation>
</telerik:RadTreeView>
.CS Code
string pfid = Request.Params["pfid"];
if (pfid == "Pop1")
{ ((System.Web.UI.WebControls.CheckBox).Node.FindControl("_uscCBoxSeleAuth")).Visible = true;
}
else if (pfid == "Pop2")
{ ((System.Web.UI.WebControls.RadioButton).Node.FindControl("_uscRBtnSeleAuth")).Visible = true;
}
((System.Web.UI.WebControls.Label)e.Node.FindControl("_uscLblSeleAuth")).Text = e.Node.Text;