
| <telerik:RadSplitter ID="RadSplitter1" runat="server" Skin="Black" Width="200" Height="100%" |
| VisibleDuringInit="true" ResizeMode="EndPane"> |
| <telerik:RadPane ID="LeftPane" runat="server" Scrolling="None" Collapsed="false"> |
| <telerik:RadSlidingZone ID="LeftVerticalZone" runat="server" Width="22px" ClickToOpen="true"> |
| <telerik:RadSlidingPane ID="RadSlidingPane1" Title="Groups" runat="server" Width="200" |
| EnableDock="true"> |
| <telerik:RadTreeView ID="rtvGroups" runat="server" EnableEmbeddedSkins="False" Skin="Black" |
| SingleExpandPath="True" OnNodeClick="rtvGroups_NodeClick"> |
| <Nodes> |
| <telerik:RadTreeNode runat="server" Text="Groups"> |
| <Nodes> |
| <telerik:RadTreeNode runat="server" Text="GroupX" Value="1"> |
| </telerik:RadTreeNode> |
| </Nodes> |
| </telerik:RadTreeNode> |
| </Nodes> |
| <CollapseAnimation Type="OutQuint" Duration="100"></CollapseAnimation> |
| <ExpandAnimation Duration="100"></ExpandAnimation> |
| </telerik:RadTreeView> |
| </telerik:RadSlidingPane> |
| <telerik:RadSlidingPane ID="RadSlidingPane2" Title="Login" runat="server" Width="180" |
| EnableDock="false"> |
| <asp:Login ID="Login1" runat="server" BackColor="#F7F6F3" BorderColor="#E6E2D8" BorderPadding="4" |
| BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" |
| ForeColor="#333333"> |
| <TextBoxStyle BorderStyle="None" Font-Size="0.8em" /> |
| <LoginButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1px" |
| Font-Names="Verdana" Font-Size="0.8em" ForeColor="#284775" /> |
| <InstructionTextStyle Font-Italic="True" ForeColor="Black" /> |
| <TitleTextStyle BackColor="#5D7B9D" Font-Bold="True" Font-Size="0.9em" ForeColor="White" /> |
| </asp:Login> |
| </telerik:RadSlidingPane> |
| </telerik:RadSlidingZone> |
| </telerik:RadPane> |
| <telerik:RadSplitBar ID="RadSplitbar1" runat="server" CollapseMode="Forward" /> |
| <telerik:RadPane ID="MainPane" runat="server" Width="1024"> |
| <asp:ContentPlaceHolder ID="MainContent" runat="server"> |
| </asp:ContentPlaceHolder> |
| </telerik:RadPane> |
| </telerik:RadSplitter> |
We are passing a DataTable to our radGrid via the code behind. When the grid initally loads the data displays correctly. As soon as we filter, it ignores the Filter Expression and filters all the data not by the initial Hierarchy.
| rgCategories.EnableLinqExpressions = false; |
| rgCategories.MasterTableView.FilterExpression = @"([ParentCategoryId] = 0)"; |
Here is our SQL code
| SELECT DISTINCT [MEPDB].[MEPBUS].[CATEGORY].[category_id] AS [CategoryId], [MEPDB].[MEPBUS].[CATEGORY].[parent_category_id] AS [ParentCategoryId], [MEPDB].[MEPBUS].[CATEGORY].[level] AS [Level], [MEPDB].[MEPBUS].[CATEGORY].[name] AS [Name], [MEPDB].[MEPBUS].[CATEGORY].[description] AS [Description], [MEPDB].[MEPBUS].[CATEGORY].[home_message] AS [HomeMessage], [MEPDB].[MEPBUS].[CATEGORY].[email_address] AS [EmailAddress], [MEPDB].[MEPBUS].[CATEGORY].[create_date] AS [CreateDate], [MEPDB].[MEPBUS].[CATEGORY].[update_date] AS [UpdateDate], [MEPDB].[MEPBUS].[CATEGORY].[create_by] AS [CreateBy], [MEPDB].[MEPBUS].[CATEGORY].[update_by] AS [UpdateBy], [MEPDB].[MEPBUS].[CATEGORY].[is_submission_allowed] AS [IsSubmissionAllowed], [MEPDB].[MEPBUS].[CATEGORY].[is_enabled] AS [IsEnabled], [MEPDB].[MEPBUS].[CATEGORY].[is_render_home_page] AS [IsRenderHomePage], [MEPDB].[MEPBUS].[CATEGORY].[is_protected] AS [IsProtected] FROM [MEPDB].[MEPBUS].[CATEGORY] WHERE ( ( ( [MEPDB].[MEPBUS].[CATEGORY].[parent_category_id] IS NOT NULL))) ORDER BY [MEPDB].[MEPBUS].[CATEGORY].[parent_category_id] ASC,[MEPDB].[MEPBUS].[CATEGORY].[name] ASC |
Markup Code
| <telerik:RadGrid |
| ID="rgCategories" |
| runat="server" |
| AllowPaging="True" |
| AutoGenerateColumns="false" |
| AllowSorting="True" |
| CommandItemDisplay="Top" |
| GridLines="None" |
| PageSize="20" |
| AllowFilteringByColumn="true" |
| GroupingSettings-CaseSensitive="false" |
| OnNeedDataSource="rgCategories_NeedDataSource" |
| OnPreRender="rgCategories_PreRender" |
| OnItemCommand="rgCategories_ItemCommand" |
| > |
| <MasterTableView DataKeyNames="CategoryId,ParentCategoryId" HierarchyLoadMode="Client" Width="100%"> |
| <Columns> |
| <telerik:GridBoundColumn |
| DataField="CategoryID" |
| HeaderText="<%$Resources:meis,Labels_ID%>" |
| SortExpression="CategoryID" |
| /> |
| <telerik:GridHyperLinkColumn |
| DataNavigateUrlFields="CategoryID" |
| HeaderText="<%$Resources:meis,Labels_Name%>" |
| DataNavigateUrlFormatString="CategoryEdit.aspx?CategoryID={0}" |
| DataType="System.String" |
| DataTextField="Name" |
| DataTextFormatString="{0}" |
| SortExpression="Name" |
| /> |
| <telerik:GridBoundColumn |
| DataField="Description" |
| HeaderText="<%$Resources:meis,Labels_Description%>" |
| SortExpression="Description" |
| /> |
| <telerik:GridHyperLinkColumn |
| HeaderText="<%$Resources:meis,Labels_AddSubCategory %>" |
| AllowFiltering="false" |
| DataNavigateUrlFields="CategoryID" |
| DataNavigateUrlFormatString="CategoryEdit.aspx?ParentCategoryID={0}" |
| Text="<%$Resources:meis,Labels_AddSubCategory %>" |
| /> |
| </Columns> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </ExpandCollapseColumn> |
| <SelfHierarchySettings |
| ParentKeyName="ParentCategoryId" |
| KeyName="CategoryId" |
| /> |
| </MasterTableView> |
| </telerik:RadGrid> |

I have a problem with RadAjaxLoadingPanel (Telerik version 2009.1.527.35), when the corresponding RadAjaxPanel is in a container (e.g. in a <div>) that is smaller than its content, so that the container has scrollbars. In this case, the RadAjaxLoadingPanel is partly displayed outside the boundaries of the container, depending on the scroll position.
Here's an example, where I have set the MinDisplayTime to 2 seconds, so that you can see what I mean.
| <%@ Page Language="C#" AutoEventWireup="true" %> |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="rad" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml" > |
| <head runat="server"> |
| <title></title> |
| </head> |
| <body style="padding:100px;"> |
| <form id="form1" runat="server"> |
| <div> |
| <rad:RadScriptManager ID="RadScriptManager" runat="server"/> |
| <rad:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel" runat="server" MinDisplayTime="2000" BackColor="Gray" Transparency="30" /> |
| <div style="height:200px; width:200px; overflow:auto; border:solid thin black;"> |
| <rad:RadAjaxPanel ID="RadAjaxPanel" runat="server" LoadingPanelID="RadAjaxLoadingPanel"> |
| <asp:Calendar ID="Calendar" runat="server" Width="300" Height="300"></asp:Calendar> |
| </rad:RadAjaxPanel> |
| </div> |
| </div> |
| </form> |
| </body> |
| </html> |
If you click on a date in the asp:Calendar, the LoadingPanel will be displayed, but it will overlap the bottom of the Calendar's <div> container. If you scroll to the bottom of the Calendar and click again, the LoadingPanel will overlap the container's top.
Is there a possibility to keep the AjaxLoadingPanel exactly over the AjaxPanel, even if the Panel's content is scrolled?
As I said, I'm still using Telerik version 2009.1.527.35. Can you reproduce this behaviour with the latest version, too?
Thanks a lot in advance!
[EDIT]I just noticed that I forgot the set the background color of the AjaxLoadingPanel in the example above. I have added that now.
private void list_SelectedIndexChanged(object sender, System.EventArgs e)
{
GridEditableItem editedItem = (sender as DropDownList).NamingContainer as GridEditableItem;
DropDownList ddList = editedItem["AgencyId"].Controls[0] as DropDownList;
SqlDataSource8.SelectCommand =
"select AgencyId, AgencyShort from cimt_lu_agencies a, cimt_v_resources r where r.agency = a.agencyshort and r.name = '" +
(editedItem[
"ResourceId"].Controls[0] as DropDownList).SelectedItem.Text + "'";
ddList.DataSource = SqlDataSource8;
ddList.DataBind();
}
Refering to the example http://www.telerik.com/community/forums/aspnet-ajax/grid/two-different-insert-forms.aspx#720782 pls let me know this : pls
For the same solution, how do I attach Panel2, such that it acts as an update record form something like this :
| Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand |
| If e.CommandName = "BatchModeInsert" Then |
| e.Item.OwnerTableView.IsItemInserted = True |
| insert1 = "BatchModeInsert" |
| Me.RadGrid1.Rebind() |
| End If |
| If e.CommandName = "SingleModeInsert" Then |
| e.Item.OwnerTableView.IsItemInserted = True |
| insert2 = "SingleModeInsert" |
| Me.RadGrid1.Rebind() |
| End If |
| If e.CommandName = "Update" Then |
| e.Item.OwnerTableView.IsItemInserted = True |
| insert3 = "Update" |
| Me.RadGrid1.Rebind() |
| End If |
| End Sub |
And then in the ItemDatabound :
| Private Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound |
| If e.Item.OwnerTableView.IsItemInserted And TypeOf (e.Item) Is GridEditFormInsertItem Then |
| Dim item As GridEditFormInsertItem = TryCast(e.Item, GridEditFormInsertItem) |
| If insert1 = "BatchModeInsert" Then |
| item.FindControl("Panel1").Visible = False |
| End If |
| If insert2 = "SingleModeInsert" Then |
| item.FindControl("Panel2").Visible = False |
| End If |
| If insert3 = "Update" Then |
| item.FindControl("Panel2").Visible = False |
| End If |
| End If |
| End Sub |
I'm sure I need to add some flag that will bring up the update form for the row.
Note: I will have three buttons in the edit item template column with commandName
BatchModeInsert, SingleModeInsert and third one with commandname set to "Update" and will use the same panel "Panel2" for update. pls know that I am using automatic operations for update and manual for insert