Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
151 views
There are a problem regarding to navigation and history point for me.
The needdatasource seems to be called prior than scriptmanager's Navigate event, thus when i addhistorypoint when changing page, view detail, and click the back button, it will reload twice and start with page 0 then the previous page.

any suggestions?

The design of grid as follows
                    <telerik:RadGrid SkinID="GridSkin" ID="AListingsGrid" runat="server" AllowPaging="True" 
                        AutoGenerateColumns="False" GridLines="None" AllowSorting="True" PageSize="10" 
                        ShowStatusBar="True" AllowCustomPaging="True" ShowHeader="false" ShowDesignTimeSmartTagMessage="False" 
                        EnableViewState="False"> 
                        <headercontextmenu enabletheming="True"> 
                            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                        </headercontextmenu> 
                        <pagerstyle alwaysvisible="false" mode="NextPrevAndNumeric" seopagingquerystringkey="CurrentPage" /> 
                        <mastertableview allowcustomsorting="True" cellspacing="-1" enableviewstate="False"> 
                            <SortExpressions> 
                            </SortExpressions> 
                            <Columns> 
                                <telerik:GridTemplateColumn UniqueName="Image"> 
                                    <ItemTemplate> 
                                        <asp:Panel ID="PanelListings" runat="server" CssClass="display"> 
                                            <div class="PImg"> 
                                                <asp:HyperLink ID="lnkImghyper" runat="server"> 
                                                    <div class="ListingImg"> 
                                                        <div class="propertyImg"> 
                                                            <asp:Image ID="ImageListingPhoto" runat="server" /> 
                                                        </div> 
                                                        <asp:Image CssClass="PSoldImg" ID="imgSold" runat="server" ImageUrl="~/Images/sold.gif" 
                                                            Visible="false" /> 
                                                    </div> 
                                                </asp:HyperLink> 
                                            </div> 
                                            <div id="PropertyInfo"> 
                                                <span class="price"> 
                                                    <asp:Label ID="LblPrice" runat="server" Text="Label"></asp:Label></span> <span class="PropertyAdd"> 
                                                        <asp:HyperLink ID="lnkGridSuburb" runat="server" Font-Bold="true"></asp:HyperLink> 
                                                    </span> 
                                                <br class="clear" /> 
                                                <asp:Label ID="lblAddress" CssClass="lstAddress" runat="server"></asp:Label> 
                                                <div class="adCopyTitle"> 
                                                    <asp:HyperLink ID="lnkAd" runat="server" Font-Bold="true"></asp:HyperLink> 
                                                </div> 
                                                <table class="listingsIcon"> 
                                                    <tr> 
                                                        <asp:Panel runat="server" ID="pnlBed"> 
                                                            <td> 
                                                                <asp:Label runat="server" ID="lblbed"></asp:Label> 
                                                                <asp:Image ID="Image6" runat="server" ImageUrl="~/Images/Stock/ADBed.png" alt="" 
                                                                    CssClass="propertiesIcon" /> 
                                                            </td> 
                                                        </asp:Panel> 
                                                        <asp:Panel runat="server" ID="pnlBath"> 
                                                            <td> 
                                                                <asp:Label runat="server" ID="lblShower"></asp:Label> 
                                                                <asp:Image ID="Image5" runat="server" ImageUrl="~/Images/Stock/ADBath.png" alt="" 
                                                                    CssClass="propertiesIcon" /> 
                                                            </td> 
                                                        </asp:Panel> 
                                                        <asp:Panel ID="pnlStudy" runat="server"> 
                                                            <td> 
                                                                <asp:Label ID="lblStudy" runat="server" Text=""></asp:Label> 
                                                                <asp:Image ID="Image11" runat="server" ImageUrl="~/Images/Stock/ADStudy.png" alt="" 
                                                                    CssClass="propertiesIcon" /> 
                                                            </td> 
                                                        </asp:Panel> 
                                                        <asp:Panel ID="PnlLivingIcon" runat="server" Visible="false"> 
                                                            <td> 
                                                                <asp:Label ID="LblCountLivingRoom" runat="server"></asp:Label> 
                                                                <asp:Image ID="Image4" runat="server" ImageUrl="~/Images/Stock/ADLounge.png" alt="" 
                                                                    CssClass="propertiesIcon" /> 
                                                            </td> 
                                                        </asp:Panel> 
                                                        <asp:Panel ID="pnlshowArea" runat="server"> 
                                                            <td> 
                                                                <asp:Label ID="lblshowArea" runat="server"></asp:Label> 
                                                                <asp:Image ID="Image12" runat="server" ImageUrl="~/Images/Stock/ADArea.png" alt="" 
                                                                    CssClass="propertiesIcon" /> 
                                                            </td> 
                                                        </asp:Panel> 
                                                        <asp:Panel ID="PnlGarageIcon" runat="server"> 
                                                            <td> 
                                                                <asp:Label ID="LblCountGarage" runat="server"></asp:Label> 
                                                                <asp:Image ID="Image3" runat="server" ImageUrl="~/Images/Stock/ADGarage.png" alt="" 
                                                                    CssClass="propertiesIcon" /> 
                                                            </td> 
                                                        </asp:Panel> 
                                                        <asp:Panel ID="PnlPoolIcon" runat="server"> 
                                                            <td> 
                                                                <asp:Label ID="LblCountPool" runat="server"></asp:Label> 
                                                                <asp:Image ID="Image2" runat="server" ImageUrl="~/Images/Stock/ADPool.png" alt="" 
                                                                    CssClass="propertiesIcon" /> 
                                                            </td> 
                                                        </asp:Panel> 
                                                        <asp:Panel ID="PnlAirconIcon" runat="server" Visible="false"> 
                                                            <td> 
                                                                <asp:Label ID="LblCountAircon" runat="server"></asp:Label> 
                                                                <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/Stock/aircon_icon.png" Width="30" 
                                                                    alt="" CssClass="propertiesIcon" /> 
                                                            </td> 
                                                        </asp:Panel> 
                                                    </tr> 
                                                </table> 
                                                <div class="Pdetail"> 
                                                    <asp:Label CssClass="Pdetail" ID="lnkDetail" runat="server" /> 
                                                </div> 
                                                <asp:Panel ID="Panel1" runat="server" Visible="false"> 
                                                    <span class="PTitle">ID#</span> <span class="PTitle"> 
                                                        <%#Eval("Href_No")%></span></asp:Panel> 
                                            </div> 
                                        </asp:Panel> 
                                    </ItemTemplate> 
                                </telerik:GridTemplateColumn> 
                            </Columns> 
                            <EditFormSettings> 
                                <PopUpSettings ScrollBars="None" /> 
                            </EditFormSettings> 
                        </mastertableview> 
                        <clientsettings> 
                            <Selecting AllowRowSelect="False" /> 
                            <Scrolling  AllowScroll="false" /> 
                        </clientsettings> 
                        <filtermenu enabletheming="True"> 
                            <CollapseAnimation Type="OutQuint" Duration="200" /> 
                        </filtermenu> 
                        <sortingsettings enableskinsortstyles="False" /> 
                        <statusbarsettings loadingtext="Loading Listings, please wait..." /> 
                    </telerik:RadGrid> 

and code calling
Private Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init 
        'Add History handler 
        Dim RadScriptManager1 = DirectCast(Me.Master.FindControl("RadScriptManager1"), RadScriptManager) 
        AddHandler RadScriptManager1.Navigate, AddressOf RadScriptManager1_Navigate 
    End Sub 
 
    Private Sub AListingsGrid_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles AListingsGrid.NeedDataSource 
'Get datasource 
end sub 
 
    Private Sub RadScriptManager1_Navigate(ByVal sender As Object, ByVal e As System.Web.UI.HistoryEventArgs) 
        If Not String.IsNullOrEmpty(e.State("CurrentPage")) Then 
            AListingsGrid.CurrentPageIndex = CInt(e.State("CurrentPage")) 
        Else 
            AListingsGrid.CurrentPageIndex = 0 
        End If 
 AListingsGrid.DataSource = Nothing 
        AListingsGrid.Rebind() 
end sub 

and live demo as follows

thanks
Pavlina
Telerik team
 answered on 23 Oct 2009
2 answers
82 views
Hello,

I have a GridDropdown column that looks like this:

 

<telerik:GridDropDownColumn DataField="Role_ID" DataType="System.Int32" DataSourceID="SqlDataSource2" ListValueField="Role_ID" ListTextField="RoleName" 
            HeaderText="Role" SortExpression="Role_ID" UniqueName="Role_ID"> 

The RoleName field from my datasource will display in the column instead of the actual Role_ID.  Is there any way I can turn the non-editmode forecolor of the RoleName to red when the value of Role_ID = 45?

Thanks for any help,
Heath

 

 

Mira
Telerik team
 answered on 23 Oct 2009
6 answers
116 views
I have a series of <div>s on my page to which I apply RadToolTips (by adding their ID's to the RadToolTipManager's TargetControls collection). They are positioned as "TopCenter"

All works fine - and has done for years, except, I cannot be sure of the height of the tooltips before the Ajax call since they will contain variable-length text data.<div>.

I set the tooltip height to "50px" but obviously, after the callback, the height can be mcuh greater. This means the Tooltips covered the target <div>. to overcome this, I had to set OffsetY to a value large enough to ensure this doesn't happen. But this means that shorter tooltips appear way above the target <div>.

My question: Is there a way to fix the position of variable height ToolTips so that they will always appear in the requested location relative to the target div? I feel that the Telrik control should do this automatically by calculating  the height of the ToolTip AFTER it has been populated but this doesn't seem to be the case!
Svetlina Anati
Telerik team
 answered on 23 Oct 2009
1 answer
86 views

Hi,

I have two different grids in same page. When i click on export button then data in both grids have to be exported into a PDF file.


Regards,
Satya
Princy
Top achievements
Rank 2
 answered on 23 Oct 2009
3 answers
114 views
Hi ,

I get an black item(box) on displaying of the menu items in IE8 it works fine in IE7 .
It does not work in Firefox too.

Here's the code
I simply added a rad menu to my aspx page
on page behind i added around 100 menu items and performed a databind
Here's the code

List

 

<string> menuItems = new List<string>();

 

 

for(int i=0;i<100;i++)

 

{

menuItems.Add(

"A"+i);

 

}

RadMenu1.DataSource = menuItems;

RadMenu1.DataBind();
and on _menu_ItemDataBound i do these

 

 

 

 

((Telerik.Web.UI.

RadMenuEventArgs)(e)).Item.BackColor = System.Drawing.Color.White;

 

((Telerik.Web.UI.

RadMenuEventArgs)(e)).Item.ForeColor = System.Drawing.Color.Black;

 

 

 

I want  the black items to disappear.
Thanks in advance.

Regards,
Francis P.

Yana
Telerik team
 answered on 23 Oct 2009
2 answers
100 views
Hello All,

    My requirement is as follows. i need to edit a dynamically generated grid ( in which in which i cannot write a editcolumn template) , because i cant define how many columns will be coming. Functionality is as follows, i have Employee leave data,  in grid I need to show Empid, DOJ, Name, Leave Type1, Leave Type2, Leave Type3......... as defined in masters. When i load the grid i get all emp details and leave types as columns names, here i need to enter values in each type for each employee. When i bring the grid into edit mode I should not be able to edit  first three columns and all others should be in edit mode.

Hope I am clear. Can this be done.
MKDurga Durga
Top achievements
Rank 1
 answered on 23 Oct 2009
1 answer
80 views
The ENTER and ESC keys aren't working in edit mode.  I do have another button in the form (outside of the grid) that I focus when the user first hits the page, but I would like the ENTER and ESC keys to work for Update and Cancel.

I already blocked the Enter key using info from this thread: http://www.telerik.com/community/forums/aspnet-ajax/grid/enter-key-hit-on-the-textbox-in-the-radgrid.aspx

Any idea how to make this work?

Thanks,
Andy
Sebastian
Telerik team
 answered on 23 Oct 2009
1 answer
137 views
Hello, I have a big Problem. I call the Fileexplorer with the Button from client side:

function OpenFileExplorerDialog(val) {  
            _globobjectartselect = val;  
            var wnd = $find("<%= ExplorerWindow.ClientID %>");  
            wnd.set_navigateUrl("../../filemanager/explorer.aspx?search=" + val);  
            wnd.show();  
        }  
 
function OnFileSelected(wnd, fileSelected) {  
            switch(_globobjectartselect)  
            {  
                case "Picture":  
                    var textbox = $find("<%= txtPictureFilePath.ClientID %>");  
                    textbox.set_value(fileSelected);  
                    break;  
                case "Video":  
                    var textbox = $find("<%= txtVideoFilePath.ClientID %>");  
                    textbox.set_value(fileSelected);  
                    break;  
            }  
        } 

I pass a parameter to the link wnd.set_navigateUrl(). This parameter is to set the search pattern.

Fileexplorer:

protected void Page_Load(object sender, EventArgs e)  
    {  
        if (Request.QueryString["search"] != null && Request.QueryString["search"] != "")  
        {  
            switch (Request.QueryString["search"])  
            {  
                case "Picture":  
                    string[] patterns1 = { "*.jpg", "*.jpeg", "*.gif", "*.png", "*.bmp" };  
                    RadFileExplorer1.Configuration.SearchPatterns = patterns1;  
                    break;  
                case "Video":  
                    string[] patterns2 = { "*.mpg", "*.mpeg", "*.avi", "*.divx", "*.wmv" };  
                    RadFileExplorer1.Configuration.SearchPatterns = patterns2;  
                    break;  
            }              
        }  
    } 

This works fine for one call. When i call the picture object first then its ok. In the second call the search patterns are soon the patterns from Picture. The Explorer does not load the new settings.

How can I solve the problem? Its very important for me.

Thank you

Reiner
Fiko
Telerik team
 answered on 23 Oct 2009
3 answers
214 views
How do I find the RadComboBox on Page_Load and disable it?  Thanks
Princy
Top achievements
Rank 2
 answered on 23 Oct 2009
4 answers
358 views
Hi !

I want to refresh the TREECONTEXT menu in the RAD FILEEXPLORER. How can I ?

I have a folder lists in the tree context menu , when I delete one of the FOLDER from the context menu, its does not gets deleted & seems to present there but  when I REFRESH my whole page then that particular folder gets deleted & not shown in the TREE CONTEXT MENU.

Please help me how to REFRESH the tree context menu or how to do past back to the server on to the click event of the delete button so the folder also gets deleted.

Please help ?
Ajay
Top achievements
Rank 2
 answered on 23 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?