Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
68 views
Trying to force a child grid into in-line edit mode based upong a rowclick on the client.

Using rowclick fires for the parent grid (really don't want that to happen) and I get a Javascript "Object Required" error when I click on the child grid row.  The JS function I'm using looks like this:

<

 

script type="text/javascript">

 

 

function RowClick(sender, eventArgs) {

 

 

alert("Click on row instance: " + eventArgs.get_itemIndexHierarchical());

 

sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());

 

 

}

 

 

 

</script>

How can I stop the click on the parent and actually have it not generate and start the in-line edit on the client?    

 

Shinu
Top achievements
Rank 2
 answered on 03 Mar 2011
1 answer
328 views
Hi Telerik,

So, I encountered the issue where I would change a RadComboBox's selection programmatically client-side and it would trigger a postback when unwanted.

I came up with this solution, but I do not know if this is best practice. If not, what other options do I have? If so, cheers to anyone else who can use it.

1) Turn RadComboBox autopostback to false.

<script type="text/javascript">
    var doPostback = true;
    function pageLoad() {
        doPostback = false;
        $find("<%= RadComboBox1.ClientID %>").findItemByValue("YourItemHere").select();
        doPostback = true;
     }
 
      function OnClientSelectedIndexChanged(sender, eventArgs) {
          if (doPostback) {
              __doPostBack('RadComboBox1', '');
          }
     }
 </script>
Shinu
Top achievements
Rank 2
 answered on 03 Mar 2011
1 answer
50 views
I have a grid. When a "select"a row I fire a refresh of some of the panels in the webform. But when I move between the pages of the grid or order by one the columns, also the grid is firing the refresh of the panel.

How can I refresh the panel only when I "select" the row, and not for all the grid events.

<telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server">
<AjaxSettings>
    <telerik:AjaxSetting AjaxControlID="grdOne" >
        <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="txtOne" LoadingPanelID="RadAjaxLoadingPanel3" />
            <telerik:AjaxUpdatedControl ControlID="pnlOne" LoadingPanelID="RadAjaxLoadingPanel3" />
        </UpdatedControls>
    </telerik:AjaxSetting>

Tsvetina
Telerik team
 answered on 03 Mar 2011
0 answers
56 views
Hi,

To start It's usefull to know that I'm a beginner with the radfileexplorer component :)

I have a problem with the radfileexplorer I use a customfileprovider to manage a folder on a distant network.

Sample code

 

 

 

Partial Public Class Plans
    Inherits System.Web.UI.Page
  
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
  
        Master.pgmCurrentMenu = "Plans"
        Master.InitBanner()
    End Sub
  
    Private Sub RadFileExplorer1_ExplorerPopulated(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadFileExplorerPopulatedEventArgs) Handles RadFileExplorer1.ExplorerPopulated
        Dim result As List(Of FileBrowserItem) = New List(Of FileBrowserItem)
  
        For Each item In e.List
            If item.Name.ToUpper.Contains(TextBox1.Text.ToUpper) Then
                result.Add(item)
            End If
        Next
  
        e.List = result
    End Sub
    Private Sub RadFileExplorer1_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadFileExplorerEventArgs) Handles RadFileExplorer1.ItemCommand
        Dim Utilisateur As String
        Dim Fichier As New Gestion_FichierUpload
        Utilisateur = Master.pgmInfoUser.Login
        Master.pgmCurrentMenu = "BEPLAN"
        Master.InitBanner()
        'MsgBox(e.Command.ToString)
        'MsgBox(e.NewPath.ToString)
        'MsgBox(e.Path.ToString)
        Select Case e.Command
            Case "UploadFile"
                If (e.Path = e.NewPath) Then
                    Fichier.Add_Fichier_Sql(e.Path.ToString, Utilisateur, "Ecraser")
                Else
                    Fichier.Add_Fichier_Sql(e.Path.ToString, Utilisateur, "Telecharger")
                End If
            Case "MoveDirectory"
                Fichier.Renommer_Dossier(e.Path, e.NewPath, Utilisateur)
            Case "CreateDirectory"
                Fichier.Add_Repertoire_Sql(e.Path.ToString & e.NewPath.ToString, Utilisateur)
            Case "DeleteFile"
                Fichier.Copie_Corbeille(e.Path, e.NewPath)
                Fichier.Supp_Fichier_Sql(e.Path, Utilisateur)
            Case "MoveFile"
                Fichier.Renommer_Fichier(e.Path, e.NewPath, Utilisateur)
            Case "DeleteDirectory"
                Fichier.Supp_Repertoire_Sql(e.Path.ToString, Utilisateur)
            Case Else
        End Select
  
  
        Dim viewPaths As String() = New String() {""}
  
        Dim test As New Gestion_FichierUpload
  
  
        If RadFileExplorer1.CurrentFolder <> "Donnees BE/" & RadComboBox1.SelectedValue.ToString And RadFileExplorer1.CurrentFolder IsNot Nothing Then
  
            Dim s1 As String = ""
  
            s1 = RadFileExplorer1.CurrentFolder
  
            viewPaths = New String() {RadFileExplorer1.CurrentFolder}
  
            RadFileExplorer1.Visible = True
            RadFileExplorer1.TreeView.Nodes.Clear()
            RadFileExplorer1.Configuration.ViewPaths = viewPaths
            RadFileExplorer1.Configuration.UploadPaths = viewPaths
            RadFileExplorer1.Configuration.DeletePaths = viewPaths
            RadFileExplorer1.TreeView.MaxDataBindDepth = 30
            RadFileExplorer1.DisplayUpFolderItem = True
            RadFileExplorer1.EnableCopy = True
            RadFileExplorer1.EnableCreateNewFolder = True
            RadFileExplorer1.Language = "fr-FR"
            RadFileExplorer1.Configuration.MaxUploadFileSize = 100000000
            RadFileExplorer1.AllowPaging = True
            RadFileExplorer1.Visible = True
            RadFileExplorer1.InitialPath = s1
  
            RadFileExplorer1.Configuration.ContentProviderTypeName = GetType(CustomFileSystemProvider).AssemblyQualifiedName
  
  
        End If
  
        If RadComboBox1.SelectedValue <> Session.Item("ComboValue") Then
  
            Dim s1 As String = ""
  
            s1 = RadFileExplorer1.CurrentFolder
  
            Session.Clear()
            Session.Add("ComboValue", RadComboBox1.SelectedValue)
            viewPaths = New String() {test.Get_Repertoire(RadComboBox1.SelectedValue.ToString)}
            RadFileExplorer1.Visible = True
            RadFileExplorer1.TreeView.Nodes.Clear()
            RadFileExplorer1.Configuration.ViewPaths = viewPaths
            RadFileExplorer1.Configuration.UploadPaths = viewPaths
            RadFileExplorer1.Configuration.DeletePaths = viewPaths
            RadFileExplorer1.TreeView.MaxDataBindDepth = 30
            RadFileExplorer1.DisplayUpFolderItem = True
            RadFileExplorer1.EnableCopy = True
            RadFileExplorer1.Language = "fr-FR"
            RadFileExplorer1.Configuration.MaxUploadFileSize = 100000000
            RadFileExplorer1.AllowPaging = True
            RadFileExplorer1.EnableCreateNewFolder = True
            RadFileExplorer1.InitialPath = s1
  
            RadFileExplorer1.Configuration.ContentProviderTypeName = GetType(CustomFileSystemProvider).AssemblyQualifiedName
  
  
  
        End If
  
  
  
  
  
    End Sub
    Private Sub RadFileExplorer1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadFileExplorer1.Load
  
        Dim viewPaths As String() = New String() {""}
  
        Dim test As New Gestion_FichierUpload
  
        Dim Utilisateur As String = Master.pgmInfoUser.Autorisation
  
  
        If IsPostBack Then
  
  
            If RadFileExplorer1.CurrentFolder <> "Donnees BE/" & RadComboBox1.SelectedValue.ToString And RadFileExplorer1.CurrentFolder IsNot Nothing Then
  
                Dim s1 As String = ""
  
                s1 = RadFileExplorer1.CurrentFolder
  
                viewPaths = New String() {RadFileExplorer1.CurrentFolder}
  
                RadFileExplorer1.Visible = True
                RadFileExplorer1.TreeView.Nodes.Clear()
                RadFileExplorer1.Configuration.ViewPaths = viewPaths
                RadFileExplorer1.Configuration.UploadPaths = viewPaths
                RadFileExplorer1.Configuration.DeletePaths = viewPaths
                RadFileExplorer1.TreeView.MaxDataBindDepth = 30
                RadFileExplorer1.DisplayUpFolderItem = True
                RadFileExplorer1.EnableCopy = True
                RadFileExplorer1.EnableCreateNewFolder = True
                RadFileExplorer1.Language = "fr-FR"
                RadFileExplorer1.Configuration.MaxUploadFileSize = 100000000
                RadFileExplorer1.AllowPaging = True
                RadFileExplorer1.Visible = True
                RadFileExplorer1.InitialPath = s1
  
                RadFileExplorer1.Configuration.ContentProviderTypeName = GetType(CustomFileSystemProvider).AssemblyQualifiedName
  
  
            End If
  
            If RadComboBox1.SelectedValue <> Session.Item("ComboValue") Then
  
                Dim s1 As String = ""
  
                s1 = RadFileExplorer1.CurrentFolder
  
                Session.Clear()
                Session.Add("ComboValue", RadComboBox1.SelectedValue)
                viewPaths = New String() {test.Get_Repertoire(RadComboBox1.SelectedValue.ToString)}
                RadFileExplorer1.Visible = True
                RadFileExplorer1.TreeView.Nodes.Clear()
                RadFileExplorer1.Configuration.ViewPaths = viewPaths
                RadFileExplorer1.Configuration.UploadPaths = viewPaths
                RadFileExplorer1.Configuration.DeletePaths = viewPaths
                RadFileExplorer1.TreeView.MaxDataBindDepth = 30
                RadFileExplorer1.DisplayUpFolderItem = True
                RadFileExplorer1.EnableCopy = True
                RadFileExplorer1.Language = "fr-FR"
                RadFileExplorer1.Configuration.MaxUploadFileSize = 100000000
                RadFileExplorer1.AllowPaging = True
                RadFileExplorer1.EnableCreateNewFolder = True
                RadFileExplorer1.InitialPath = s1
  
                RadFileExplorer1.Configuration.ContentProviderTypeName = GetType(CustomFileSystemProvider).AssemblyQualifiedName
  
  
  
            End If
  
        Else
  
            viewPaths = New String() {"Donnees BE/140"}
            RadFileExplorer1.TreeView.Nodes.Clear()
            RadFileExplorer1.Configuration.ViewPaths = viewPaths
            RadFileExplorer1.Configuration.UploadPaths = viewPaths
            RadFileExplorer1.Configuration.DeletePaths = viewPaths
            RadFileExplorer1.TreeView.MaxDataBindDepth = 30
            RadFileExplorer1.DisplayUpFolderItem = True
            RadFileExplorer1.EnableCopy = True
            RadFileExplorer1.EnableCreateNewFolder = True
            RadFileExplorer1.Language = "fr-FR"
            RadFileExplorer1.Configuration.MaxUploadFileSize = 100000000
            RadFileExplorer1.AllowPaging = True
            RadFileExplorer1.Visible = False
  
            RadFileExplorer1.Configuration.ContentProviderTypeName = GetType(CustomFileSystemProvider).AssemblyQualifiedName
  
  
        End If
  
  
    End Sub
  
    Private Sub TextBox1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.Load
        TextBox1.AutoPostBack = True
    End Sub
  
    Private Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
        TextBox1.AutoPostBack = True
  
  
    End Sub
    Private Sub RadComboBox1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadComboBox1.Load
  
  
        RecursiveSearch2("\\vm-cham-files2\Share$\Plans\PLANS BE\", RadComboBox1)
  
  
    End Sub
    Private Function RecursiveSearch2(ByVal path As String, ByVal Radcombobox As RadComboBox) As List(Of String)
  
        Dim repertoires As New List(Of String)
        Dim dirInfo As New IO.DirectoryInfo(path)
        Dim fileObject As FileSystemInfo
        Dim compteur As Integer = 0
  
        compteur = dirInfo.GetFileSystemInfos().Length
  
        For Each fileObject In dirInfo.GetFileSystemInfos()
  
            Dim rdcbbox As New RadComboBoxItem
  
            rdcbbox.Value = fileObject.Name
            rdcbbox.Text = fileObject.Name
  
            Radcombobox.Items.Add(rdcbbox)
        Next
  
        Return repertoires
    End Function
End Class


My main problem occurs when I try to upload or create new folder on nodes deeper than 2

Example:
        Folder1                          Buttons (Upload and CreateNewFolder) enabled
                    -Folder2                          Buttons (Upload and CreateNewFolder) enabled
                    -Folder3                          Buttons (Upload and CreateNewFolder) enabled
                                    -Folder4                        Buttons (Upload and CreateNewFolder) disabled
                                    -Folder5                        Buttons (Upload and CreateNewFolder) disabled


Thanx for your help

 

 

Terrier Maxandre
Top achievements
Rank 1
 asked on 03 Mar 2011
1 answer
64 views
Hi,

We have migrate Visual Studio 2005 to Visual Studio 2010 recently but we have to keep the framework 2.0.
Now, we have some errors like "Microsoft JScript runtime error: Sys.ArgumentException: Value must not be null for Controls and Behaviors."
The problem occur with Internet Explorer 8

We use RadControls for ASP.NET AJAX.

I will give you a specific example.
We have a master page with the script manager.
----------------------------------------------------
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"></asp:ScriptManager>
----------------------------------------------------
In the content page, we use a ModalPopupExtender in a child page when a user click on a button into a list.
When the button is click, we receive the error "Microsoft JScript runtime error: Sys.ArgumentException: Value must not be null for Controls and Behaviors."

This is the code for the content page 
----------------------------------------------------
<telerik:RadAjaxPanel id="pnlPackage" runat="server">
                    <asp:Label ID="lblPopUpUsing" runat="server" Text="" CssClass="BlackArial10"></asp:Label>
                     <asp:Panel ID="pnlCopyPackage" runat="server" style="display:none">
                        <asp:Panel ID="pnlCopy" runat="server" CssClass="ModalWindowNoPadding" BackColor="White">
                          <uc:CopyPackageControl ID="copyPackageControl" runat="server" OnOnCopyPackage="copyPackageControl_OnCopyPackage"></uc:CopyPackageControl>
                        </asp:Panel>
                    </asp:Panel>


                    <cc2:ModalPopupExtender ID="CopyPackagePopupExt" runat="server" 
                        TargetControlID="lblPopUpUsing" 
                        PopupControlID="pnlCopyPackage" 
                        BackgroundCssClass="ModalBackground">
                    </cc2:ModalPopupExtender>
                    <cc3:SOFGrid ID="gdvPackages" runat="server"  AutoGenerateColumns="false" Skin="SOF" AllowCustomPaging="True"  
                                 PageSize="20" EnableEmbeddedSkins="false" AllowPaging="True" BorderWidth="0" BorderStyle="None" 
                                 AllowSorting="True" OnItemDataBound="gdvPackages_ItemDataBound" OnDeleteCommand="gdvPackages_DeleteCommand" 
                           OnModifyCommand="gdvPackages_ModifyCommand" OnSortCommand="gdvPackages_SortCommand"  
                           OnPageIndexChanged="gdvPackages_PageIndexChanged" OnPageSizeChanged="gdvPackages_PageSizeChanged" 
                           OnCopyCommand="gdvPackages_CopyCommand" 
                           AlternatingItemStyle-HorizontalAlign="center" ItemStyle-HorizontalAlign="Center">
                           
                           <HeaderStyle HorizontalAlign="Center" />
                            <AlternatingItemStyle HorizontalAlign="left" />
                            <ItemStyle HorizontalAlign="left" />   
                                                       
                           <MasterTableView CellSpacing="-1" TableLayout="Auto"  DataKeyNames="ConfigPackage_ID">
                           <ItemStyle cssclass="BlackArial10 BlueLineWithoutTop" HorizontalAlign="left"></ItemStyle>
                           <AlternatingItemStyle cssclass="BlackArial10 BlueLineWithoutTop" HorizontalAlign="left"></AlternatingItemStyle>
                               
                               <SortExpressions>
                                        <telerik:GridSortExpression FieldName="Description" SortOrder="Ascending" />
                                    </SortExpressions>
                                    <SortExpressions>
                                        <telerik:GridSortExpression FieldName="ConfigEnvironmentCode" SortOrder="Ascending" />
                                    </SortExpressions>
                                    <SortExpressions>
                                        <telerik:GridSortExpression FieldName="Name" SortOrder="Ascending" />
                                    </SortExpressions>
                                    <SortExpressions>
                                        <telerik:GridSortExpression FieldName="Name" SortOrder="Ascending" />
                                    </SortExpressions>
                               
                               <Columns>
                                         <telerik:GridBoundColumn ItemStyle-Width="30%" SortExpression="Name"  ForceExtractValue="Always" HeaderText="" UniqueName="Name" DataField="Name">
                                         <ItemStyle cssclass="BlackArial10Bold BlueLineWithoutTop"></ItemStyle>
                                         </telerik:GridBoundColumn>
                                    </Columns>
                                    <Columns>
                                         <telerik:GridBoundColumn ItemStyle-Width="30%" SortExpression="Description"  ForceExtractValue="Always" HeaderText="" UniqueName="Description" DataField="Description"></telerik:GridBoundColumn>
                                    </Columns>
                                    <Columns>
                                         <telerik:GridBoundColumn ItemStyle-Width="10%" SortExpression="ConfigEnvironmentCode"  ForceExtractValue="Always" HeaderText="" UniqueName="ConfigEnvironmentCode" DataField="ConfigEnvironmentCode"></telerik:GridBoundColumn>
                                    </Columns>
                                    <Columns>
                                          <telerik:GridTemplateColumn ItemStyle-Width="50%" SortExpression="DateModified" ItemStyle-HorizontalAlign="Left"   DataField="DateEnvironnement" UniqueName="DateEnvironnement">
                                            <ItemTemplate>
                                                <asp:label ID="lblConfigAssociatedServer" Runat="server" Text="*Server"></asp:label>
                                            </ItemTemplate>
                                          </telerik:GridTemplateColumn>
                                    </Columns>
                                    <Columns>
                                        <telerik:GridButtonColumn CommandArgument="ConfigEnvironmentCode" ConfirmDialogType="RadWindow" 
                                            ConfirmTitle="Copy"  ButtonType="ImageButton" CommandName="Copy" Text="Copy"
                                            UniqueName="CopyColumn" ShowInEditForm="False" ImageUrl="~\Image\icon_copy.gif">
                                            <ItemStyle CssClass="CursorHand CenterAlign" />
                                        </telerik:GridButtonColumn>
                                   <telerik:GridButtonColumn CommandArgument="ConfigEnvironmentCode" 
                                            ConfirmTitle="Modify"  ButtonType="ImageButton" CommandName="Modify" Text="Modify"
                                            UniqueName="ModifyColumn" ShowInEditForm="False" ImageUrl="~\Image\icon_edit.gif">
                                            <ItemStyle CssClass="CursorHand CenterAlign" />
                                        </telerik:GridButtonColumn>
                                   <telerik:GridButtonColumn CommandArgument="ConfigEnvironmentCode" ConfirmDialogType="RadWindow" 
                                            ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                                            UniqueName="DeleteColumn" ImageUrl="~\Image\icon_delete.gif">
                                            <ItemStyle CssClass="CursorHand CenterAlign" />
                                        </telerik:GridButtonColumn>
                                   </Columns>
                           </MasterTableView>
                           
                        <ClientSettings AllowColumnsReorder="false" ReorderColumnsOnClient="True" EnableRowHoverStyle="true">
                            <Scrolling  EnableVirtualScrollPaging="false" AllowScroll="false" UseStaticHeaders="false" />
                       </ClientSettings>
                                
                       <HeaderContextMenu EnableEmbeddedSkins="False"></HeaderContextMenu>
                       <FilterMenu EnableEmbeddedSkins="False"></FilterMenu>
                       
               </cc3:SOFGrid>
               </telerik:RadAjaxPanel>
----------------------------------------------------

Can anyone help me on this problem ?

Thanks

Tsvetina
Telerik team
 answered on 03 Mar 2011
1 answer
61 views
I have partially localized the splitbar tooltips. You will notice in my image attached the tooltip displays in Japanese except for the word "bottom" which is using the {0} variable to replace with bottom, top, left or right which pertains to the pane to collapse/expand.

Can you please tell me how I can gain access to that variable so I may have complete localization of the tooltip?

Dobromir
Telerik team
 answered on 03 Mar 2011
1 answer
147 views
Hi, i'm working on an asp:datagrid with a telerik:RadDataPager.
I have a button (new) to add a new item to the grid.
Assuming that PageSize is 10.
When I add the eleventh item to the grid I'd like to change the current page index of RadDataPager to page 2, but I can't find any property to set the current page.
Can you help me please?
Thanks
Tsvetina
Telerik team
 answered on 03 Mar 2011
1 answer
50 views
Hi People
I enable filter for grid but when grid is in radajaxmanager when click filter menu change position of controls in form
please help to me
Pavlina
Telerik team
 answered on 03 Mar 2011
3 answers
92 views
I have a grid with 9 rows. Now I want to create nested grid for each 9 rows and these nested grid will be different for each row.. How can I achieve this? Can someone help please??
Effat
Top achievements
Rank 1
 answered on 03 Mar 2011
4 answers
88 views
Hi, I am very new to telerik so please take it easy on me if you feel the answers to my questions are obvious.

I'm using a ComboBox and when I select an item from the list of items the text is displayed but not the symbol 

any help would be greatly appreciated 

Dan

            

<telerik:RadComboBox ID="RadComboBoxSymbols" runat="server" AutoPostBack="true" OnClientSelectedIndexChanged="OnSymbolChange"
                        OnSelectedIndexChanged="RadComboBoxSymbols_SelectedIndexChanged" Width="100">
                    </telerik:RadComboBox>
 
 
 
private void BindToSymbolsList(Values.pointReg.PointRegistration pointRegistration)
        {
            RadComboBoxSymbols.Items.Clear();
            foreach (Symbol symbol in pointRegistration.Getallsymbols())
            {
                RadComboBoxItem item = new RadComboBoxItem(symbol.Name,symbol.Id);
                item.ImageUrl = symbol.Path;
                RadComboBoxSymbols.Items.Add(item);   
            }
            RadComboBoxSymbols.SelectedIndex = 0;
        }
dan
Top achievements
Rank 1
 answered on 03 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?