Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
105 views
hi all :)

i have a problem with hierarchy grid expanding

I bound the master and detailed tables, but when I run my page, I can see only the master table, with expanding arrow, but no expanding happened

can you help me please, with this code ?

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<style type="text/css">
    .style1
    {
        width: 100%;
    }
    .style2
    {
        direction: rtl;
    }
</style>
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGrid1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" HorizontalAlign="NotSet"
    LoadingPanelID="RadAjaxLoadingPanel1">
    <telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" runat="server" GridLines="None"
        CellSpacing="0" AutoGenerateColumns="False" Style="direction: rtl" OnPreRender="RadGrid1_PreRender">
        <MasterTableView TableLayout="Fixed" DataKeyNames="News_ID" DataSourceID="SqlDataSource1"
            Width="1000px">
            <ItemTemplate>
                <table class="style1">
                    <tr>
                        <td class="style2">
                            <asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("NewsCategory_AvatarPath")%>'
                                Width="30%" Height="30%" />
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            <asp:Label runat="server" ID="lblNewsTitle" Text='<%# Eval("News_Title")%>' Font-Bold="true"
                                Font-Names="Tahoma" Font-Size="Small"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            <asp:Label runat="server" ID="lblNewsText" Text='<%# Eval("News_Text")%>' Font-Bold="false"
                                Font-Names="Tahoma" Font-Size="Small"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            <asp:Label runat="server" ID="lblNewsDate" Text='<%# Eval("News_Date")%>' Font-Bold="false"
                                Font-Names="Tahoma" Font-Size="X-Small"></asp:Label>   
                            <asp:Label runat="server" ID="lblNewsTime" Text='<%# Eval("News_Time")%>' Font-Bold="false"
                                Font-Names="Tahoma" Font-Size="X-Small"></asp:Label>
                        </td>
                    </tr>
                </table>
            </ItemTemplate>
            <CommandItemSettings ExportToPdfText="Export to PDF" />
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn DataField="News_Title" FilterControlAltText="Filter News_Title column"
                    HeaderText="أخبار شبكة شام" HeaderStyle-Font-Bold="false" HeaderStyle-Font-Names="Tahoma"
                    HeaderStyle-Font-Size="Small" SortExpression="News_Title" UniqueName="News_Title">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="News_Text" FilterControlAltText="Filter News_Text column"
                    SortExpression="News_Text" UniqueName="News_Text">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="News_Date" FilterControlAltText="Filter News_Date column"
                    SortExpression="News_Date" UniqueName="News_Date">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="News_Time" FilterControlAltText="Filter News_Time column"
                    SortExpression="News_Time" UniqueName="News_Time">
                </telerik:GridBoundColumn>
            </Columns>
  <DetailTables>
                <telerik:GridTableView CommandItemDisplay="Bottom" DataKeyNames="News_Notes.Note_ID, News_Notes.News_ID"
                    Width="100%"
                    DataSourceID="SqlDataSource2" AllowAutomaticInserts="true" >
                    <ParentTableRelation>
                        <telerik:GridRelationFields DetailKeyField="News_Notes.News_ID" MasterKeyField="News.News_ID" />
                    </ParentTableRelation>
                  <ItemTemplate>
                        <table class="style1">
                            <tr>
                                <td class="style2">
                                    <asp:Label runat="server" ID="lblNewsTitle" Text='<%# Eval("User_Name")%>'
                                        Font-Bold="false" Font-Names="Tahoma" Font-Size="Small"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td class="style2">
                                    <asp:Label runat="server" ID="lblNewsText" Text='<%# Eval("Note_Text")%>'
                                        Font-Bold="false" Font-Names="Tahoma" Font-Size="Small"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td class="style2">
                                    <asp:Label runat="server" ID="lblNewsDate" Text='<%# Eval("Note_Date")%>'
                                        Font-Bold="false" Font-Names="Tahoma" Font-Size="Small"></asp:Label>
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                    <Columns>
                        <telerik:GridBoundColumn DataField="Note_ID" DataType="System.Int32" FilterControlAltText="Filter Note_ID column"
                            HeaderText="التعليقات" ReadOnly="True" SortExpression="Note_ID" UniqueName="Note_ID"
                            HeaderStyle-Font-Bold="false" HeaderStyle-Font-Names="Tahoma" HeaderStyle-Font-Size="Small">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Note_Text" FilterControlAltText="Filter Note_Text column"
                            SortExpression="Note_Text" UniqueName="Note_Text">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Note_Date" DataType="System.DateTime" FilterControlAltText="Filter Note_Date column"
                            SortExpression="Note_Date" UniqueName="Note_Date">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="User_Name" FilterControlAltText="Filter User_Name column"
                            SortExpression="User_Name" UniqueName="User_Name">
                        </telerik:GridBoundColumn>
                    </Columns>
                </telerik:GridTableView>
            </DetailTables>
            </NestedViewTemplate>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        </HeaderContextMenu>
    </telerik:RadGrid>
</telerik:RadAjaxPanel>
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" />
<asp:SqlDataSource ID="SqlDataSource1" runat="server" SelectCommand="SELECT News.News_ID, News.News_CategoryID, News.News_AdminID,
News.News_Title, News.News_Text, News.News_Date, News.News_Time,
News.News_FlagIsActive, NewsCategories.NewsCategory_ID, NewsCategories.NewsCategory_AvatarPath
FROM News INNER JOIN NewsCategories ON News.News_CategoryID = NewsCategories.NewsCategory_ID
WHERE News.News_FlagIsActive='True'
Order BY News.News_ID DESC"></asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" SelectCommand="SELECT News_Notes.Note_ID, News_Notes.News_ID, News_Notes.User_ID,
    News_Notes.Note_Text, News_Notes.Note_Date, News_Notes.Note_Flag,
    UsersTable.User_ID AS Expr1, UsersTable.User_Name
    FROM News_Notes INNER JOIN UsersTable ON News_Notes.User_ID = UsersTable.User_ID
WHERE  News_Notes.Note_Flag = 'True'
Order BY News_Notes.Note_Date "></asp:SqlDataSource>


any one can help me please!

Iana Tsolova
Telerik team
 answered on 28 Sep 2011
1 answer
214 views
I am having problems when adding two columns to a grid which rely on filtering though a combobox. The majority of the examples and support for custom filtering on a RadGrid is through the markup (.aspx). This does not apply for me because I am generating the RadGrid completely dynamically in the code-behind.

I have successfully created a custom filtering on a column. Please find below the snippet which loads the AssignedTo column. The AssignedTo column has a combobox filter implemented through AssignedToCustomBoundFilteringColumn.

var assignedToCol = new AssignedToCustomBoundFilteringColumn();
assignedToCol.DataField = "AssessmentManagerUser.FullName";
assignedToCol.HeaderText = "Assigned To";               
assignedToCol.UniqueName = "AssignedTo";
assignedToCol.SortExpression = "AssessmentManagerUser.FullName";
 
PlaApplicationsGrid.MasterTableView.Columns.Add(assignedToCol);

See below for the implementation of the AssignedToCustomBoundFilteringColumn
private class AssignedToCustomBoundFilteringColumn : GridBoundColumn
{
    protected override void SetupFilterControls(TableCell cell)
    {
        RadComboBox rcBox = new RadComboBox();
        rcBox.ID = "AssignedToFilterDropDownList";
        rcBox.AutoPostBack = true;
        rcBox.DataTextField = "FullName";
        rcBox.DataValueField = "FullName";
        rcBox.SelectedIndexChanged += rcBox_SelectedIndexChanged;
        rcBox.ItemDataBound += new RadComboBoxItemEventHandler(rcBox_ItemDataBound);
 
        var plaOfficers = ApplicationUserManager.Instance.GetBySecurityRoles(new string[] { KnownRoleNames.PLAOfficer }) as List<ApplicationUser>;
 
        var unassignedUser = ApplicationUserManager.Instance.GetUnassigned();
 
        ApplicationUser tempEmptyUser = new ApplicationUser();
        tempEmptyUser.Person = new Person();
        tempEmptyUser.Person.FirstName = "empty";
        tempEmptyUser.Person.Surname = "";
 
        plaOfficers.Insert(0, unassignedUser);
        plaOfficers.Insert(0, tempEmptyUser);
 
        rcBox.DataSource = plaOfficers;
        rcBox.DataBind();
 
        //rcBox.Items[0].Text = "Unassigned";
 
        cell.Controls.Add(rcBox);
    }           
 
    private void rcBox_ItemDataBound(object sender, RadComboBoxItemEventArgs e)
    {
        // Need this unless you want the item text to say "Unassignred Unassigned"
        if (e.Item.Text == ApplicationUserManager.Instance.GetUnassigned().FullName)
        {
            e.Item.Text = ApplicationUserManager.Instance.GetUnassigned().Username;
        }
        else if (e.Item.Text == "empty ")
        {
            e.Item.Text = " ";
        }
    }
 
    protected override void SetCurrentFilterValueToControl(TableCell cell)
    {
        if (!(this.CurrentFilterValue == ""))
        {
            ((RadComboBox)cell.Controls[0]).Items.FindItemByValue(this.CurrentFilterValue).Selected = true;
        }
    }
 
    protected override string GetCurrentFilterValueFromControl(TableCell cell)
    {
        string currentValue = ((RadComboBox)cell.Controls[0]).SelectedItem.Value;
        this.CurrentFilterFunction = (currentValue != "" && currentValue != "empty ") ? GridKnownFunction.EqualTo : GridKnownFunction.NoFilter;
        return currentValue;
    }
 
    private void rcBox_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
    {
        ((GridFilteringItem)(((RadComboBox)sender).Parent.Parent)).FireCommandEvent("Filter", new Pair());
    }
}

This is working fine. But I have since created a new column, which is basically an identical implementation
var stateCol = new StateCustomBoundFilteringColumn(); // AssignedTo column filtering breaks when this column is introduced
//var stateCol = new GridBoundColumn();
stateCol.DataField = "State.Description";
stateCol.HeaderText = "State";
stateCol.UniqueName = "State";
stateCol.SortExpression = "State.Description";
PlaApplicationsGrid.MasterTableView.Columns.Add(stateCol);

private class StateCustomBoundFilteringColumn : GridBoundColumn
{
    protected override void SetupFilterControls(TableCell cell)
    {
        RadComboBox rcBox = new RadComboBox();
        rcBox.ID = "StateFilterDropDownList";
        rcBox.AutoPostBack = true;
        rcBox.DataTextField = "Description";
        rcBox.DataValueField = "Name";
        rcBox.SelectedIndexChanged += rcBox_SelectedIndexChanged;
 
        var validStates = ApplicationStateManager.Instance.GetAllMasterBuildStates();
 
        ApplicationState tempEmptyState = new ApplicationState();
        tempEmptyState.Name = "empty";
        tempEmptyState.Description = "";
 
        validStates.Insert(0, tempEmptyState);
 
        rcBox.DataSource = validStates;
        rcBox.DataBind();
 
        //rcBox.Items[0].Text = "Unassigned";
 
        cell.Controls.Add(rcBox);
    }
  
    protected override void SetCurrentFilterValueToControl(TableCell cell)
    {
        if (!(this.CurrentFilterValue == ""))
        {
            ((RadComboBox)cell.Controls[0]).Items.FindItemByValue(this.CurrentFilterValue).Selected = true;
        }
    }
 
    protected override string GetCurrentFilterValueFromControl(TableCell cell)
    {
        string currentValue = ((RadComboBox)cell.Controls[0]).SelectedItem.Value;
        this.CurrentFilterFunction = (currentValue != "" && currentValue != "empty ") ? GridKnownFunction.EqualTo : GridKnownFunction.NoFilter;
        return currentValue;
    }
 
    private void rcBox_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
    {
        ((GridFilteringItem)(((RadComboBox)sender).Parent.Parent)).FireCommandEvent("Filter", new Pair());
    }
}

N.B. I have implemented the ColumnCreating event handler

I am at a loss why introducing the State filtering stuffs up the AssignedTo filtering.
Iana Tsolova
Telerik team
 answered on 28 Sep 2011
3 answers
89 views
Hello,

Does anyone know the logic behind why CaseSensitive is in the GroupingSetting instead of the FilterMenu property group? Not the most important question in the world, but I think I am not understanding something?

Thanks,
John
Iana Tsolova
Telerik team
 answered on 28 Sep 2011
1 answer
208 views


Error: uncaught exception: Error while uploading, [HttpWebRequest_WebException_RemoteServer]
Arguments: NotFound
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.60531.0&File=System.Windows.dll&Key=HttpWebRequest_WebException_RemoteServer




Error: Unhandled Error in Silverlight Application [HttpWebRequest_WebException_RemoteServer]
Arguments: NotFound
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.60531.0&File=System.Windows.dll&Key=HttpWebRequest_WebException_RemoteServer   at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
   at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at UploadPrototype.MainPage.ProcessResponse(IAsyncResult asyncResult)
   at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClassd.<InvokeGetResponseCallback>b__b(Object state2)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
Source File: http://192.168.1.4/Triage/Profiles/Personnel/Members/personnel.aspx
Line: 0

Error: Unhandled Error in Silverlight Application [ScriptObject_InvokeFailed]
Arguments:
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=8.0.60531.0&File=System.Windows.Browser.dll&Key=ScriptObject_InvokeFailed   at System.Windows.Browser.ScriptObject.Invoke(String name, Object[] args)
   at UploadPrototype.EventManager.SilverlightError(String message, Int32 index)
   at UploadPrototype.MainPage.<>c__DisplayClass1f.<ProcessResponse>b__18()
Source File: http://192.168.1.4/Triage/Profiles/Personnel/Members/personnel.aspx
Line: 0
Princy
Top achievements
Rank 2
 answered on 28 Sep 2011
2 answers
123 views
I have an array of several rows and columns bound to a radGrid but I am only displaying a few of the columns which is working fine so far.

For each row, I am displaying a button where I will append it with a querystring of some values.

Unfortunately, some of the values which I intend to include in the querystring are not among the display columns, eg: columnG

I tried declaring a new column in the aspx file with UnqueName ColumnG but it does not seem to be working.

Question is , how do I get this column value in itemDataBound without using UniqueName ?

Thanks



vincent
Top achievements
Rank 1
 answered on 28 Sep 2011
1 answer
130 views
I followed the example in live demo and found that the signature of the webservice method must be

public RadRotatorItemData[] GetRotatorData(int itemIndex)

Does that mean there is no way to pass any custom parameter to the webservice method?

Regards
Edwin

Slav
Telerik team
 answered on 28 Sep 2011
5 answers
189 views
Hi friends,
I have been trying to place some extra  fields like field1, field2 along with the Rad grid columns into rad filter. When i am trying below code i am not able to see my added fields 'field1, field2" in rad filter.  any suggestions..? i DONT WANT TO USE DATASOURCE ID..
<body>
    <form id="form1" runat="server">
    <div>
     
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
        </telerik:RadScriptManager>
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
        <br />
        <telerik:RadFilter ID="RadFilter1" runat="server" FilterContainerID="RadGrid1"
            onapplyexpressions="RadFilter1_ApplyExpressions">
            <FieldEditors>
            <telerik:RadFilterTextFieldEditor FieldName="field1"  DataType="System.String" />
              <telerik:RadFilterTextFieldEditor FieldName="field2"  DataType="System.String" />
            </FieldEditors>
        </telerik:RadFilter>
        <br />
        <br />
     
    </div>
    <telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" GridLines="None"
        AllowAutomaticInserts="True"
        DataSourceID="SqlDataSource1" 
        ShowGroupPanel="True">
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
 
<MasterTableView AutoGenerateColumns="False" DataSourceID="SqlDataSource1" >
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
</RowIndicatorColumn>
 
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
</ExpandCollapseColumn>
 
    <Columns>
        <telerik:GridBoundColumn DataField="MachineName"
            FilterControlAltText="Filter MachineName column" HeaderText="MachineName"
            SortExpression="MachineName" UniqueName="MachineName">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="OperatingSystem"
            FilterControlAltText="Filter OperatingSystem column"
            HeaderText="OperatingSystem" SortExpression="OperatingSystem"
            UniqueName="OperatingSystem">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Location"
            FilterControlAltText="Filter Location column" HeaderText="Location"
            SortExpression="Location" UniqueName="Location">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="IPAddress"
            FilterControlAltText="Filter IPAddress column" HeaderText="IPAddress"
            SortExpression="IPAddress" UniqueName="IPAddress" Visible=false>
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Site_Name"
            FilterControlAltText="Filter Site_Name column" HeaderText="Site_Name"
            SortExpression="Site_Name" UniqueName="Site_Name" >
        </telerik:GridBoundColumn>
      
         <telerik:GridBoundColumn DataField="Status_ID"
            FilterControlAltText="Filter Status_ID column" HeaderText="Status_ID"
            SortExpression="Status_ID" UniqueName="Status_ID" Visible=false >
        </telerik:GridBoundColumn>
    </Columns>
 
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>
 
        <ClientSettings AllowDragToGroup="True">
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        </ClientSettings>
 
<FilterMenu EnableImageSprites="False" DataValueField="Location"></FilterMenu>
    </telerik:RadGrid>
    <telerik:RadAjaxManager runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConnectionString="<%$ ConnectionStrings:sitemgrConnectionString %>"
        SelectCommand="TELRIK" SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>
    </form>
</body>
</html>
The code i am using to create dataset..
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
public partial class _Default : System.Web.UI.Page
{
    string conStr = ConfigurationManager.ConnectionStrings["conn44"].ConnectionString;
 
    
    
    protected void Page_Load(object sender, EventArgs e)
    {
 
         
            RadGrid1.GroupingSettings.CaseSensitive = false;
            RadGrid1.ShowGroupPanel = true;
            RadGrid1.ClientSettings.AllowDragToGroup = true;
 
            RadFilterTextFieldEditor editor1 = new RadFilterTextFieldEditor();
            RadFilter1.FieldEditors.Add(editor1);
            editor1.FieldName = "field1";
            editor1.DataType = typeof(string);
            editor1.DisplayName = "field1";
 
           RadFilterTextFieldEditor editor2 = new RadFilterTextFieldEditor();
            RadFilter1.FieldEditors.Add(editor2);
            editor2.FieldName = "field2";
            editor2.DataType = typeof(string);
            editor2.DisplayName = "field2";
         
  
    }
 
    protected void RadFilter1_ApplyExpressions(object sender, RadFilterApplyExpressionsEventArgs e)
    {
        RadFilterSqlQueryProvider provider = new RadFilterSqlQueryProvider();
        provider.ProcessGroup(e.ExpressionRoot);
        Label1.Text = provider.Result;
    }
}
Mira
Telerik team
 answered on 28 Sep 2011
2 answers
155 views
I have used a rad menu.it is working fine for 2nd label. but for 3rd label, the child menu item height is collapsed.
pls help..

Pritam
Top achievements
Rank 1
 answered on 28 Sep 2011
6 answers
246 views
Hi,

I am wondering how cold I programmatically change RadDock zoneID. For example, In the code-behind I would move one Dock to a different Zone, in fact what I want do is change the RadDock Zone when this Dock is Closed.

I noticed that the zoneID and Index have only getters... they don't setters...

Any suggestion on how to do this?

Thanks,

Adriano
Slav
Telerik team
 answered on 28 Sep 2011
1 answer
748 views
We're using a Grid with fixed Grouping (so the GroupPanel is not accessible) and want to enable expand and collapse all via buttons outside the grid. Is this possible?

I've looked through all the examples I could find, and couldn't find anything that will allow me to do it.

On the Client Settings, we've got both AllowExpandCollapse and AllowGroupExpandCollapse set to true. HierarchyLoadMode is ServerBind. We can do the expand/collapse either on the client or server side, we don't mind which.

ASPX code for the grid is as follows:
<telerik:RadGrid ID="grdMyProcesses" runat="server" AllowPaging="False"
    AutoGenerateColumns="False" AllowCustomPaging="False" BackColor="White"
    Height="600px">
    <GroupingSettings ExpandTooltip="Expand" CollapseTooltip="Collapse"  />
    <ClientSettings AllowExpandCollapse="True" AllowGroupExpandCollapse="True" >
        <Selecting AllowRowSelect="True" />
        <Scrolling AllowScroll="true" UseStaticHeaders="true" />
    </ClientSettings>
    <MasterTableView DataKeyNames="ProcessID" NoDetailRecordsText="No Processes."
        NoMasterRecordsText="No Processes." ShowHeadersWhenNoRecords="False" AllowCustomPaging="False"
        HierarchyLoadMode="ServerBind" BackColor="White">
        <ExpandCollapseColumn Resizable="False" >
            <HeaderStyle Width="20px" />
        </ExpandCollapseColumn>
        <Columns>
            <telerik:GridBoundColumn DataField="ID" UniqueName="colID" Visible="False" />
            <telerik:GridTemplateColumn HeaderText="Process" SortExpression="ProcessName" ItemStyle-Width="459px" HeaderStyle-Width="459px">
                <ItemTemplate>
                    <asp:HyperLink ID="lnkProcessName" runat="server" NavigateUrl='<%# Eval("ProcessSummaryURL") %>' Text='<%# Eval("ProcessName") %>' ToolTip='<%# Eval("ProcessDefinition") %>'></asp:HyperLink>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderText="Process Owner" SortExpression="ProcessOwnerName" ItemStyle-Width="100px" HeaderStyle-Width="100px">
                <ItemTemplate>
                    <asp:HyperLink ID="lnkProcessOwner" runat="server" NavigateUrl='<%# Eval("EmailToProcessOwnerURL") %>' Text='<%# Eval("ProcessOwnerName") %>' ToolTip="Send a message to the Process Owner about this Process."></asp:HyperLink>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
        </Columns>
        <SortExpressions>
            <telerik:GridSortExpression FieldName="ProcessDisplayOrder" />
        </SortExpressions>
        <GroupByExpressions>
            <telerik:GridGroupByExpression>
                <SelectFields>
                  <telerik:GridGroupByField HeaderText="Group" FieldAlias="Group" FieldName="GroupName" FormatString="" />
                </SelectFields>
                <GroupByFields>
                    <telerik:GridGroupByField FieldAlias="GroupID" FieldName="GroupID" />
                </GroupByFields>
            </telerik:GridGroupByExpression>
            <telerik:GridGroupByExpression>
                <SelectFields>
                    <telerik:GridGroupByField HeaderText="Enterprise Process" FieldAlias="EP" FieldName="EnterpriseProcessName" FormatString="" />
                </SelectFields>
                <GroupByFields>
                    <telerik:GridGroupByField FieldAlias="EnterpriseProcessDisplayOrder" FieldName="EnterpriseProcessDisplayOrder" />
                    <telerik:GridGroupByField FieldAlias="EnterpriseProcessID" FieldName="EnterpriseProcessID" />
                </GroupByFields>
            </telerik:GridGroupByExpression>
        </GroupByExpressions>
    </MasterTableView>
</telerik:RadGrid>

Anyone know?

Enjoy
Random
Vasil
Telerik team
 answered on 28 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?