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

i have created a filtering in grid with combobox. it work fine in IE anf mozilla. but it is not working in safari browser.

i also check telerik online demo in safari. it also create problem.
plz check this URL in safari. you can easily understand my problem.

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Programming/FilteringTemplateColumns/DefaultCS.aspx





Thanks &
regards

Mayur
Dimo
Telerik team
 answered on 08 Aug 2008
5 answers
616 views
Hello, hope someone can  help me find a decent soultion to my problem. I have a form with 4 different radDateTimePicker, they are used to create an event. For each entry I have to compare the Date and time of the previous entry. Because of the control format Compare Validator doesn't work.

I'm using radCalendar 2.2.5

Description of the 4 Date Time Pickers

1) Date that the Event will be published (today and future date)
2) Date the Event Start (GreaterThenEqual then #1 Date time Picker)
3) Date the Event End (GreatherThen then #2 Date Time Picker)
4) Date the Event is Archived (GreatherThen #3 Date Time Picker)

I've thought of using two different controls radDatePicker and radTimePicker, but I will have to add too much client side to the form. My form already have over 60 controls.

Any help suggestion is welcome.

Thanks, Mario
Mario Turcotte
Top achievements
Rank 1
 answered on 08 Aug 2008
3 answers
344 views
I was wondering if there is a sample (or if it's even possible) to change the tooltip values to a string value corresponding to the slide stops. 

For example, if my slider represents Good, Neutral, and Bad, can the tooltips display "Good" when the handle is dragged to the first position and "Bad" when in the last position?
Obi-Wan Kenobi
Top achievements
Rank 1
 answered on 08 Aug 2008
5 answers
179 views
Hi All,

Can anyone help?

I need to know how i can get the data from my selected row in my grid view. I need this value to repopulate my grid view with new data.

Can this be done in the same way as the standard grid view in VS using findcontrol("Name") or selectedrows.cells[0]?

Cheers

Jonny
Jonny Sheldrake
Top achievements
Rank 1
 answered on 08 Aug 2008
1 answer
99 views

Hi,

The ordering of multiple grouped columns does not work as expected. Specifically, attempting to drag (re-order) a column to the right of another column (in the group header) provides a visual representation, but upon releasing the mouse has no effect. However, reordering columns by dragging them to the left of other columns does work.

Likewise, attempting to group a new column by dragging it to the right of an already existing column does not provide a visual representation or have any effect.

The Grouping on-line demos exhibit the behavior described above.

I am using IE version 7.0.5730.13 and Firefox version 3.0.1.

Thanks for you assistance.

 

 

Rosen
Telerik team
 answered on 08 Aug 2008
3 answers
160 views
I have spent too much time trying to figure this out and I can't seem to get it to work, so I'm going to throw out a challenge :)

I have a simple RadGrid that contains one column, Employee Name that is drawn from a table called tUser. The value drawn is the employee ID which I convert to Employee Name through a left join in the SQL. When you click on Edit, the column changes to a drop-down column. The value for the list is the employee ID, the text for the list is the employee Name. These values are in a SQL table called tEmployee, but the selected value should be the one from tUser.

So this is all working fine...exactly the way I want, except for the fact that the tEmployee table contains 3000 entries. So I'd like to take this and apply the load on demand and filter=contains features of RadComboBox to it.

I can't seem to figure out how to combine these two things into a working control.

Any help? Thanks
Rosi
Telerik team
 answered on 08 Aug 2008
3 answers
185 views
My scenario:

I have a main page with a combo box in it that displays a list of customer names.  Under that are 2 buttons to "add" a new customer or "edit" the currently selected customer.  Now when the "add" button is clicked the server side Click event opens a RadWindow with a DetailsView in it that then allows me to specify the new customer's details.  Similarly, the edit button opens the same RadWindow/DetailsView but in edit mode.  In addition to the DetailsView are 2 buttons "OK" and "Cancel".  Since i am using buttons outside the DetailsView i am actually calling the DetailsView to Update/Insert from the server side event of the buttons in the RadWindow.

What i am having an issue with is updating the combo box when the RadWindow closes.  When i edit a customer, potentially the name changes so i need to update the combo box.  Also when i add a new customer i need to add the new name to the combo box.  In addition, i need the newly added customer to be selected.  Of course this will be ajaxified as i dont want the entire main page to update.

Now i have been doing a lot of searching and found related posts, such as opening an add/edit window from a grid, etc but after a lot of playing i have not found a solution that meets all the above criteria.  Rather than 'taint' the answer i am given with what i have tried, can you please tell me the most efficient and recommended approach to solving this scenario, specifically:

1) The best way to close the RadWindow and return
2) The best way to update the ComboBox (Rebind and Refresh)
3) The best way to select the entry in the ComboBox that was edited/added

thank you very much in advance for any assistance you can give.  Example code is always welcome :oI
Georgi Tunev
Telerik team
 answered on 08 Aug 2008
2 answers
379 views
Hi,

I have a page with a radTreeView and an ASP.NET ListView.  I have added a RadScriptManager and a RadAjaxManager and wired the two controls so that a click on a TreeView node causes the ListView to be refreshed via partial page update.

I have a RadWindow that is used to upload new images to the server and is communicating to the page via the OnClientShow and ClientCallBackFunction properties.

When the RadWindow closes I wish the ListView to be updated as if the TreeView node had been clicked, showing an updated list.

My callback function is as follows:
    function UploadCallback(radWindow,returnValue) 
      { 
      alert('radWindow callback!'); 
      // Simulate RadTreeView click 
      var ram = $find("<%= RadAjaxManager1.ClientID %>"); 
      ram.ajaxRequestWithTarget("<%= rtvFolders.UniqueID %>",""); 
      } 

The alert displays so I know the function is firing but nothing else seems to happen.

The full page is below, can anyone tell me why this is not working?  What have I missed?  Have I got the wrong objects?

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Test.aspx.vb" Inherits="Admin_Test" %> 
 
<!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>Test Page</title> 
  <link href="../Styles/Hammertime.css" rel="stylesheet" type="text/css" /> 
</head> 
<body> 
  <form id="form1" runat="server"
  <div> 
    <p>Use this page to browse the images in the library</p> 
    <!-- Script and Ajax Managers --> 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnablePageMethods="True" /> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" meta:resourcekey="RadAjaxManagerResource1"
      <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="rtvFolders" EventName="NodeClick"
          <UpdatedControls> 
            <telerik:AjaxUpdatedControl ControlID="lvFiles" /> 
          </UpdatedControls> 
        </telerik:AjaxSetting> 
      </AjaxSettings> 
    </telerik:RadAjaxManager> 
     
    <!-- Page layout with TreeView and ListView --> 
    <telerik:RadSplitter ID="RadSplitter1" runat="server" Width="99%" Height="500px" Skin="Telerik" Items-Capacity="4" meta:resourcekey="RadSplitter1Resource1" SplitBarsSize=""
      <telerik:RadPane ID="rpNavigation" runat="server" Width="200px" EnableEmbeddedBaseStylesheet="False" EnableEmbeddedSkins="False" Height="" Index="0" Skin=""
        <telerik:RadTreeView ID="rtvFolders" runat="server" CausesValidation="false" ValidationGroup="Folders"
          <WebServiceSettings Path="Images.aspx" Method="GetFolders" /> 
          <ExpandAnimation Duration="100" /> 
          <CollapseAnimation Duration="100" Type="OutQuint" /> 
        </telerik:RadTreeView> 
      </telerik:RadPane> 
      <telerik:RadSplitBar ID="rspNavigation" runat="server" EnableEmbeddedBaseStylesheet="False" EnableEmbeddedSkins="False" Index="1" Skin="" /> 
      <telerik:RadPane ID="rpFiles" runat="server" EnableEmbeddedBaseStylesheet="False" EnableEmbeddedSkins="False" Height="" Index="2" Skin="" Width=""
        <asp:ListView ID="lvFiles" runat="server" ItemPlaceholderID="phItemPlaceholder"
          <LayoutTemplate> 
            <asp:PlaceHolder ID="phItemPlaceholder" runat="server" /> 
          </LayoutTemplate> 
          <ItemTemplate> 
            <div class="imageThumbnail"
              <asp:PlaceHolder ID="phThumbnailImage" runat="server" /> 
            </div> 
          </ItemTemplate> 
        </asp:ListView> 
      </telerik:RadPane> 
    </telerik:RadSplitter> 
     
    <!-- ModalPopup panel image details --> 
    <asp:Panel ID="pnlImageDetail" runat="server" Style="display: none;" CssClass="modalPopup" meta:resourcekey="pnlImageDetailResource1"
      <div id="divImageDetailDragHandle" runat="server" class="modalPopupHeader"
        <div id="ImageDetailsCloseButton" runat="server" style="float: right; cursor: pointer;" title="Close this popup"
          [close]</div> 
        Image Details 
      </div> 
      <div id="divImageDetails" runat="server"
      </div> 
    </asp:Panel> 
    <asp:Button ID="btnDecoy" runat="server" Text="Decoy Button" Style="display: none;" meta:resourcekey="btnDecoyResource1" /> 
    <ajt:ModalPopupExtender ID="mpeImageDetail" runat="server" DynamicControlID="divImageDetails" DynamicServiceMethod="GetImageDetail" PopupControlID="pnlImageDetail" PopupDragHandleControlID="divImageDetailDragHandle" TargetControlID="btnDecoy" BackgroundCssClass="modalBackground" OkControlID="ImageDetailsCloseButton" DynamicServicePath="" Enabled="True" /> 
     
    <!-- Upload new image in radWindow --> 
    <input id="btnUploadImage" type="button" value="Upload New Image" /> 
    <telerik:RadWindow ID="rwUploadImage" runat="server" Behaviors="Close, Move, Resize" Height="350px" Modal="true" NavigateUrl="ImagesUpload.aspx" ClientCallBackFunction="UploadCallback" OnClientShow="OnUploadShow" OpenerElementID="btnUploadImage" ReloadOnShow="True" Skin="WebBlue" Title="Upload an Image" Width="600px" /> 
  </div> 
   
  <script type="text/javascript"
    function ShowImageDetail(imageId) 
      { 
      var imgDetail = $find("<%= mpeImageDetail.ClientID %>"); 
      if (imgDetail) 
        { 
        imgDetail.set_dynamicContextKey(imageId); 
        imgDetail.show(); 
        } 
      } 
       
    // Called when a radWindow is being shown. 
    function OnUploadShow(radWindow) 
      { 
      // Get current value of treeview 
      var tv  = $find("<%= rtvFolders.ClientID %>"); 
      var node = tv.get_selectedNode(); 
      if(node == null) 
        { 
        radWindow.close(); 
        alert('Please select a folder'); 
        } 
      else 
        { 
        var myLoc = node.get_value(); 
        // Create a new object to be used as an argument to the radWindow 
        var arg = new Object(); 
        arg.Location = myLoc
        //Set the argument object to the radWindow 
        radWindow.Argument = arg
        } 
      } 
       
    function UploadCallback(radWindow,returnValue) 
      { 
      alert('radWindow callback!'); 
      // Simulate RadTreeView click 
      var ram = $find("<%= RadAjaxManager1.ClientID %>"); 
      ram.ajaxRequestWithTarget("<%= rtvFolders.UniqueID %>",""); 
      } 
  </script> 
  </form> 
</body> 
</html> 
 

Imports System.IO 
Imports Telerik.Web.UI 
 
Partial Class Admin_Test 
    Inherits System.Web.UI.Page 
 
  Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load 
    If Not IsPostBack Then 
      Dim app As New Application 
      'Initital load of folders. 
      Dim rootFolder As DirectoryInfo = app.ImagesRootFolder 
      Dim nodes As New List(Of RadTreeNode) 
      For Each d In rootFolder.GetDirectories 
        Dim n As New RadTreeNode 
        n.Text = d.Name 
        n.Value = d.FullName 
        If d.GetDirectories.Count > 0 Then 
          n.ExpandMode = TreeNodeExpandMode.WebService 
        End If 
        nodes.Add(n) 
        n = Nothing 
      Next 
      rtvFolders.Nodes.AddRange(nodes) 
    End If 
  End Sub 
 
  <System.Web.Services.WebMethod()> _ 
  <System.Web.Script.Services.ScriptMethod()> _ 
  Public Shared Function GetImageDetail(ByVal contextKey As StringAs String 
    If IsNumeric(contextKey) Then 
      Dim i As New Attenda.Hammertime.Classes.Image(CInt(contextKey)) 
      Dim sb As New StringBuilder 
      sb.Append("<img src='../displayimage.aspx?iid=" & i.ID & "' alt='' title='' />"
      sb.Append("<p>" & i.FigureTitle & "<br />"
      sb.Append("Status: " & i.Status.ToString & "<br />"
      sb.Append("Size: " & (i.Size / 1024).ToString("N") & "KB<br />"
      sb.Append("Dimensions: " & i.Width & "x" & i.Height & "</p>"
      Return sb.ToString 
    Else 
      Return ("<p>Details could not be found for image '" & contextKey & "'.</p>"
    End If 
  End Function 
 
  <System.Web.Services.WebMethod()> _ 
  <System.Web.Script.Services.ScriptMethod()> _ 
  Public Shared Function GetFolders(ByVal node As RadTreeNodeData, ByVal context As ObjectAs RadTreeNodeData() 
    Dim parent As New DirectoryInfo(node.Value) 
    Dim results As New List(Of RadTreeNodeData) 
    For Each d In parent.GetDirectories 
      Dim rtnd As New RadTreeNodeData 
      rtnd.Text = d.Name 
      rtnd.Value = d.FullName 
      If d.GetDirectories.Count > 0 Then 
        rtnd.ExpandMode = TreeNodeExpandMode.WebService 
      End If 
      results.Add(rtnd) 
    Next 
    Return results.ToArray 
  End Function 
 
  Protected Sub rtvFolders_NodeClick(ByVal sender As ObjectByVal e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles rtvFolders.NodeClick 
    Dim app As New Attenda.Hammertime.Classes.Application 
    Try 
      Dim rootUrl As String = app.ImagesRootURL 
      Dim images As New Attenda.Hammertime.Classes.Images(New DirectoryInfo(e.Node.Value)) 
      Dim imageData = From img As Attenda.Hammertime.Classes.Image In images _ 
                      Select imageId = img.ID, _ 
                             imageUrl = rootUrl & img.Location & "/" & img.ThumbnailImageName, _ 
                             imageTitle = img.FigureTitle.Replace("'""&rsquo;"
      lvFiles.DataSource = imageData 
      lvFiles.DataBind() 
      ' Save current node to profile. 
      Profile.imageTreeNode = e.Node.Value 
    Catch ex As Exception 
      Attenda.Hammertime.Classes.Application.LogWarning(ex, Diagnostics.EventLogEntryType.Error
      Throw ex 
    Finally 
      app = Nothing 
    End Try 
  End Sub 
 
  Protected Sub lvFiles_ItemDataBound(ByVal sender As ObjectByVal e As System.Web.UI.WebControls.ListViewItemEventArgs) Handles lvFiles.ItemDataBound 
    If e.Item.ItemType = ListViewItemType.DataItem Then 
      Dim ph As PlaceHolder = CType(e.Item.FindControl("phThumbnailImage"), PlaceHolder) 
      Dim lvdi As ListViewDataItem = CType(e.Item, ListViewDataItem) 
      Dim dataitem = lvdi.DataItem 
      Dim img As New HtmlImage 
      img.Src = DataBinder.Eval(dataItem, "imageUrl"
      img.Attributes.Add("title", DataBinder.Eval(dataItem, "imageTitle")) 
      img.Attributes.Add("onclick""ShowImageDetail(" & DataBinder.Eval(dataItem, "imageID") & ")"
 
      ph.Controls.Add(img) 
 
    End If 
  End Sub 
 
End Class 
 
Nick
Top achievements
Rank 1
 answered on 08 Aug 2008
8 answers
619 views
I'm performing a request that can potentially take a couple of minutes to complete and I have a "Cancel" button available to the user if he doesnt want to wait.

I found a potential solution, but it doesn't work with the "Prometheus" controls : http://www.telerik.com/community/forums/thread/b311D-ttkba.aspx

The arguments for OnRequestStart don't have the XMLHttpRequest object for me to abort. Since this argument doesnt exist, is there another way I can cancel the ajax request while it's processing?

Here's what I tried to do:

I have my OnRequestStart function, assigned to my AjaxManager and i'm setting some variables outside the function to use in my Cancel button's click event. Cancel button is part of the Loading Panel, so only shows up when the request is sent.

var requestInProgress = null;
var currentLoadingPanel = "<%=LoadingPanel1.ClientID %>";
var currentUpdatedControl = "<%=UpdatedASPPanel.ClientID %>"

function OnRequestStart(sender, args)
{
    requestInProgress = args.XMLHttpRequest;
}
function CancelClick()
{
    requestInProgress.abort();
    currentLoadingPanel.Hide(currentUpdatedControl);
}
Ankit
Top achievements
Rank 1
 answered on 08 Aug 2008
1 answer
88 views
I am trying to export the contents of the radgrid in a csv file using the function

 ProductSplitGrid.MasterTableView.ExportToCSV();

However the csv file is only printing the GridBoundColumn like this below.

  <telerik:GridBoundColumn UniqueName="PL2" DataField="ProductLevel2" DataType="System.Int32" Visible="true" AllowFiltering="false" ItemStyle-Width="15%" HeaderText="Product Level 2">
                            <ItemStyle Width="8%"></ItemStyle>
                            </telerik:GridBoundColumn>


It is unable to print any GridTemplateColumn like this below:
 <telerik:GridTemplateColumn  UniqueName="Ship To" HeaderText="Customer" Visible="True" AllowFiltering="false" ItemStyle-Width="8%">
                              <ItemTemplate>
                              <telerik:RadComboBox ID="comboShipToID" runat="server" Width="250px" Height="200px"
                                   AllowCustomText="True" ShowToggleImage="True" ShowMoreResultsBox="true"
                                   EnableLoadOnDemand="True" MarkFirstMatch="True" OnItemsRequested="comboShipToID_ItemsRequested"
                                   Skin="WebBlue" EnableVirtualScrolling="true">
                              </telerik:RadComboBox>
                              </ItemTemplate>     
                              <ItemStyle Width="8%"></ItemStyle>
                          </telerik:GridTemplateColumn> 



Could anybody help me in this regard.
Sebastian
Telerik team
 answered on 08 Aug 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?