Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
160 views
Hello,

I'd like to see if it's possible to use a dynamically generated RadEditor to return a plain text string all from the server side.

Dim myHTML as String = "Some text <strong>with formatting.</strong>"
  
Dim myEditor as New RadEditor
myEditor.Content = myHTML
myEditor.DataBind()
myEditor.StripFormattingOptions = EditorStripFormattingOptions.All
  
myHTML = myEditor.Content

Now I realize that the StripFormattingOptions is only going to work on a client side paste event.  So I am wondering if there is a way to either use client side script to get the plain text or some other method that i'm missing.

Hopefully that makes sense! Thanks,
Sean
Rumen
Telerik team
 answered on 11 Apr 2011
3 answers
206 views
I have just migrated over to the new rotator and i'm not overly impressed. In some respects the old version is better. One of the annoying issues I am having has to do with the border around the control. Setting it to "None" does not remove the border nor does setting the border width to 0px. Is there a way for me to get rid of this border?
Steven
Top achievements
Rank 1
 answered on 11 Apr 2011
1 answer
150 views
Hello,

I think I may have found a problem (although it might not be an "exposed" problem) with the RadRotator in the most current release...

I am setting attribute values of the rotator item from the database on ItemDataBound...

then when the item is shown on the client, I update various GUI elements to what they should be based on the attributes.

getting the item attributes of the radrotator was a bit difficult, and someone at telerik helped me by providing me with the GetAttributeValue function (shown in the javascript code below).

Perhaps some of this has changed???

The page was working fine, and then when I updated to the new release it started behaving a bit differently...

if i move onto the nth item from the (n-1)th item, the GUI updates to the correct values for the (n-1)th item...

on the other hand, if i move onto the nth item from the (n+1)th item, the GUI updates to the correct values for the (n+1)th item...

any ideas?

void _rotator_ItemDataBound(object sender, RadRotatorEventArgs e)
{
    DataRowView itemView = e.Item.DataItem as DataRowView;
    if (itemView != null)
    {
        e.Item.Attributes["imageUrl"] = ImagesFolderUrl + itemView.Row["DocumentID"].ToString().PadLeft(8, '0') + "/" + itemView.Row["PageNumber"].ToString().PadLeft(4, '0');
        e.Item.Attributes["Author"] = isnullorempty(itemView.Row["Author"].ToString(), " ");
        e.Item.Attributes["AuthorTitle"] = isnullorempty(itemView.Row["AuthorTitle"].ToString(), " ");
        e.Item.Attributes["CompanyName"] = isnullorempty(itemView.Row["CompanyName"].ToString(), " ");
        e.Item.Attributes["PageNumber"] = itemView.Row["PageNumber"].ToString();
        e.Item.Attributes["TitleDescription"] = isnullorempty(itemView.Row["TitleDescription"].ToString(), " ");
        e.Item.Attributes["ConferenceName"] = isnullorempty(itemView.Row["Conference"].ToString(), " ");
        e.Item.Attributes["PresentationDate"] = ((DateTime)itemView.Row["DateOfPresentation"]).ToString("MMMM dd, yyyy");
        e.Item.Attributes["SlideID"] = itemView.Row["SlideID"].ToString();
        e.Item.Attributes["DocumentID"] = itemView.Row["DocumentID"].ToString();
        e.Item.Attributes["PageLayout"] = itemView.Row["PageLayout"].ToString();
 
        if (itemView.Row.Table.Columns.Contains("resultID"))
            e.Item.Attributes["resultID"] = itemView.Row["resultID"].ToString();
    }
}


function SetRotatorToSlideID(slideID) {
    var items = rotator.get_items();
    for (i in items) {
        if (slideID == GetAttributeValue(items[i], "SlideID")) {
            rotator.set_currentItemIndex(items[i].get_index(), true);
            UpdateGUI(items[i]);
            break;
        }
    }
}
 
function GetAttributeValue(anObject, strProperty) {
    if (anObject) {
        var attributes = $telerik.$('[' + strProperty + ']:first', anObject.get_element()).attr(strProperty);
        if (attributes) {
            return attributes;
        }
    }
}
 
function RotatorClientItemShowing(sender, args) {
    stateHandled = true;
    setLoading(true);
    UpdateGUI(args.get_item());
}
 
function RotatorClientItemShown(sender, args) {
    stateHandled = false;
}
 
function RotatorClientItemClicked(sender, args) {
    sender.set_currentItemIndex(args.get_item().get_index(), true);
}
 
function UpdateGUI(item) {
    var companyName = GetAttributeValue(item, "CompanyName");
    var title = GetAttributeValue(item, "TitleDescription");
    var pageNum = GetAttributeValue(item, "PageNumber");
    var author = GetAttributeValue(item, "Author");
    var authorTitle = GetAttributeValue(item, "AuthorTitle");
    var conference = GetAttributeValue(item, "ConferenceName");
    var presDate = GetAttributeValue(item, "PresentationDate");
    var layout = GetAttributeValue(item, "PageLayout");
 
    document.getElementById("lblSelectedRotatorItem").innerText = companyName + " - " + title + " - " + author + " - Page " + pageNum;
    document.getElementById("LargeImage").src = GetAttributeValue(item, "imageUrl") + ".png";
 
    document.getElementById("LargeImage").width = ImageWidth(layout);
 
    document.getElementById("lblCompanyName").innerText = companyName;
    document.getElementById("lblTitle").innerText = title;
    document.getElementById("lblConferenceName").innerText = conference;
    document.getElementById("lblAuthor").innerText = author;
    document.getElementById("lblAuthorTitle").innerText = authorTitle;
    document.getElementById("lblDate").innerText = presDate;
 
    setHash(GetAttributeValue(item, "DocumentID"), GetAttributeValue(item, "SlideID"));
    setLoading(false);
}


edit:

it seems that the RotatorClientItemClicked event is also a bit faulty...

when clicking an item, the rotator moves to the correct item, however it does NOT do so with animation...

in addition, the GUI does not change at all when this happens...

Niko
Telerik team
 answered on 11 Apr 2011
1 answer
186 views
Hello, I've a RadGrid into ASP:Panel but the RadGrid Rebind don't work correctly!

When close modal (RadWindow) or change the page with RadGrid pagination, the grid collapse and don't rebind the data (with debug, the page except the ItemDataBound on Rebind).

-- RAM -- 

        protected void RAM_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            if (e.Argument == "Rebind")
            {
                RG1.MasterTableView.SortExpressions.Clear();
                RG1.MasterTableView.GroupByExpressions.Clear();
                RG1.Rebind();
            }
            else if (e.Argument == "RebindAndNavigate")
            {
                RG1.MasterTableView.SortExpressions.Clear();
                RG1.MasterTableView.GroupByExpressions.Clear();
                RG1.MasterTableView.CurrentPageIndex = RG1.MasterTableView.PageCount - 1;
                RG1.Rebind();
            }
        }

-- RAD MANAGER AND JS --

            function refreshGrid(arg) {


                if (!arg) {
                    $find("<%= RAM.ClientID %>").ajaxRequest("Rebind");
                }
                else {
                    $find("<%= RAM.ClientID %>").ajaxRequest("RebindAndNavigate");
                }
            }


       </script>
    </telerik:RadCodeBlock>


    <!-- Rad Ajax Manager -->
    <telerik:RadAjaxManager ID="RAM" runat="server" OnAjaxRequest="RAM_AjaxRequest">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RAM">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RG1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RG1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RG1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

Why this?
Thanks.
Iana Tsolova
Telerik team
 answered on 11 Apr 2011
1 answer
82 views
hello Telerik,
 i am using RadCalender control. and i want to implement a scenario. in my scenario i have to show some special dates for a month highlighted.
for example i want to highlight all those dates in a perticular month on which meetings are scheduled, or those dates on which holidays 
 are falling.
pls suggest me the way to implement it in silverlight.
Yana
Telerik team
 answered on 11 Apr 2011
1 answer
140 views
Hi,

I have hierarchy with 2 RadGrids, however, the SQL query of the internal Grid occurs during load and not during the expand of the NestedViewTemplate.

I use:
HierarchyLoadMode="ServerOnDemand"
in the internal grid and followed exactly a demo you have, in this exact regard.

Thanks,
Elad

    <telerik:RadGrid SortingSettings-SortToolTip="הקלק למיון" OnSortCommand="RadGrid1_SortCommand" ID="RadGrid1" OnPreRender="RadGrid1_PreRender" runat="server" Width="100%" Height="820px" PageSize="10"
    AllowSorting="True" AllowMultiRowSelection="True" AllowPaging="true"
    GridLines="None" AutoGenerateColumns="False" Style="border: 0; outline:none;" Skin="Office2007">
    <MasterTableView HierarchyLoadMode="ServerOnDemand" CommandItemDisplay="Top" Dir=RTL EnableViewState="true" Width="100%" DataKeyNames="username,TopUsers1,TopUsers2,TopUsers3,TopUsers4,TopUsers5,TopUsers6,TopUsers7,TopUsers8,TopUsers9,TopUsers10,id,page,cat,RowNumber2,url,grade,lastgrade,oldgrade,lastupdate,photourl,friends,monuseract,moncommentstouser,monlikestouser,monfriendsact,moncommentstofriends,monlikestofriends" DataMember="Mails" AllowMultiColumnSorting="False">
         <PagerStyle Visible="false" />
         <CommandItemTemplate>
         <asp:LinkButton ID="LinkButton4" runat="server" CommandName="RebindGrid"><img style="border:0px;vertical-align:middle;" alt="רענן" src="images/Ref1.png" />רענן</asp:LinkButton>
            <asp:LinkButton ID="UpdateCat" Visible=false runat="server" CommandName="UpdateCat"><img style="border:0px;vertical-align:middle;" alt="עדכן קטגוריות" src="images/Update3.png" />עדכן קטגוריות</asp:LinkButton>
         </CommandItemTemplate>
        <Columns>
            <telerik:GridClientSelectColumn Visible="false" Reorderable="False" UniqueName="ClientSelectColumn">
           <HeaderStyle Width="30px"></HeaderStyle>
            </telerik:GridClientSelectColumn>
            <telerik:GridTemplateColumn UniqueName="PhotoUrl" Groupable="False">
                <HeaderStyle Width="35px"></HeaderStyle>
                <ItemStyle Height="35px"></ItemStyle>
                <ItemTemplate>
                    <a style="text-decoration:none" href="<%#converturl(DataBinder.Eval(Container.DataItem, "Url"))%>" target="_blank" >
                    <asp:Image BorderWidth="0px" Width="55" Height="55" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "PhotoUrl") %>'
                        AlternateText="MediaType" Style="float: right; cursor: pointer;" runat="server">
                    </asp:Image>
                    </a>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
             <telerik:GridTemplateColumn UniqueName="UserName" HeaderText="שם משתמש">
                <HeaderStyle HorizontalAlign="right" ></HeaderStyle>
                <ItemStyle HorizontalAlign="right" Wrap="true" ></ItemStyle>
                <ItemTemplate>
                        <a style="text-decoration:none" href="<%#converturl(DataBinder.Eval(Container.DataItem, "Url"))%>" target="_blank" >
                    <div dir="rtl" style="white-space:normal;">
                        <%# DataBinder.Eval(Container.DataItem, "UserName") %>
                        </div>
                        </a>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn AllowSorting="false" DataFormatString="{0:N0}" DataField="RowNumber2" HeaderText="דירוג<br>(ישראל)" >
                                    <HeaderStyle HorizontalAlign="center" ></HeaderStyle>
                <ItemStyle HorizontalAlign="Center" ></ItemStyle>
            </telerik:GridBoundColumn>
              <telerik:GridBoundColumn AllowSorting="false" DataFormatString="{0:N0}" DataField="grade" HeaderText="ציון<br>משוקלל" >
                                    <HeaderStyle HorizontalAlign="center" ></HeaderStyle>
                <ItemStyle HorizontalAlign="Center" ></ItemStyle>
            </telerik:GridBoundColumn>
            <telerik:GridTemplateColumn UniqueName="DailyChange" HeaderText="שינוי יומי">
                <HeaderStyle HorizontalAlign="center" ></HeaderStyle>
                <ItemStyle HorizontalAlign="center" Wrap="true" ></ItemStyle>
                <ItemTemplate>
                    <div dir="rtl" style="white-space:normal;">
                        <%# GetDailyChange(DataBinder.Eval(Container.DataItem, "grade"),DataBinder.Eval(Container.DataItem, "lastgrade"),DataBinder.Eval(Container.DataItem, "lastupdate"),DataBinder.Eval(Container.DataItem, "oldgrade")) %>
                        </div>
                        </a>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn SortExpression="Friends desc" DataFormatString="{0:#,###,###}" AllowSorting=true ShowSortIcon=true DataField=Friends HeaderText="מס' מעריצים" >
                                    <HeaderStyle HorizontalAlign="center" ></HeaderStyle>
                <ItemStyle HorizontalAlign="Center" ></ItemStyle>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn SortExpression="monuseract desc" DataFormatString="{0:N0}" AllowSorting=true ShowSortIcon=true DataField=monuseract HeaderText="מס' פעולות<br>משתמש" >
                                    <HeaderStyle HorizontalAlign="center" ></HeaderStyle>
                <ItemStyle HorizontalAlign="Center" ></ItemStyle>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn SortExpression="moncommentstouser desc" DataFormatString="{0:N0}" AllowSorting=true ShowSortIcon=true DataField=moncommentstouser HeaderText="תגובות<br>לפעולות" >
                                    <HeaderStyle HorizontalAlign="center" ></HeaderStyle>
                <ItemStyle HorizontalAlign="Center" ></ItemStyle>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn SortExpression="monlikestouser desc" DataFormatString="{0:N0}" AllowSorting=true ShowSortIcon=true DataField=monlikestouser HeaderText="לייקים<br>לפעולות" >
                                    <HeaderStyle HorizontalAlign="center" ></HeaderStyle>
                <ItemStyle HorizontalAlign="Center" ></ItemStyle>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn SortExpression="monfriendsact desc" DataFormatString="{0:N0}" AllowSorting=true ShowSortIcon=true DataField=monfriendsact HeaderText="מס' פעולות<br>חברים" >
                                    <HeaderStyle HorizontalAlign="center" ></HeaderStyle>
                <ItemStyle HorizontalAlign="Center" ></ItemStyle>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn SortExpression="moncommentstofriends desc" DataFormatString="{0:N0}" AllowSorting=true ShowSortIcon=true DataField=moncommentstofriends HeaderText="תגובות<br>לפעולות" >
                                    <HeaderStyle HorizontalAlign="center" ></HeaderStyle>
                <ItemStyle HorizontalAlign="Center" ></ItemStyle>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn SortExpression="monlikestofriends desc" DataFormatString="{0:N0}" AllowSorting=true ShowSortIcon=true DataField=monlikestofriends HeaderText="לייקים<br>לפעולות" >
                                    <HeaderStyle HorizontalAlign="center" ></HeaderStyle>
                <ItemStyle HorizontalAlign="Center" ></ItemStyle>
            </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn ItemStyle-HorizontalAlign="center" UniqueName="opencategory" HeaderText="קטגוריה">
                <HeaderStyle HorizontalAlign="center" Width="50"></HeaderStyle>
                <ItemStyle Wrap="true" Width="20"></ItemStyle>
                <ItemTemplate>
                       <div dir="rtl" style="white-space:normal;">
                        <%# GetCategoryName(DataBinder.Eval(Container.DataItem, "Cat")) %>
                        </div>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn ItemStyle-HorizontalAlign="center" UniqueName="category" Visible="false" HeaderText="עדכן קטגוריה">
                <HeaderStyle Width="50"></HeaderStyle>
                <ItemStyle Wrap="true" Width="20"></ItemStyle>
                <ItemTemplate>
                    <asp:ImageButton ID="ImageButton2" ImageUrl="~/Images/update3.png" runat="server" CommandName="Neg" >                          
                    </asp:ImageButton>
                    <asp:ImageButton ID="ImageButton1" ImageUrl="~/Images/Del.png" runat="server" CommandName="Pos" >                          
                    </asp:ImageButton>
                    <asp:ImageButton ID="ImageButton3" ImageUrl="~/Images/Ref1.png" runat="server" CommandName="ChangeType" >                          
                    </asp:ImageButton>
                    <asp:dropdownlist ID="DDL" runat="server">
                    <asp:ListItem Value="0" Text="לא מקוטלגים" />
                    <asp:ListItem Value="1" Text="חדשות" />
                    <asp:ListItem Value="2" Text="אופנה" />
                    <asp:ListItem Value="3" Text="טלוויזיה ורדיו" />                   
                    <asp:ListItem Value="4" Text="מוזיקה" />
                    <asp:ListItem Value="5" Text="ספורט" />
                    <asp:ListItem Value="6" Text="מחאה" />
                    <asp:ListItem Value="7" Text="דת" />               
                     <asp:ListItem Value="8" Text="בנקאות וביטוח" />                           
                    <asp:ListItem Value="9" Text="מזון" />
                    <asp:ListItem Value="10" Text="תקשורת ואלקטרוניקה" />
                    <asp:ListItem Value="11" Text="טואלטיקה" />
                    <asp:ListItem Value="12" Text="צעירים" />                   
                    <asp:ListItem Value="13" Text="רכב" />
                    <asp:ListItem Value="14" Text="חברות" />
                    <asp:ListItem Value="15" Text="מוסדות" />
                    <asp:ListItem Value="16" Text="ידוענים" />               
                    <asp:ListItem Value="17" Text="בידור" />
                    <asp:ListItem Value="18" Text="לא רלוונטיים" /> 
                    <asp:ListItem Value="19" Text="הורות" />
                    <asp:ListItem Value="20" Text="שונות" />                                           
                    </asp:dropdownlist>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
        </Columns>
       <NestedViewTemplate>
        <asp:Panel runat="server" ID="InnerContainer" Wrap="true">
        <table><tr><td style="white-space:normal;">
                    <telerik:RadTabStrip runat="server" ID="TabStip1" MultiPageID="Multipage1"
                    SelectedIndex="0">
                    <Tabs>
                        <telerik:RadTab runat="server" Text="תוכן הקיר לאחרונה" PageViewID="PageView1">
                        </telerik:RadTab>
                        <telerik:RadTab runat="server" Text="מעריצים/חברים פעילים" PageViewID="PageView2">
                        </telerik:RadTab>
                        <telerik:RadTab runat="server" Text="היסטוריה (גרפים)" PageViewID="PageView3">
                        <Tabs>
                        <telerik:RadTab runat="server" Selected=true Text="ציון משוקלל" PageViewID="PageView3">
                        </telerik:RadTab>
                        <telerik:RadTab runat="server" Text="מעריצים/חברים" PageViewID="PageView4">
                        </telerik:RadTab>
                        <telerik:RadTab runat="server" Text="פעולות משתמש" PageViewID="PageView5">
                        </telerik:RadTab>
                        <telerik:RadTab runat="server" Text="תגובות לפעולות משתמש" PageViewID="PageView6">
                        </telerik:RadTab>
                        <telerik:RadTab runat="server" Text="לייקים לפעולות משתמש" PageViewID="PageView7">
                        </telerik:RadTab>
                        </Tabs>
                        </telerik:RadTab>
                    </Tabs>
                </telerik:RadTabStrip>
                <telerik:RadMultiPage runat="server" ID="Multipage1" SelectedIndex="0" RenderSelectedPageOnly="false">
                    <telerik:RadPageView runat="server" ID="PageView1">
                        <br />
                            <%#CleanWall(DataBinder.Eval(Container.DataItem, "WallCont"), DataBinder.Eval(Container.DataItem, "TopUsers1"), DataBinder.Eval(Container.DataItem, "TopUsers2"), DataBinder.Eval(Container.DataItem, "TopUsers3"), DataBinder.Eval(Container.DataItem, "TopUsers4"), DataBinder.Eval(Container.DataItem, "TopUsers5"), DataBinder.Eval(Container.DataItem, "TopUsers6"), DataBinder.Eval(Container.DataItem, "TopUsers7"), DataBinder.Eval(Container.DataItem, "TopUsers8"), DataBinder.Eval(Container.DataItem, "TopUsers9") , DataBinder.Eval(Container.DataItem, "TopUsers10"))%>
                        <br />             
                    </telerik:RadPageView>
                    <telerik:RadPageView runat="server" ID="PageView2">
                            <telerik:RadGrid ID="RadGrid2" DataSourceID="SqlDataSource2" runat="server" Width="100%" PageSize="10"
     AllowMultiRowSelection="True" AllowPaging="true"
    GridLines="None" AutoGenerateColumns="False" Style="border: 0; outline:none;" Skin="Web20">
    <MasterTableView HierarchyLoadMode="ServerOnDemand" CommandItemDisplay=None Dir=RTL Width="100%" DataKeyNames="TopUsers1" AllowMultiColumnSorting="False">
         <PagerStyle Visible="false" />
        <Columns>
            <telerik:GridClientSelectColumn Visible="false" Reorderable="False" UniqueName="ClientSelectColumn">
           <HeaderStyle Width="30px"></HeaderStyle>
            </telerik:GridClientSelectColumn>
            <telerik:GridTemplateColumn UniqueName="PhotoUrl" Groupable="False">
                <HeaderStyle Width="35px"></HeaderStyle>
                <ItemStyle Height="35px"></ItemStyle>
                <ItemTemplate>
                    <a style="text-decoration:none" href="<%#converturl(DataBinder.Eval(Container.DataItem, "Url"))%>" target="_blank" >
                    <asp:Image ID="Image1" BorderWidth="0px" Width="55" Height="55" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "PhotoUrl") %>'
                        AlternateText="MediaType" Style="float: right; cursor: pointer;" runat="server">
                    </asp:Image>
                    </a>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
             <telerik:GridTemplateColumn UniqueName="UserName" HeaderText="שם משתמש">
                <HeaderStyle HorizontalAlign="right" ></HeaderStyle>
                <ItemStyle HorizontalAlign="right" Wrap="true" ></ItemStyle>
                <ItemTemplate>
                        <a style="text-decoration:none" href="<%#converturl(DataBinder.Eval(Container.DataItem, "Url"))%>" target="_blank" >
                    <div dir="rtl" style="white-space:normal;">
                        <%# DataBinder.Eval(Container.DataItem, "UserName") %>
                        </div>
                        </a>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn SortExpression="Friends desc" DataFormatString="{0:#,###,###}" AllowSorting=true ShowSortIcon=true DataField=Friends HeaderText="מס' חברים" >
                                    <HeaderStyle HorizontalAlign="center" ></HeaderStyle>
                <ItemStyle HorizontalAlign="Center" ></ItemStyle>
            </telerik:GridBoundColumn>
              <telerik:GridBoundColumn AllowSorting="false" DataFormatString="{0:#,###,###}" DataField="grade" HeaderText="ציון<br>משוקלל" >
                                    <HeaderStyle HorizontalAlign="center" ></HeaderStyle>
                <ItemStyle HorizontalAlign="Center" ></ItemStyle>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn SortExpression="monuseract desc" DataFormatString="{0:N0}" AllowSorting=true ShowSortIcon=true DataField=monuseract HeaderText="מס' פעולות<br>משתמש" >
                                    <HeaderStyle HorizontalAlign="center" Width="70" ></HeaderStyle>
                <ItemStyle HorizontalAlign="Center" ></ItemStyle>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn SortExpression="moncommentstouser desc" DataFormatString="{0:N0}" AllowSorting=true ShowSortIcon=true DataField=moncommentstouser HeaderText="תגובות<br>לפעולות" >
                                    <HeaderStyle HorizontalAlign="center" ></HeaderStyle>
                <ItemStyle HorizontalAlign="Center" ></ItemStyle>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn SortExpression="monlikestouser desc" DataFormatString="{0:N0}" AllowSorting=true ShowSortIcon=true DataField=monlikestouser HeaderText="לייקים<br>לפעולות" >
                                    <HeaderStyle HorizontalAlign="center" ></HeaderStyle>
                <ItemStyle HorizontalAlign="Center" ></ItemStyle>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn SortExpression="monfriendsact desc" DataFormatString="{0:N0}" AllowSorting=true ShowSortIcon=true DataField=monfriendsact HeaderText="מס' פעולות<br>חברים" >
                                    <HeaderStyle HorizontalAlign="center" Width="70" ></HeaderStyle>
                <ItemStyle HorizontalAlign="Center" ></ItemStyle>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn SortExpression="moncommentstofriends desc" DataFormatString="{0:N0}" AllowSorting=true ShowSortIcon=true DataField=moncommentstofriends HeaderText="תגובות<br>לפעולות" >
                                    <HeaderStyle HorizontalAlign="center" ></HeaderStyle>
                <ItemStyle HorizontalAlign="Center" ></ItemStyle>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn SortExpression="monlikestofriends desc" DataFormatString="{0:N0}" AllowSorting=true ShowSortIcon=true DataField=monlikestofriends HeaderText="לייקים<br>לפעולות" >
                                    <HeaderStyle HorizontalAlign="center" ></HeaderStyle>
                <ItemStyle HorizontalAlign="Center" ></ItemStyle>
            </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
    <ClientSettings AllowDragToGroup="False">
        <Selecting AllowRowSelect="True"></Selecting>
        <Scrolling AllowScroll="false"  UseStaticHeaders="True"></Scrolling>
        <ClientMessages />
    </ClientSettings>
</telerik:RadGrid>
        <asp:SqlDataSource EnableViewState="true" ID="SqlDataSource2" ConnectionString="Server=WIN-W15VZFMYJY7;Integrated Security=True;Database=DB11370;"
        ProviderName="System.Data.SqlClient" SelectCommand = "SELECT * from rfacebook where id=@TopUsers1 UNION ALL SELECT * from rfacebook_unrated where id=@TopUsers1 Order By Grade desc"
        runat="server">
            <SelectParameters>
                <asp:SessionParameter Name="TopUsers1" SessionField="TopUsers1" Type="String" />
            </SelectParameters>
                        </asp:SqlDataSource>
                    </telerik:RadPageView>
                            <telerik:RadPageView runat="server" ID="PageView3">
                            <%# DrawInfGraph(DataBinder.Eval(Container.DataItem, "id"),"grade")%>
                    </telerik:RadPageView>
                    <telerik:RadPageView runat="server" ID="PageView4">
                            <%# DrawInfGraph(DataBinder.Eval(Container.DataItem, "id"),"friends")%>
                    </telerik:RadPageView>
                    <telerik:RadPageView runat="server" ID="PageView5">
                            <%# DrawInfGraph(DataBinder.Eval(Container.DataItem, "id"),"monuseract")%>
                    </telerik:RadPageView>
                    <telerik:RadPageView runat="server" ID="PageView6">
                            <%# DrawInfGraph(DataBinder.Eval(Container.DataItem, "id"),"moncommentstouser")%>
                    </telerik:RadPageView>  
                       <telerik:RadPageView runat="server" ID="PageView7">
                            <%# DrawInfGraph(DataBinder.Eval(Container.DataItem, "id"),"monlikestouser")%>
                    </telerik:RadPageView>                       
                    </telerik:RadMultiPage>   
        </td></tr></table>           
        </asp:Panel>
       </NestedViewTemplate>
    </MasterTableView>
    <ClientSettings AllowDragToGroup="False">
        <Selecting AllowRowSelect="True"></Selecting>
        <Scrolling AllowScroll="true"  UseStaticHeaders="false" ScrollHeight="275px"></Scrolling>
        <ClientMessages />
    </ClientSettings>
</telerik:RadGrid>
Iana Tsolova
Telerik team
 answered on 11 Apr 2011
3 answers
238 views
Hi @

I am using Telerik:RadAjaxLoadingPanel to display the loading image on the screen when ever there is an ajaxify postback.

Following is the code:

<

 

telerik:RadAjaxLoadingPanel ID="radLoadingPnl" runat="server" AnimationDuration="300"

 

 

Style="vertical-align: middle;" HorizontalAlign="Center" EnableSkinTransparency="true"

 

 

BackgroundPosition="Center">

 

 

<img alt="Loading..." src="Images/loading.gif" style="border: 0px; vertical-align: middle;"

 

 

align="middle" />

 

 

</telerik:RadAjaxLoadingPanel>

 



//For displaying loading screen.

 

var loadingPanel = "";

 

 

 

var pageRequestManager = Sys.WebForms.PageRequestManager.getInstance();

 

 

 

var postBackElement = "";

 

 

pageRequestManager.add_initializeRequest(initializeRequest);

 

pageRequestManager.add_endRequest(endRequest);

 

 

function initializeRequest(sender, eventArgs) {

 

 

loadingPanel = $find(

'<% = radLoadingPnl.ClientID %>');

 

 

postBackElement = eventArgs.get_postBackElement().id;

 

loadingPanel.show(postBackElement);

 

}

 

 

function endRequest(sender, eventArgs) {

 

 

loadingPanel = $find(

'<% = radLoadingPnl.ClientID %>');

 

 

loadingPanel.hide(postBackElement);

 

}



But My Loading Image always appear next to the control because of which Ajax postback occured instead of Center of the screen.

Is there any property by which I can display the Loading image in the center of the screen for all the resolutions and for all the Ajax postbacks.

Please suggest.
Pavlina
Telerik team
 answered on 11 Apr 2011
2 answers
129 views
Hey Telerik community!

First off, I've done a lot of research on this topic. Seems I'm not the only one having trouble getting things to work inside a NestedViewTemplate. But all the posts I read dealt with having another RadGrid inside a NestedViewTemplate. My situation is a little different...

Problem

I have my own custom user control. It's very simple. If I put it INSIDE the NestedViewTemplate the postbacks don't work. If I put it OUTSIDE it works as expected.

Attached are some screen shots.

Here is the code for the simple user control:

ascx:
<telerik:RadTextBox OnTextChanged="First_Name_TextChanged" ID="tb_first_name" Width="120px" runat="server" AutoPostBack="True" />
code behind:
protected void First_Name_TextChanged(object sender, System.EventArgs e)
{
    if (!string.IsNullOrEmpty(tb_first_name.Text))
    {
        Profile.SetPropertyValue("profile_first", tb_first_name.Text);
        Profile.Save();
        ico_first_name.Text = CHECK_ICON;
    }
}

So my question is this:

How do I get that postback to actually do something, when it's inside the NestedViewTemplate?

-Josh

Iana Tsolova
Telerik team
 answered on 11 Apr 2011
1 answer
116 views
Is it possible to have 2 images on the radpanelitem? I would like an arrow on the left side that points down when the panel is expanded, and points to the right when the panel is not expanded. And then I would like an image on the right side that I change dynamically in the code. And of course in-between the 2 images I have the Text..
Kate
Telerik team
 answered on 11 Apr 2011
0 answers
110 views
im using herbinate-mapping to develope my web application project but i got trouble to connect to my server which stores my database, when i connect to th server it occurs an error it says "Access denied for user 'my current username'@'the ip server' to database 'my database'", i set the ip address to another server but it still gets the current ip server(localhost) to connect, anyone knows this issue please help me to resolve it, i wanna access the current server(192.168.1.191) but it still accesses to(192.168.1.190)(localhost)

here is the contents of my web.config file.

 
   <configSections>
        <section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate"/>
        <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
            <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                    <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
                    <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                </sectionGroup>
            </sectionGroup>
        </sectionGroup>
    </configSections>
    <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
        <session-factory>
            <property name="dialect">NHibernate.Dialect.MySQLDialect</property>
            <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
            <property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property>
            <property name="connection.connection_string">Server='192.168.1.191';Database='gamelog';User ID='username';Password='password'</property>
            <property name="connection.isolation">ReadCommitted</property>
            <mapping assembly="ManagementTool.DataAccess"/>
        </session-factory>
    </hibernate-configuration>
    <appSettings/>
    <connectionStrings/>


hope everyone to help me to fix this error, view the attach file for more details.
thanks in advance.
Le Duc Hieu
Top achievements
Rank 2
 asked on 11 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?