Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
109 views
Hi Team,

I have a radupload control in my page with a property EnableFileInputSkinning that is set to false, i needed to disable this property so i can apply my own design for the control. However, when this porperty is set to false my localization for the browse button is not working. Text is always set to "Browse....".

Attached is the sample code of my control.
<telerik:RadUpload ID="uscUploadMetadata" runat="server" MaxFileInputsCount="1" CssClass="fileupload"
                            ControlObjectsVisibility="None" EnableFileInputSkinning="false" OnClientAdded="keyboardSupport">
                                <Localization Select="<%$Resources: Browse%>" Remove="<%$Resources:Global, Remove%>">                     </Localization>
                            </telerik:RadUpload>

Please help me with this one.

Thank you,

Dean

Dean
Top achievements
Rank 1
 asked on 03 May 2013
2 answers
294 views

Hello,
I want to add a RadSkinManager by coding, so below is my codes:

protected void Page_Load(object sender, EventArgs e)
{
    RadSkinManager skinManager = new RadSkinManager();
    skinManager.Skin = "Forest";
}

But nothing was happened, it doesn't work. When I write code like this:

protected void Page_Load(object sender, EventArgs e)
{
    RadSkinManager skinManager = new RadSkinManager();
    //skinManager.Skin = "Forest";
    skinManager.ApplySkin(RadPane1,"Forest");
}

 It works well. But I want to change skin for all the RadControls in the page, not one of them.If it can works,I could write these code in
BasePage, and let all the pages inherit it , so that I don't need to add RadSkinManager for each page.
George Gergues
Top achievements
Rank 1
 answered on 02 May 2013
1 answer
134 views
I am creating a RadGrid in my Page_Init. Intially when the screen first comes up the hierarchy will not be defined. When the user clicks on a button, the page will refresh and in certail cases I will want the grid to have hierarchy and it others not. The problem is when the page_init first fires and the grid is created with no hierarchy. Then the user clicks, page_init fires and the code to add hierarchy runs with no errors. The page displays but no hierarchy is shown. The DetailTableDataBind does not even fire. If I set up the hierarchy when the page first loads and then the user clicks the button, the hierarchy shows. I must be doing something wrong in code to have my changes not applied. Please let me know.

I declare a RadGrid1 in my .aspx.vb page
Private WithEvents RadGrid1 As RadGrid = New RadGrid()
I declare a placeholder on my aspx page
<table id="tblTelerikDetails" cellpadding="0" cellspacing="0" width="1500" style="background-color:white" border="1">
    <tr>
        <td>
            <asp:PlaceHolder EnableViewState="false" ID="PlaceHolder1" runat="server" />
        </td>
    </tr>
</table>
In my page_init i call the defineGridStructure. I check the variable mSubCodesAvailable in 2 places to setup my hierarchy.
Again, if I comment out the IF part so the hierarchy gets setup initially, all is good. It is when the grid does not setup hierarchy on the first page_init, but tries to set it up on the second page_init that the hierarchy does not work.
Private Sub defineGridStructure()
     RadGrid1.ID = "RadGrid1"
     RadGrid1.Width = Unit.Pixel(1500)
     RadGrid1.Height = Unit.Pixel(700)
     RadGrid1.MasterTableView.EditMode = GridEditMode.InPlace
     RadGrid1.AllowPaging = True
     RadGrid1.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric
     RadGrid1.AutoGenerateColumns = False
     RadGrid1.ShowStatusBar = True
     RadGrid1.AllowSorting = True
     RadGrid1.AllowFilteringByColumn = True
     RadGrid1.Skin = "WebBlue"
     RadGrid1.ClientSettings.ClientEvents.OnGridCreated = "GetGridObject"
     RadGrid1.ClientSettings.Scrolling.FrozenColumnsCount = 2
     RadGrid1.ClientSettings.AllowColumnsReorder = True
     RadGrid1.ClientSettings.ColumnsReorderMethod = GridClientSettings.GridColumnsReorderMethod.Swap
     RadGrid1.ClientSettings.Selecting.AllowRowSelect = True
     RadGrid1.ClientSettings.Resizing.AllowColumnResize = True
     RadGrid1.ClientSettings.Scrolling.AllowScroll = True
     RadGrid1.ClientSettings.Scrolling.UseStaticHeaders = True
     RadGrid1.ClientSettings.Scrolling.SaveScrollPosition = True
     RadGrid1.MasterTableView.EnableViewState = False
     RadGrid1.MasterTableView.PageSize = 50
     RadGrid1.MasterTableView.AllowMultiColumnSorting = True
     RadGrid1.MasterTableView.DataKeyNames = New String() {"DetailID", "Day"}
     If mSubCodesAvailable Then
         RadGrid1.MasterTableView.HierarchyLoadMode = GridChildLoadMode.ServerBind
         RadGrid1.MasterTableView.HierarchyDefaultExpanded = True
     End If
     columnCreation("Geography", "Geography", RadGrid1)
     columnCreation("Circ Type", "CirculationTypeDescription", RadGrid1)
     columnCreation("Household", "HouseHold_Count", RadGrid1)
     columnCreation("Total Cov", "TotalCoverage", RadGrid1)
     If miZipCodeStoreAssociationTypeID > 0 Then
         columnCreation("Location Market", "LocationMarket", RadGrid1)
         columnCreation("Location Number", "LocationNumber", RadGrid1)
         columnCreation("Location Name", "LocationName", RadGrid1)
         columnCreation("Distance", "Distance", RadGrid1)
         columnCreation("Sales", "Sales", RadGrid1)
         columnCreation("Total Sales", "TotalSales", RadGrid1)
         columnCreation("BOS", "BOS", RadGrid1)
         columnCreation("Cume BOS", "CumeBOS", RadGrid1)
         columnCreation("SPH", "SPH", RadGrid1)
         columnCreation("SPH Index", "SPHIndex", RadGrid1)
     End If
     If mstrClientDataCategoryID1Description.Trim <> "" Then
         columnCreation(mstrClientDataCategoryID1Description.Trim, "CD1", RadGrid1)
     End If
     If mstrClientDataCategoryID2Description.Trim <> "" Then
         columnCreation(mstrClientDataCategoryID2Description.Trim, "CD2", RadGrid1)
     End If
     If mstrClientDataCategoryID3Description.Trim <> "" Then
         columnCreation(mstrClientDataCategoryID3Description.Trim, "CD3", RadGrid1)
     End If
     If mstrReportDemographicID1Description.Trim <> "" Then
         columnCreation(mstrReportDemographicID1Description.Trim, "Demographic1", RadGrid1)
     End If
     If mstrReportDemographicID2Description.Trim <> "" Then
         columnCreation(mstrReportDemographicID2Description.Trim, "Demographic2", RadGrid1)
     End If
     If mstrReportDemographicID3Description.Trim <> "" Then
         columnCreation(mstrReportDemographicID3Description.Trim, "Demographic3", RadGrid1)
     End If
     If mstrReportDemographicID4Description.Trim <> "" Then
         columnCreation(mstrReportDemographicID4Description.Trim, "Demographic4", RadGrid1)
     End If
     If mstrReportDemographicID5Description.Trim <> "" Then
         columnCreation(mstrReportDemographicID5Description.Trim, "Demographic5", RadGrid1)
     End If
     columnCreation("Day", "Day", RadGrid1)
     columnCreation("Selected", "Selected", RadGrid1)
     If UcHeader.objSession.ApplicationId <> CInt(ConfigurationManager.AppSettings("MediaviewerAppID")) Then
         columnCreation("Forced", "Forced", RadGrid1)
     End If
     columnCreation("Circ", "Circ", RadGrid1)
     columnCreation("Coverage", "Coverage", RadGrid1)
     columnCreation("Zones", "Zones", RadGrid1)
     If UcHeader.objSession.ApplicationId <> CInt(ConfigurationManager.AppSettings("MediaviewerAppID")) Then
         If miVersionsCategoryID > 0 Then
             columnCreation("Version", "Version", RadGrid1)
             columnCreation("Sub-Version Category", "SubVersionCategory", RadGrid1)
         End If
         If miDeliveryCodeCount > 0 Then
             columnCreation("Delivery Code", "DeliveryCode", RadGrid1)
         End If
         Dim dpCounter As Integer = 1
         Dim dpCollection As IList(Of RadListBoxItem) = rlbDistributionPatterns.CheckedItems
         For Each item As RadListBoxItem In dpCollection
             columnCreation(item.Text, "DP" & dpCounter.ToString, RadGrid1)
             dpCounter += 1
         Next
     End If
     If mSubCodesAvailable Then
         Dim tableSubCode As New GridTableView(RadGrid1)
         tableSubCode.Name = "SubCodes"
         tableSubCode.DataKeyNames = New String() {"SubCodeID", "Day"}
         tableSubCode.Width = Unit.Percentage(100)
         columnSubCodeCreation("SubCode", "Sub_Code", tableSubCode)
         columnSubCodeCreation("Household", "HouseHold_Count", tableSubCode)
         If mstrClientDataCategoryID1Description.Trim <> "" Then
             columnSubCodeCreation(mstrClientDataCategoryID1Description.Trim, "CD1", tableSubCode)
         End If
         If mstrClientDataCategoryID2Description.Trim <> "" Then
             columnSubCodeCreation(mstrClientDataCategoryID2Description.Trim, "CD2", tableSubCode)
         End If
         If mstrClientDataCategoryID3Description.Trim <> "" Then
             columnSubCodeCreation(mstrClientDataCategoryID3Description.Trim, "CD3", tableSubCode)
         End If
         If mstrReportDemographicID1Description.Trim <> "" Then
             columnSubCodeCreation(mstrReportDemographicID1Description.Trim, "Demographic1", tableSubCode)
         End If
         If mstrReportDemographicID2Description.Trim <> "" Then
             columnSubCodeCreation(mstrReportDemographicID2Description.Trim, "Demographic2", tableSubCode)
         End If
         If mstrReportDemographicID3Description.Trim <> "" Then
             columnSubCodeCreation(mstrReportDemographicID3Description.Trim, "Demographic3", tableSubCode)
         End If
         If mstrReportDemographicID4Description.Trim <> "" Then
             columnSubCodeCreation(mstrReportDemographicID4Description.Trim, "Demographic4", tableSubCode)
         End If
         If mstrReportDemographicID5Description.Trim <> "" Then
             columnSubCodeCreation(mstrReportDemographicID5Description.Trim, "Demographic5", tableSubCode)
         End If
         columnSubCodeCreation("Selected", "Selected", tableSubCode)
         If UcHeader.objSession.ApplicationId <> CInt(ConfigurationManager.AppSettings("MediaviewerAppID")) Then
             columnSubCodeCreation("Forced", "Forced", tableSubCode)
         End If
         columnSubCodeCreation("Circ", "Circ", tableSubCode)
         columnSubCodeCreation("Coverage", "Coverage", tableSubCode)
         If UcHeader.objSession.ApplicationId <> CInt(ConfigurationManager.AppSettings("MediaviewerAppID")) Then
             Dim dpCounter As Integer = 1
             Dim dpCollection As IList(Of RadListBoxItem) = rlbDistributionPatterns.CheckedItems
             For Each item As RadListBoxItem In dpCollection
                 columnSubCodeCreation(item.Text, "DP" & dpCounter.ToString, tableSubCode)
                 dpCounter += 1
             Next
         End If
     End If
     Me.PlaceHolder1.Controls.Add(RadGrid1)
 End Sub
I have my 2 procedures to fill my RadGrid1
Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource
    If mintCircSetID > 0 Then
        Dim intIndex As Integer = 0
        Dim strSortedColumn As String = ""
        Dim strSortClause As String = ""
        mstrSQL = ""
        mstrSQL = "EXEC WB_sp_RetrieveGeographySelection_ForTelerik '" & mstrSessionID & "'," & mintEventID
        If mblnFullRunUtilizedInd Or cbSingleZip.Checked Then
            mstrSQL = mstrSQL & ",0"
        Else
            mstrSQL = mstrSQL & ",1"
        End If
        If cbSundayFR.Checked Or cbSundayHD.Checked Or cbSundaySC.Checked Or cbSundayMX.Checked Then
            mstrSQL = mstrSQL & ",1"
        Else
            mstrSQL = mstrSQL & ",0"
        End If
        If cbMondayFR.Checked Or cbMondayHD.Checked Or cbMondaySC.Checked Or cbMondayMX.Checked Then
            mstrSQL = mstrSQL & ",1"
        Else
            mstrSQL = mstrSQL & ",0"
        End If
        If cbTuesdayFR.Checked Or cbTuesdayHD.Checked Or cbTuesdaySC.Checked Or cbTuesdayMX.Checked Then
            mstrSQL = mstrSQL & ",1"
        Else
            mstrSQL = mstrSQL & ",0"
        End If
        If cbWednesdayFR.Checked Or cbWednesdayHD.Checked Or cbWednesdaySC.Checked Or cbWednesdayMX.Checked Then
            mstrSQL = mstrSQL & ",1"
        Else
            mstrSQL = mstrSQL & ",0"
        End If
        If cbThursdayFR.Checked Or cbThursdayHD.Checked Or cbThursdaySC.Checked Or cbThursdayMX.Checked Then
            mstrSQL = mstrSQL & ",1"
        Else
            mstrSQL = mstrSQL & ",0"
        End If
        If cbFridayFR.Checked Or cbFridayHD.Checked Or cbFridaySC.Checked Or cbFridayMX.Checked Then
            mstrSQL = mstrSQL & ",1"
        Else
            mstrSQL = mstrSQL & ",0"
        End If
        If cbSaturdayFR.Checked Or cbSaturdayHD.Checked Or cbSaturdaySC.Checked Or cbSaturdayMX.Checked Then
            mstrSQL = mstrSQL & ",1"
        Else
            mstrSQL = mstrSQL & ",0"
        End If
        mstrSQL = mstrSQL & "," & mintParentMap
        If cbSundayFR.Checked Or cbMondayFR.Checked Or cbTuesdayFR.Checked Or cbWednesdayFR.Checked Or cbThursdayFR.Checked Or cbFridayFR.Checked Or cbSaturdayFR.Checked Then
            mstrSQL = mstrSQL & ",1,1,1"
        Else
            If cbSundayHD.Checked Or cbMondayHD.Checked Or cbTuesdayHD.Checked Or cbWednesdayHD.Checked Or cbThursdayHD.Checked Or cbFridayHD.Checked Or cbSaturdayHD.Checked Then
                mstrSQL = mstrSQL & ",1"
            Else
                mstrSQL = mstrSQL & ",0"
            End If
            If cbSundayMX.Checked Or cbMondayMX.Checked Or cbTuesdayMX.Checked Or cbWednesdayMX.Checked Or cbThursdayMX.Checked Or cbFridayMX.Checked Or cbSaturdayMX.Checked Then
                mstrSQL = mstrSQL & ",1"
            Else
                mstrSQL = mstrSQL & ",0"
            End If
            If cbSundaySC.Checked Or cbMondaySC.Checked Or cbTuesdaySC.Checked Or cbWednesdaySC.Checked Or cbThursdaySC.Checked Or cbFridaySC.Checked Or cbSaturdaySC.Checked Then
                mstrSQL = mstrSQL & ",1"
            Else
                mstrSQL = mstrSQL & ",0"
            End If
        End If
        intIndex = UBound(Split(hidSortInformation.Value, ","))
        Do While intIndex >= 0
            strSortedColumn = Trim(Split(hidSortInformation.Value, ",")(intIndex))
            strSortClause = strSortClause & strSortedColumn & ","
            intIndex -= 1
        Loop
        strSortClause = Left(strSortClause, Len(strSortClause) - 1)
        mstrSQL = mstrSQL & ",'" & strSortClause & "',"
        If cbSortingByParent.Checked Then
            mstrSQL = mstrSQL & "1"
        Else
            mstrSQL = mstrSQL & "0"
        End If
        mstrSQL = mstrSQL & ",''"
        If Not e.IsFromDetailTable Then
            RadGrid1.DataSource = GetDataTable(mstrSQL & ",0,0,''")
        End If
    End If
End Sub
Private Sub RadGrid1_DetailTableDataBind(sender As Object, e As Telerik.Web.UI.GridDetailTableDataBindEventArgs) Handles RadGrid1.DetailTableDataBind
    Dim dataItem As GridDataItem = CType(e.DetailTableView.ParentItem, GridDataItem)
    Select Case e.DetailTableView.Name
        Case "SubCodes"
            Dim detailID As Integer = dataItem.GetDataKeyValue("DetailID").ToString()
            Dim Day As String = dataItem.GetDataKeyValue("Day").ToString()
            If mintCircSetID > 0 Then
                e.DetailTableView.DataSource = GetDataTable(mstrSQL & ",1," & detailID & ",'" & Day & "'")
            End If
    End Select
End Sub
in my Page_Load I do the following
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim grid As RadGrid = CType(PlaceHolder1.FindControl("RadGrid1"), RadGrid)
        RadAjaxManager1.AjaxSettings.AddAjaxSetting(grid, grid)
End Sub
David
Top achievements
Rank 1
 answered on 02 May 2013
1 answer
85 views
Is it a way for removing/replacing icon when button is disabled ? 
Sabby
Top achievements
Rank 1
 answered on 02 May 2013
2 answers
188 views
I have used this tutorial:

http://www.telerik.com/support/kb/aspnet-ajax/window/adding-a-custom-button-to-radwindow-titlebar.aspx

to add a custom button to the title bar of my RadWindow. I now want to add a RadToolTip to that button, so that when I click it I get a nice sticky tooltip which I can use in various ways. but for the life of me I can't get it working. Does anyone have any examples of doing this? I've tried specifying a unique ID for my command button, then using that in conjunction with the tooltip, but it doesn't appear to be working.

my tooltip is defined as such:

<telerik:RadToolTip Animation="Slide" ID="shellRadToolTip" IsClientID="true" Position="BottomLeft" runat="server" ShowEvent="OnClick" style="z-index:10000 !important;" TargetControlID="btnSwitchSite">
  <div>
    TOOLTIP
  </div> 
</telerik:RadToolTip>

my custom button looks like this:

<li><a id="btnSwitchSite" class="rwControlButtonSite" href="javascript:void(0)" ></a></li>

and if I add this code and try to handle it manually:

<li><a id="btnSwitchSite" class="rwControlButtonSite" href="javascript:void(0)" onmousedown="winShell_Site(event);"></a></li>

function winShell_Site(e) {
  var radToolTip = $find('<%= shellRadToolTip.ClientID %>');
  radToolTip.set_text('This is the new tool tip text to display');
  radToolTip.show();
  //alert(radToolTip.get_targetControlID());
}

the tooltip will only show if I uncomment the alert, but it does so at the bottom of the RadWindow, and not anywhere near the control it should be associated with.
Xorcist
Top achievements
Rank 1
 answered on 02 May 2013
3 answers
98 views
I have the following XML: 
<SplitButton Size="Large" Text="Descriptive" ImageUrlLarge ="images/widgets_descriptive.png" CommandName="managedescriptive">
        <Button Text='ABC Codes' CommandName='descriptive' CommandArgument='1'/>
        <Button Text='Planning Data' CommandName='descriptive' CommandArgument='2'/>
      </SplitButton>

In my code-behind I have the following function

protected void dsxWebRibbon_SplitButton_Click(object sender, RibbonBarSplitButtonClickEventArgs args)
    {
        string commandname = args.Button.CommandName;
        string commanddata = args.Button.CommandArgument;
        switch (commandname)
        {
            case "opendc":
                Response.Redirect("dsxDashboard.aspx");
                break;
            default:
                dsxCommand.InnerHtml = "Invalid Command:" + commandname;
                break;
        }//end switch
    }

The issue I am having is that when the parent button is clicked...it is not getting the parents commandname....what would you do to get that value

Michael
Top achievements
Rank 1
 answered on 02 May 2013
3 answers
166 views
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="NestedRadGrids.aspx.vb"
    Inherits="KimWebSandbox.NestedRadGrids" %>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="rsmJS" runat="server" EnablePageMethods="true"></telerik:RadScriptManager>
 
        <telerik:radgrid id="OuterGrid" runat="server" AutoGenerateColumns="false">
            <MasterTableView Name="Level1">
                <Columns>
                    <telerik:GridBoundColumn />
                    <telerik:GridBoundColumn DataField="Sales" HeaderText="Sales" UniqueName="Sales" />
                </Columns>
                <DetailTables>
                    <telerik:GridTableView Name="Level2" AutoGenerateColumns="false">
                            <Columns>
                                <telerik:GridBoundColumn />
                                <telerik:GridBoundColumn DataField="Sales" HeaderText="Sales" UniqueName="Sales" />
                            </Columns>
                             <DetailTables>
                                <telerik:GridTableView Name="Level3" AutoGenerateColumns="false">
                                        <Columns>
                                            <telerik:GridBoundColumn />
                                            <telerik:GridBoundColumn DataField="Sales" HeaderText="Sales" UniqueName="Sales" />
                                        </Columns>
                                </telerik:GridTableView>
                            </DetailTables>
                    </telerik:GridTableView>
                </DetailTables>
            </MasterTableView>
        </telerik:radgrid>
    </div>
    </form>
</body>
</html>

Imports Telerik.Web.UI
 
Public Class NestedRadGrids
    Inherits System.Web.UI.Page
 
    Private Sub OuterGrid_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles OuterGrid.NeedDataSource
        If Not e.IsFromDetailTable Then
            OuterGrid.Columns(0).HeaderText = "Dept"
            DirectCast(OuterGrid.Columns(0), GridBoundColumn).DataField = "Dept"
            OuterGrid.DataSource = GetDataforGrid()
        End If
    End Sub
 
    Private Sub OuterGrid_DetailTableDataBind(sender As Object, e As Telerik.Web.UI.GridDetailTableDataBindEventArgs) Handles OuterGrid.DetailTableDataBind
        Select Case e.DetailTableView.Name
            Case "Level2"
                e.DetailTableView.Columns(0).HeaderText = "Level 2 Header"
                DirectCast(e.DetailTableView.Columns(0), GridBoundColumn).DataField = "Dept"
                e.DetailTableView.DataSource = GetDataforGrid()
            Case "Level3"
                e.DetailTableView.Columns(0).HeaderText = "Level 3 Header"
                DirectCast(e.DetailTableView.Columns(0), GridBoundColumn).DataField = "Dept"
                e.DetailTableView.DataSource = GetDataforGrid()
        End Select
    End Sub
 
    Private Function GetDataforGrid() As DataSet
        Dim ds As New DataSet
        Dim dt As New DataTable
 
        dt.Columns.Add("Dept", GetType(String))
        dt.Columns.Add("Sales", GetType(String))
 
        dt.Rows.Add("10", "5749.00")
        dt.Rows.Add("11", "2123.00")
 
        ds.Tables.Add(dt)
        Return ds
    End Function
End Class

I need to be able to set the header text dynamically in the first column of my Detail Views.
If you run the code above, you will see that the outer table is correctly set to "Dept".
Expand the first row and you will see that the detail table is correctly set to "Level 2 Header".
Expand the first row in Level 2 and you will see that the next detail table is correctly set to "Level 2 Header".
HOWEVER, the header text in Level 2 disappears.


Kim
Top achievements
Rank 1
 answered on 02 May 2013
3 answers
351 views
Hi All,

Here I am sharing my one of script which may help to other.

What script doing:

1. RadTreeView is in RadComboBox with CheckBoxes="true" and TriStateCheckBoxes="true".
2. Need to get all selected (Checked) nodes of radtreeview in comma separated string in radcombobox.
3. If radtreeview is not expanded still it will get all that child nodes in comma separated string.

HTML:

<telerik:RadComboBox ID="RadComboBox1" runat="server" Width="500px" ShowToggleImage="True"
        Style="vertical-align: middle;" OnClientDropDownOpened="OnClientDropDownOpenedHandler"
        AfterClientCheck="AfterCheckHandler" EmptyMessage="Choose a destination" ExpandAnimation-Type="None"
        CollapseAnimation-Type="None">
        <ItemTemplate>
            <div id="div1">
                <telerik:RadTreeView runat="server" ID="RadTreeView1" OnClientNodeChecked="nodeChecked" OnClientNodeClicked="nodeClicked"
                    CheckBoxes="true" Width="100%" Height="140px" TriStateCheckBoxes="true">
                    <Nodes>
                        <telerik:RadTreeNode runat="server" Text="Africa" Expanded="true">
                            <Nodes>
                                <telerik:RadTreeNode runat="server" Text="Egypt">
                                    <Nodes>
                                        <telerik:RadTreeNode runat="server" Text="Cairo">
                                        </telerik:RadTreeNode>
                                    </Nodes>
                                </telerik:RadTreeNode>
                                <telerik:RadTreeNode runat="server" Text="South Africa">
                                    <Nodes>
                                        <telerik:RadTreeNode runat="server" Text="Cape Town">
                                        </telerik:RadTreeNode>
                                    </Nodes>
                                </telerik:RadTreeNode>
                                <telerik:RadTreeNode runat="server" Text="Kenya">
                                    <Nodes>
                                        <telerik:RadTreeNode runat="server" Text="Nairobi" Value="1999">
                                        </telerik:RadTreeNode>
                                    </Nodes>
                                </telerik:RadTreeNode>
                            </Nodes>
                        </telerik:RadTreeNode>
                        <telerik:RadTreeNode runat="server" Text="Australia">
                            <Nodes>
                                <telerik:RadTreeNode runat="server" Text="South East Australia">
                                    <Nodes>
                                        <telerik:RadTreeNode runat="server" Text="Sydney">
                                        </telerik:RadTreeNode>
                                        <telerik:RadTreeNode runat="server" Text="Melbourne">
                                        </telerik:RadTreeNode>
                                    </Nodes>
                                </telerik:RadTreeNode>
                            </Nodes>
                        </telerik:RadTreeNode>
                        <telerik:RadTreeNode runat="server" Text="Asia" Expanded="true">
                            <Nodes>
                                <telerik:RadTreeNode runat="server" Text="China">
                                    <Nodes>
                                        <telerik:RadTreeNode runat="server" Text="Bejing">
                                        </telerik:RadTreeNode>
                                    </Nodes>
                                </telerik:RadTreeNode>
                                <telerik:RadTreeNode runat="server" Text="India">
                                    <Nodes>
                                        <telerik:RadTreeNode runat="server" Text="New Delhi">
                                        </telerik:RadTreeNode>
                                        <telerik:RadTreeNode runat="server" Text="Bombay">
                                        </telerik:RadTreeNode>
                                    </Nodes>
                                </telerik:RadTreeNode>
                                <telerik:RadTreeNode runat="server" Text="Indonesia">
                                    <Nodes>
                                        <telerik:RadTreeNode runat="server" Text="Jakarta">
                                        </telerik:RadTreeNode>
                                    </Nodes>
                                </telerik:RadTreeNode>
                            </Nodes>
                        </telerik:RadTreeNode>
                        <telerik:RadTreeNode runat="server" Text="Europa" Expanded="true">
                            <Nodes>
                                <telerik:RadTreeNode runat="server" Text="England">
                                    <Nodes>
                                        <telerik:RadTreeNode runat="server" Text="London">
                                        </telerik:RadTreeNode>
                                        <telerik:RadTreeNode runat="server" Text="Liverpool">
                                        </telerik:RadTreeNode>
                                        <telerik:RadTreeNode runat="server" Text="Manchester">
                                        </telerik:RadTreeNode>
                                    </Nodes>
                                </telerik:RadTreeNode>
                                <telerik:RadTreeNode runat="server" Text="France">
                                    <Nodes>
                                        <telerik:RadTreeNode runat="server" Text="Paris">
                                        </telerik:RadTreeNode>
                                        <telerik:RadTreeNode runat="server" Text="Cannes">
                                        </telerik:RadTreeNode>
                                        <telerik:RadTreeNode runat="server" Text="Nice">
                                        </telerik:RadTreeNode>
                                    </Nodes>
                                </telerik:RadTreeNode>
                                <telerik:RadTreeNode runat="server" Text="Germany">
                                    <Nodes>
                                        <telerik:RadTreeNode runat="server" Text="Bonn">
                                        </telerik:RadTreeNode>
                                        <telerik:RadTreeNode runat="server" Text="Berlin">
                                        </telerik:RadTreeNode>
                                        <telerik:RadTreeNode runat="server" Text="Frankfurt">
                                        </telerik:RadTreeNode>
                                    </Nodes>
                                </telerik:RadTreeNode>
                            </Nodes>
                        </telerik:RadTreeNode>
                    </Nodes>
                </telerik:RadTreeView>
            </div>
        </ItemTemplate>
        <Items>
            <telerik:RadComboBoxItem Text="" />
        </Items>
    </telerik:RadComboBox>


JavaScript:

<script type="text/javascript">
        function StopPropagation(e) {
            if (!e) {
                e = window.event;
            }
 
            e.cancelBubble = true;
        }
 
        function OnClientDropDownOpenedHandler(sender, eventArgs) {
            var tree = sender.get_items().getItem(0).findControl("RadTreeView1");
            var selectedNode = tree.get_selectedNode();
            if (selectedNode) {
                selectedNode.scrollIntoView();
            }
        }
 
        function nodeClicked(sender, args) {
            var node = args.get_node();
            if (node.get_checked()) {
                node.uncheck();
            } else {
                node.check();
            }
            nodeChecked(sender, args)
 
        }
 
        function nodeChecked(sender, args) {
            var comboBox = $find("<%= RadComboBox1.ClientID %>");
 
            //check if 'Select All' node has been checked/unchecked
            var tempNode = args.get_node();
            if (tempNode.get_text().toString() == "(Select All)") {
                // check or uncheck all the nodes
            } else {
                var nodes = new Array();
                nodes = sender.get_checkedNodes();
                var vals = "";
                var i = 0;
 
                for (i = 0; i < nodes.length; i++) {
                    var n = nodes[i];
                    var nodeText = n.get_text().toString();
                    if (nodeText != "(Select All)") {
                        vals = vals + n.get_text().toString() + ",";
                    }
                }
 
                //prevent  combo from closing
                supressDropDownClosing = true;
                comboBox.set_text(vals);
            }
        }
    </script>

This all code credit goes to:
http://blog.ropardo.ro/2011/07/15/multiple-selection-treeview-in-combobox/

Enjoy Telerik,

Thanks,

Kaushal Jani
msigman
Top achievements
Rank 2
 answered on 02 May 2013
7 answers
662 views
What I am finding is that if I define the width on one column of the grid like this:

<

 

rada:GridBoundColumn DataField="AccountNo" Visible="true" HeaderText="AccountNo" HeaderStyle-Width=500 ItemStyle-Width=500 FooterStyle-Width=500

 

 

HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" SortExpression="UserAccountAddress.AccountNo">

 

 

</rada:GridBoundColumn>

 



Then, every other column gets cut/shrunk losing the text.  What I feel that it should do, is, if it can't fit everything in based on my window size, is add a horrizontal scroll bar to the grid (using static headers as well in case that makes a difference). (see uploaded image).  Is there a way to tell the other columns to expand as needed?

 

<rada:RadGrid ID="rg" runat="server" AllowSorting="True" AllowMultiRowSelection="true" AutoGenerateColumns="false"

 

 

Width="96%" OnNeedDataSource="rg_NeedDataSource" Height="230">

 

 

 

<MasterTableView Width="100%" Summary="RadGrid table" DataMember="Documents" CommandItemDisplay="Top"

 

 

 

 

 

CommandItemSettings-ShowExportToExcelButton="true" CommandItemSettings-ShowExportToCsvButton="false" ShowHeadersWhenNoRecords="true"

 

 

 

 

 

AllowNaturalSort="false">

 

 

 

 

 

<Columns>

 

</

 

MasterTableView>

 

 

 

 

 

<ClientSettings>

 

 

 

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="True"></Scrolling>

 

 

 

 

 

<Selecting AllowRowSelect="True" UseClientSelectColumnOnly="true" EnableDragToSelectRows="false" />

 

 

 

 

 

</ClientSettings>

 

 

 

 

 

</rada:RadGrid>

 

Gary
Top achievements
Rank 1
 answered on 02 May 2013
9 answers
439 views
Can you Please Provide me the demo of Dynamic Multi level Parent-Child relation Rad Grid.I have gone through your demo of
Mixed Hierarchical Grid but in that demo you have defind three  levels Master Tabel-Detail table-Detail Table.But we don't have fixed level it will get increase depending upon relation.Please find the attched image.These levels will grows increasing depending upon data.
Kiran
Top achievements
Rank 1
 answered on 02 May 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?