Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
65 views
Hi,

I have been trying to customize the FilterMenu items for different columns in a RadGrid. I want it based on the Data Field associated with the column. I am able to implement it but the problem is with the behavior of the menu items. Items seem to be clipped inside the menu. I mean the hover effect is not properly setting the background color of the current item. Although, on removing the javascript code (to hide the filter functions), the filter menu behaves as expected.

I am attaching the snapshots. I have used the code used in this demo :
http://www.telerik.com/help/aspnet-ajax/grid-reducing-filtermenu-options.html

I want to customize the FilterMenu items based on the column name, Left align them and have a constant look and feel(as described in snapshots) for the hover effect.
Any form of help will be appreciated.

Regards,
Anup
Anup
Top achievements
Rank 1
 answered on 26 Mar 2012
3 answers
56 views
Hello, If i use a Custom Provider with the fileexplorer i can Not select Files in the fileview. This also does Not work in the examples. Any workaround? Tanks Thorsten
Dobromir
Telerik team
 answered on 26 Mar 2012
1 answer
153 views
'I want do download the corresponding file when i click the grid Image button
'Here i paste my code. it shows this bug(shows in attachment)


Protected
Sub ExplorerGrid_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles VersionGrid.ItemCommand
        Dim objGridDataItem As GridDataItem = CType(e.Item, GridDataItem)
 
        Dim stringVersion As String
        stringVersion = objGridDataItem.Item("Version").Text
 
        Dim stringPath As String = Request.QueryString("filepath")
        Dim temppath As String = stringPath.Substring(0, stringPath.LastIndexOf("\"))
        Dim filename As String = stringPath.Substring(stringPath.LastIndexOf("\") + 1)
        filename = filename.Replace("'", "''")
        Dim sqlcon As New SqlConnection(ConfigurationManager.ConnectionStrings("MyConnection").ToString())
 
        Dim objSqlDASec As New SqlDataAdapter("select * from Sample where [DocumentName]= '" + filename + "'", sqlcon)
        objSqlDASec.SelectCommand.CommandTimeout = 1200
 
        Dim objDTSec As New DataSet
        objDTSec.Clear()
 
        objSqlDASec.Fill(objDTSec)
 
        Dim buffer As Byte()
 
        buffer = objDTSec.Tables(0).Rows(0)("Document")
 
        Try
 
            Dim req As New WebClient
            Dim response As HttpResponse
            response = HttpContext.Current.Response
            response.Clear()
            response.ClearContent()
            response.ClearHeaders()
            response.Buffer = True
            response.AddHeader("Content-Disposition", "attachment; filename=" + filename)
            response.ContentType = "application/octet-stream"
            response.BinaryWrite(buffer)
            response.Flush()
            response.End()
 
 
        Catch ex As Exception
 
        End Try
    End Sub
Pavlina
Telerik team
 answered on 26 Mar 2012
6 answers
194 views
Hi,

im trying to extract the value of a radcombobox. Previously this value was stored in a regular asp textbox, then I could do like this to get the last part of the string value in js.

Right(document.getElementById('Mybox').value, 5) < 1000

this number is built up like so. 'project-module-1xxx'

I.E I only want to get values that are higher than 1000. How can I get the same functionality from a radcombobox ?

I tried with

Right($find("Mybox").get_text(), 5) < 1000) but that didnt recognize the right functionality.

all help appreciated,

 

 


Terje Sondresen
Top achievements
Rank 1
 answered on 26 Mar 2012
2 answers
132 views
Hi all.

I have the list and grid view and using the designer is okay however on numerous occasions if you click on edit web part, the view selected changes and shows the wrong title in edit mode receive regular errors like;

Server Error in '/' Application.
--------------------------------------------------------------------------------
 
The specified view is invalid.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
 
Exception Details: System.ArgumentException: The specified view is invalid.
 
Source Error:
 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 
 
Stack Trace:
 
 
[ArgumentException: The specified view is invalid.]
   Microsoft.SharePoint.SPViewCollection.get_Item(Guid guid) +26039668
   Telerik.Ajax.SharePoint.TelerikDataBoundWebPart.get_CurrentView() +321
   Telerik.Ajax.SharePoint.SPListBoundRadControlToolPart.SetUpListViewCombo() +725
   System.Web.UI.Control.EnsureChildControls() +146
   System.Web.UI.Control.PreRenderRecursiveInternal() +61
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3394
 
  
 
 
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.4963; ASP.NET Version:2.0.50727.4971

Marin
Telerik team
 answered on 26 Mar 2012
2 answers
59 views
Hi all,

I'm using RadTreeView1.GetXml to save the state of my TreeView and repopulate it after postbacks.

I've done a test by replaceing text in a node, and based on that I can tell that saving and repopulating the TreeView is working fine.

The problem is that when I contract some of the nodes, then select(Click on) a node, there is a posteback, and all the nodes are revertted to thier expanded state again.

Expanding and contracting nodes seems to be happening on the client side,  as there is no postback when this happens.
The postback dose happen when I click on a spesific node, that is when I use GetXml to save the state, but it dose not seem to be saving the updated state on the nodes.

Here is the code, Please let me know what I am missing here.
<telerik:RadTreeView ID="RadTreeView1" Runat="server"
    OnNodeClick="RadTreeView1_NodeClick" EnableDragAndDrop="True" Skin="Vista"
    OnContextMenuItemClick="RadTreeView1_ContextMenuItemClick"
    OnNodeEdit="RadTreeView1_NodeEdit" OnNodeDrop="RadTreeView1_HandleDrop"
    SingleExpandPath="True" EnableViewState="true" >
    <ContextMenus>
             <telerik:RadTreeViewContextMenu ID="RightClick" runat="server">
                <Items>
                <telerik:RadMenuItem Value="NewParentNode" Text="Create New Parent Folder" >
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem Value="NewNode" Text="Create New Folder" >
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IsSeparator="true">
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem Value="NewVirtualDocument" Text="New Virtual Document" >
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem Value="UploadPDF" Text="Upload PDF" >
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IsSeparator="true">
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem Value="DeleteNode" Text="Delete Folder" >
                    </telerik:RadMenuItem>
                </Items>
                <CollapseAnimation Type="none" />
            </telerik:RadTreeViewContextMenu>
      </ContextMenus>
</telerik:RadTreeView>
and server side
protected void RadTreeView1_NodeClick(object sender, RadTreeNodeEventArgs NodeEvent)
{
    clickedNode = NodeEvent.Node;
    ViewState["ClickedNode"] = clickedNode.Value.ToString();
    createDynamicTable(Convert.ToInt32(ViewState["ClickedNode"].ToString()));
 
    string savetreeViewState = RadTreeView1.GetXml();
    savetreeViewState = savetreeViewState.Replace("South Africa", "save state is working");
    Session["myTreeView"] = savetreeViewState;
 }

Thank you for your time.
Carl
Top achievements
Rank 1
 answered on 26 Mar 2012
1 answer
83 views
So, here's my scenario - in our app, the content of the window can very likely change, so what I've done is added the following to the pages being opened:

function pageLoad() { fixWindow(); }
 
function fixWindow() {
  // Fix the height to show the buttons in the right place.
  var oWnd = GetRadWindow();
  var contentHeight = $('#mainContent').height();
  var newHeight = contentHeight + 10;
  var windowWidth = oWnd.get_width();
  $('#popupWrapper').height(newHeight);
  $('#popupWrapper').width(windowWidth - 75);
  var windowHeight = newHeight + 105;
  oWnd.set_height(windowHeight + "px");
  // if (oWnd != null) {
      // oWnd.center();
  // }
}

This works great, except that if I then try to center the window every time, the window will remain open after a postback. How can I correct this so that the window gets centred and works normally?

(Side note: We tried using the auto-size, but it never did a great job of keeping the window sized properly).

Thanks,
Kori
Marin Bratanov
Telerik team
 answered on 26 Mar 2012
3 answers
201 views
I have list of products displayed in a RadListView. I would like to group those products by Category (where Category is a property of the Product class)
Is that even possible using RadListView?

In your samples, you only have basic grouping using a predefined number of items per group.
Thanks,
Gary


Here is the code I'm using:
<telerik:RadListView ID="listViewProducts" runat="server"
       onneeddatasource="listViewProducts_NeedDataSource" ItemPlaceholderID="ProductsHolder"        
      DataKeyNames="ProductCatalogID" >
                 <AlternatingItemTemplate>
                 <div class="rlvA" style="height: 160px; width: 200px; margin-top: 5px;
                               margin-right: 5px; margin-bottom: 5px; padding-left: 5px;">
                               <table cellpadding="1" cellspacing="1" border="0" width="200">
                                   <tr style="height:60px;">
                                   <td class="header4" ><%#Eval("Products")%></td>
                                   </tr>
                                   <tr>
                                   <td align="center"><%--<asp:ImageButton ID="ImageButton2" ImageUrl="~/Images/Product.jpg" PostBackUrl='<%# Eval("Link")%>' runat="server" target="_blank" />--%>
                                   <asp:ImageButton ID="ImageButton1" ImageUrl="~/Images/Product.jpg"  runat="server" OnClientClick=<%# "window.open('" + Eval("Link") + "','',''); return false;" %>  /></td>
                                   </tr>
                               </table>
                                       
 
                           </div>
                       </AlternatingItemTemplate>
                       <ItemTemplate>
                       <div class="rlvI" style="height: 160px; width: 200px; margin-top: 5px;
                               margin-right: 5px; margin-bottom: 5px; padding-left: 5px;">
                               <table cellpadding="1" cellspacing="1" border="0" width="200">
                                   <tr style="height:60px;">
                                   <td class="header4"><%#Eval("Products")%></td>
                                   </tr>
                                   <tr>
                                   <td align="center"><asp:ImageButton ID="ImageButton3" ImageUrl="~/Images/Product.jpg"  runat="server" OnClientClick=<%# "window.open('" + Eval("Link") + "','',''); return false;" %>  /></td>
                                   </tr>
                               </table>
                                
                       
                        
                       </div>
                       
                       </ItemTemplate>
                       <EmptyDataTemplate>
                           <div class="RadListView RadListView_Windows7">
                               <div class="rlvEmpty">
                                   There are no items to be displayed.</div>
                           </div>
                       </EmptyDataTemplate>
                       <LayoutTemplate>
                           <div style="width:1150px;" class="RadListView RadListViewFloated RadListView_Windows7">
                               <div class="rlvFloated rlvAutoScroll">
                                   <div id="Div1" runat="server">
                                     <div id="ProductsHolder" runat="server">
                                   </div>
                               </div>
 
                           </div>
                       </LayoutTemplate>
                      
      
   </telerik:RadListView>
Vasil
Telerik team
 answered on 26 Mar 2012
4 answers
127 views
Hi,

I've just upgraded to the latest and greatest ASP.Net AJAX controls and everything works fine apart from the image that is displayed in the image editor. When I click an image in the image manager the image is displayed fine but when I click the image editor button the image briefly appears but then is replaced by a broken image symbol. If I save the broken image, it then displays fine as a new image within the image manager. I am not using a custom content provider.

Attached is a screen shot showing the image editor.

Any ideas?

Thanks

Tim Metcalfe
Danny
Top achievements
Rank 1
 answered on 26 Mar 2012
3 answers
294 views
Hello,

Am having radtreeview on my webpage for which i want to add folder icon before every node.
how to achieve that?

 

 

<telerik:RadTreeView ID="RadTreeViewSource" runat="server" Height="580px"

 

 

 

OnNodeClick="RadTreeViewSource_NodeClick" >

 

 

 

<DataBindings>

 

 

 

<telerik:RadTreeNodeBinding Expanded="false" />

 

 

 

</DataBindings>

 

 

 

</telerik:RadTreeView>

Above is my code.
am binding treeview in codebehind with datattable value.

Thanks,
Mugdha

 

Bozhidar
Telerik team
 answered on 26 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?