Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
167 views

I have a standard aspx page that has a RadTextBox and RadGrid (with datasource)

I want to see if there is a way to type into the RadTextBox a value and the value that matches a particular row in the RadGrid would get selected/highlighted.

 

Thanks for any help on this.

Rusty
Top achievements
Rank 1
 answered on 18 Apr 2016
4 answers
156 views
I have one scenario where the gridview has 2 rows like what i have attached.

Gridview having data as like I have mentioned in the file.

COLUMN 3 to COLUMN 6 having texbox where the values are entered by the user

COLUMN 1 and COLUMN 2 of ROW 1 and ROW 2 will have the same value as mentioned.
I need to know how to add a new row in the grid if the button is clicked

And the entered value should not get affected. It should be present.
The new row should be added with COLUMN1 and COLUMN 2 having same name as that of the ROW 1 and ROW 2
Even if the user clicks again the button the old rows should not get affected.




Viktor Tachev
Telerik team
 answered on 18 Apr 2016
2 answers
239 views

Hi,

 

I have two editbuttons in my gridview, I my form template I have 4 dropdowns.

When I click add new record button all the 4 dropdowns controls should be enable to add a record.

when I click the edit button 1 (Command name is EditEmp)  dropdown 1 & dropdown 2 should be enabled and dropdown 3 & dropdown 4 should be disabled to update the record

when I click the edit button 2 (Command name is EditDependent) on the same grid dropdown 1 & dropdown 2 should be disabled and dropdown 3 & dropdown 4 should be enabled to update the record.

Kindly let me know on which event I will do this changes.

thanks,

Ganeshkumar

 

 

Ganeshkumar
Top achievements
Rank 1
 answered on 18 Apr 2016
1 answer
619 views

I found that when I select many files (e.g. around 400 jpg, 6KB per files) in AsyncUpload, the upload speed would become slower and slower. Initially, the upload speed could have around 2.4KB/s, but it gradually drops to even below 40 Bytes per second as the upload proceeds. It takes me so long time to upload a large amount of files. 

Are there any configurations to improve the upload speed of multiple files ?

 

Thanks!

Hristo Valyavicharski
Telerik team
 answered on 18 Apr 2016
1 answer
378 views

We have an update panel on the page that contains rows of controls.  The user can add additional rows or remove existing ones using a button that performs an Ajax postback.  If the user adds additional rows, the values of the RadComboBox remain and life is good.  However, if the user removes a row, the combobox value is lost (the items are there, but the selected index is set to -1).

In stepping through the code, I can see that the values are indeed set after Page_Load and Page_PreRender, but when the page is finally displayed, the values have been removed.

I've searched high and low and it appears this is an issue others have experienced as well (http://www.telerik.com/forums/selectedvalue-lost-on-postback-in-dynamically-added-user-controls).  Unfortunately, I can't bind the values in Page_Init (as suggested in the post) as I need information from ViewState that isn't available until Page_Load.

All other controls on the update panel retain their value; it's *only* the comboboxes that lose theirs.

Has anyone else experienced this lately and, if so, what was the workaround?

We're using Telerik 2014 Q2 in VS2015 (C#).

Nencho
Telerik team
 answered on 18 Apr 2016
1 answer
136 views

I cannot seem to use jQuery to select a CheckBoxList inside a RadWindow ContentTemplate.Clicking on the checkboxes does nothing, but if I move the CheckBoxList out of the RadWindow it works fine. I've probably tried a dozen selectors, none work.

<telerik:RadWindow ID="MonthsWindow" runat="server" Skin="Metro" AutoSize="true" MinWidth="575px" MaxWidth="700px" MaxHeight="600px" KeepInScreenBounds="true" Left="100" Top="100" VisibleOnPageLoad="false" Behaviors="Close, Move" RenderMode="auto" DestroyOnClose="true" EnableAjaxSkinRendering="true" ShowContentDuringLoad="true">
<ContentTemplate>
<asp:CheckBoxList ID="CheckBoxList1" runat="Server">
     <asp:ListItem Text="Red" Value="red"></asp:ListItem>
     <asp:ListItem Text="Blue" Value="blue"></asp:ListItem>
     <asp:ListItem Text="Green" Value="green"></asp:ListItem>
</asp:CheckBoxList>
                                     
</ContentTemplate>
</telerik:RadWindow>

$("[id*='CheckBoxList1']").click(function () {
    //code
});
Marin Bratanov
Telerik team
 answered on 18 Apr 2016
5 answers
894 views
Hi everyone,

I need your help.
I added Telerik to a old project. radGrid works good, and i can open radWindow.
I have followed this demo http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=window

But for now, i can't close the radWindow, the reason : window.radWindow and window.frameElement.radWindow from GetRadWindow() script function are undefined.

If someone can help me.

My code :
default.aspx
<telerik:RadScriptManager runat="server" EnableViewState="false" ID="RadScriptManager1" />
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
             
            function ShowEditForm(id, rowIndex) {
                var anneeID = 0;
                var typeRessID = 0;
                var grid = $find("<%= RadGrid1.ClientID %>");
                var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();
 
                anneeID = document.getElementById("<%= cboAnnees.ClientID %>").value;
                if (document.getElementById("rbResident").checked == true) {
                    typeRessID = 1;
                }
                if (document.getElementById("rbExterne").checked == true) {
                    typeRessID = 2;
                }
                if (document.getElementById("rbAutre").checked == true) {
                    typeRessID = 3;
                }
                 
                grid.get_masterTableView().selectItem(rowControl, true);
 
                window.radopen("UpdateInfo.aspx?ID=" + id + "&TYPERESSID=" + typeRessID + "&ANNEEID=" + anneeID, "UserListDialog");
                return false;
            }
             
            function ShowInsertForm() {
                window.radopen("UpdateRessourceFrameset.aspx", "UserListDialog");
                return false;
            }
            function refreshGrid(arg) {
                if (!arg) {
                    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
                }
                else {
                    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate");
                }
            }
            
        </script>
    </telerik:RadCodeBlock>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

<telerik:RadGrid OnItemCreated="RadGrid1_ItemCreated" ID="RadGrid1" runat="server"
        AllowPaging="True" EnableViewState="true" Width="97%">
        <PagerStyle Mode="NumericPages"></PagerStyle>
        <MasterTableView pagesEnableViewState="true" AutoGenerateColumns="False" DataKeyNames="RESS_ID" ShowHeadersWhenNoRecords="false" ClientDataKeyNames="RESS_ID"
            Width="100%" PageSize="20">
            <Columns>
                <telerik:GridBoundColumn DataField="INFO2" HeaderText="Year" ReadOnly="True">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="INFO1" HeaderText="Name"/>
                 
                <telerik:GridTemplateColumn UniqueName="TemplateEditColumn">
                    <ItemTemplate>
                         
                        <asp:HyperLink ID="EditLink" runat="server" Text="Edit"></asp:HyperLink>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
            <CommandItemTemplate>
                <a href="#" onclick="return ShowInsertForm();">No records...</a>
            </CommandItemTemplate>
        </MasterTableView>
        <ClientSettings>
            <Selecting AllowRowSelect="false"></Selecting>
             
        </ClientSettings>
    </telerik:RadGrid>
             
            <telerik:RadWindowManager ID="RadWindowManager1" EnableViewState="False" runat="server">
        <Windows>
            <telerik:RadWindow ID="UserListDialog" runat="server" Title="Editer une ressource" Height="500px"
                Width="930px" Left="150px" ReloadOnShow="true" ShowContentDuringLoad="false"
                Modal="true">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>

default.aspx.vb
Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As UI.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest
       If e.Argument = "Rebind" Then
           RadGrid1.MasterTableView.SortExpressions.Clear()
           RadGrid1.MasterTableView.GroupByExpressions.Clear()
           RadGrid1.Rebind()
       ElseIf e.Argument = "RebindAndNavigate" Then
           RadGrid1.MasterTableView.SortExpressions.Clear()
           RadGrid1.MasterTableView.GroupByExpressions.Clear()
           RadGrid1.MasterTableView.CurrentPageIndex = RadGrid1.MasterTableView.PageCount - 1
           RadGrid1.Rebind()
       End If
   End Sub
 
   Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs)
       If TypeOf e.Item Is GridDataItem Then
           Dim editLink As HyperLink = DirectCast(e.Item.FindControl("EditLink"), HyperLink)
           editLink.Attributes("href") = "#"
           editLink.Attributes("onclick") = [String].Format("return ShowEditForm('{0}','{1}');", e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("RESS_ID"), e.Item.ItemIndex)
       End If
   End Sub

Updateinfo.aspx
<script type="text/javascript">
     function CloseAndRebind(args) {
         GetRadWindow().BrowserWindow.refreshGrid(args);
         GetRadWindow().close();
     }
 
     function GetRadWindow() {
        var oWindow = null;
         if (window.radWindow) oWindow = window.radWindow;
         else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
 
         return oWindow;
     }
 
     function CancelEdit() {
         window.UserListDialog.close();
     }
        </script>
 
 
....
 
<asp:ScriptManager id="smUpdateRess" runat="server" />
 
<asp:DetailsView runat="server" ID="DetailsView1" OnItemUpdating="DetailsView1_ItemUpdating" AutoGenerateEditButton="false" AutoGenerateRows="false" GridLines="None">
        
  
       <Fields>
            
             
           <asp:TemplateField>
               
               <EditItemTemplate>
                   <asp:Button ID="btAddContact" runat="server" Text="Save Contact" CommandName="Update" />
                    
                   <table border =0 style="width:750px">
                        <tr>
                            <td  style="height: 31px" colspan=4>
                           <asp:Label id="lblInfo1" runat="server" Text="Year: "></asp:Label>                            
                           <asp:TextBox id="txtInfo2" runat="server" Width="70px"  ReadOnly="true"  BackColor="LightGray" Text='<%# Container.DataItem("Info2") %>'></asp:TextBox>     
                             <asp:Label id="lblinfo2" runat="server" Text="Name:"></asp:Label>
                            <asp:TextBox ID="txtInfo1" runat="server" Width="70px"  ReadOnly="true"  BackColor="LightGray" Text='<%# Container.DataItem("INFO1") %>'></asp:TextBox>                    
                             
                            </td>            
                        </tr>
                         
                   </table>
               </EditItemTemplate>
           </asp:TemplateField>
            
       </Fields>
   </asp:DetailsView>

updateinfo.aspx.vb

on button click
 
ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CancelEdit();", True)

But like i said, i get error of null with window.radWindow orwindow.frameElement.radWindow

thanks for your help.
Marin Bratanov
Telerik team
 answered on 18 Apr 2016
10 answers
432 views
Hello ,

       I am trying to paste an html in radeditor using

<script type="text/javascript">  
     var editor = $find("<%=RadEditor1.ClientID%>"); //get a reference to RadEditor client object  
     editor.set_html('test');  
</script>

but when i try to find the editor using $find it gives error $find is not defined. plz help.

Regards
maggi

Marin Bratanov
Telerik team
 answered on 18 Apr 2016
1 answer
121 views

Good morning Telerik Team,

In our application, we disabled Telerik stylesheet CDN and enabled stylesheet combined in the stylesmanager. When we open a page with RadMenu control, the menu mess up and we found one webresource throw 500 error. Is there any setting we need set?

 

/Telerik.Web.UI.WebResource.axd?d=C6CXK_NKqeRQozdHamsVHY4iEh2-WHZ0hR2lZ4lb0QXhxNgPaCKJi-mbpKFkZJFyaLS96jrWiH-vS8d1mRcnCLyJDy45wzq4xT8qZIVpH1iN6XQB3Ms8R0ovsOLLDEf275IHDg2&t=635025536200000000&compress=1&_TSM_CombinedScripts_=%3b%3bTelerik.Web.UI%2c+Version%3d2015.3.930.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3af59d7c8d-045a-4b22-9f9c-e124aae8c608%3a92753c09%3a91f742eb%3aed2942d4%3a8cee9284%3aed057d30%3aa3b7d93f%3a1f65231b%3a7f7626a2%3a9e1572d6%3ae25b4b77%3a45085116

 

 

Thanks in advance,

Lan

 

Plamen
Telerik team
 answered on 18 Apr 2016
2 answers
243 views
Code FileExplorer.InitialPath = "~/Documents";  or on any folder throws message box "Invalid characters in folder name."
This bug was introduced in Telerik.Web.UI_2010_2_826 and later. All previous releases until Telerik.Web.UI_2010_2_817_hotfix.zip was all right in such a functionality.
Check it, please.

Resolution has been found. Thanks.

How to delete this post?
Ashwin Shriwas
Top achievements
Rank 1
 answered on 18 Apr 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?