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

Hello,

 I'm New to telerik..Can any one tell me how to get preview of the image and also save to database ..Im using RadAsyncUpload...this is the code I'm Using 

  protected void RadAsyncUpload_FileUploaded(object sender, FileUploadedEventArgs e)
        {
            string path = Server.MapPath("~/Uploads/");
            e.File.SaveAs(path + e.File.GetName());
            string ext = e.File.GetExtension();
        }

 

Thank you 

lakshmi
Top achievements
Rank 1
 answered on 12 Sep 2017
3 answers
386 views

When I uncheck an item in my RadCheckBoxList I would like to update something indicating that the use no longer wishes to include this item.  I figured using the SelectedIndexChanged event along with the SelectedItem.value property would be the way to go.  Boy was I wrong.  Works great when you check an item...when you uncheck one you get a big value of nothing. 

 

How do I get the ID of the item that was just unchecked in a RadCheckBoxList?

Loïc
Top achievements
Rank 1
 answered on 12 Sep 2017
0 answers
58 views
Hi everybody,

I am having a trouble with a small application. My customer required me build a app to list file from database like directory structure. The data is storage on MongoDB. Each database maybe up to million record. Each record will have a file path like this "root/folder1/folder2/folder3 ... / file.extension". Each "/" will be an folder.

The problem of me is the data too big. I don't know how to show it on Tree View. I was completed when made the Grid as a Node on Tree View, but the paging isn't working. I also tried to use the Tree List, but the paging is working illogical   , i need to paging the file, but the tree list see both of folder and file is a record. I also  make the grid inside the gird, customize the parent grid like a folder structure, and make child grid like a normal grid. But it isn't what customer wants.

So now,  I don't know how to resolve it. Any idea that you have. Please tell me. Thanks you very much.
Uyen
Top achievements
Rank 1
 asked on 12 Sep 2017
1 answer
69 views

I downloaded the patch which only included Telerik.Web.UI.dll.  After adding to my project, I got an error, please see the attach file.

Here is the setting in the config file

<add key="Telerik.Skin" value="WebBlue">

I understand both Teleik.Web.UI.dll and Telerik.Web.UI.Skin.dll must be the same version.  But it is not found in the patch.

Anyone has the same issue?

 

 

Marin Bratanov
Telerik team
 answered on 12 Sep 2017
1 answer
345 views

I'm trying to implement a MaintainScrollPositionOnPostBack because I've had to move the 'overflow' from my BODY element to a child DIV (to resolve a touch-scrolling issue with RadComboBoxes in newer versions of Chrome.) The problem I'm running into is getting my hidden field AJAXified with the rest of my controls.

If I disable AJAX entirely, the script works perfectly (because the hidden field value is being persisted across postbacks.)

If I enable AJAX but exclude the hidden field from the RadAjaxManager AjaxSettings AjaxUpdatedControl the page works as expected, but the script doesn't (because the hidden field value isn't being persisted across postbacks.)

If I enable AJAX and include the hidden field in the RadAjaxManager's AjaxSettings AjaxUpdatedControl I get a "The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)." exception.

The page in question has no scripts on it. The MasterPage's scripts are all wrapped in RadCodeBlock tags. I can't remove the HEAD element's runat="server" because of use. The problem occurs with both  and input "s. Wrapping the hidden field in a RadCodeBlock prevents the exception, but does not persist the hidden field's value across postbacks.

Any suggestions you could offer that might point me in the right direction would be appreciated. (And no, I can't post the code--the site part of is proprietary and extremely sprawling.)

Eyup
Telerik team
 answered on 12 Sep 2017
1 answer
118 views

Hello,

 

I'm using a couple RadDatePickers in my UI. I have two that loads on pageload. They are rendering as lightweight normally. Then I have two more in my radGrid's Editform. they are set to render as lightweight as well but when I click on the edit button to open the edit form in the radgrid, all the dropdowns render inproperly. 

 

here is my RadGrid: 

<telerik:RadGrid ID="rgResults" runat="server"
                                           HeaderStyle-Font-Bold="true"
                                           AllowPaging="true" PageSize="10"
                                           OnItemCommand="rgResults_ItemCommand"
                                           OnNeedDataSource="rgResults_NeedDataSource"
                                           OnItemDataBound="rgResults_ItemDataBound"
                                           OnPreRender="rgResults_PreRender"
                                           AutoGenerateColumns="false">
                                           <ClientSettings AllowKeyboardNavigation="true" EnablePostBackOnRowClick="false">
                                               <Selecting AllowRowSelect="true" UseClientSelectColumnOnly="true"></Selecting>
                                               <ClientEvents OnRowDblClick="rowDblClickCollectionBreak" />
                                           </ClientSettings>
                                           <MasterTableView DataKeyNames="Accounts_Receivable_ID" InsertItemPageIndexAction="ShowItemOnCurrentPage" Font-Size="Smaller" CommandItemDisplay="Top">
                                               <HeaderStyle CssClass="TableHeader" />
                                               <AlternatingItemStyle BackColor="#DBDBDB" />
                                               <Columns>
                                                   <telerik:GridEditCommandColumn EditImageUrl="../Content/Images/checkGreen.png" />
                                                   <telerik:GridTemplateColumn UniqueName="commandColumn">
                                                       <ItemTemplate>
                                                           <asp:ImageButton ID="btnDelete" runat="server" CommandName="Delete" Height="30px" Width="30px" ToolTip="Delete" ImageUrl="~/Content/Images/minusImg.png" />
                                                       </ItemTemplate>
                                                   </telerik:GridTemplateColumn>
                                                   <telerik:GridBoundColumn HeaderText="Deposit Date" DataField="Deposited_Date" UniqueName="Deposited_Date" />
                                                   <telerik:GridBoundColumn HeaderText="Company Name" DataField="Company_Name" UniqueName="Company_Name" />
                                                   <telerik:GridBoundColumn HeaderText="Check Amount" DataField="Check_Amount" UniqueName="Check_Amount" />
                                                   <telerik:GridBoundColumn HeaderText="Check #" DataField="Check_Number" UniqueName="Check_Number" />
                                                   <telerik:GridBoundColumn HeaderText="Submitted" DataField="Submitted" UniqueName="Submitted" />
                                               </Columns>
                                               <EditFormSettings EditColumn-ButtonType="ImageButton" EditColumn-EditText="" EditColumn-EditImageUrl="../Content/Images/plus.png" EditFormType="Template">
                                                   <FormTemplate>
                                                       <div class="pad">
                                                           <div class="row">
                                                               <div class="col-lg-3">
                                                                   <label>Received Date: </label>
                                                               </div>
                                                               <div class="col-lg-3">
                                                                   <telerik:RadDatePicker RenderMode="Lightweight" runat="server" ID="ReceiveDate" Culture="en-US" Calendar-BackColor="Teal" DbSelectedDate='<%# Bind("Received_Date") %>' TabIndex="3" />
                                                               </div>
                                                           </div>
                                                           <div class="row">
                                                               <div class="col-lg-3">
                                                                   <label>Deposited Date: </label>
                                                               </div>
                                                               <div class="col-lg-3">
                                                                   <telerik:RadDatePicker RenderMode="Lightweight" runat="server" ID="DepositDate" DbSelectedDate='<%# Bind("Deposited_Date") %>' TabIndex="4" />
                                                               </div>
                                                           </div>
                                                           <div class="row">
                                                               <div class="col-lg-3">
                                                                   <label>Company Name:</label>
                                                               </div>
                                                               <div class="col-lg-3">
                                                                   <telerik:RadTextBox runat="server" ID="tbCompanyName" Text='<%# Bind("Company_Name") %>' TabIndex="5" />
                                                               </div>
                                                           </div>
                                                           <div class="row">
                                                               <div class="col-lg-3">
                                                                   <label>Check Amount:</label>
                                                               </div>
                                                               <div class="col-lg-3">
                                                                   <telerik:RadTextBox runat="server" ID="tbCheckAmount" Text='<%# Bind("Check_Amount") %>' TabIndex="6" />
                                                               </div>
                                                           </div>
                                                           <div class="row">
                                                               <div class="col-lg-3">
                                                                   <label>Check Number:</label>
                                                               </div>
                                                               <div class="col-lg-3">
                                                                   <telerik:RadTextBox runat="server" ID="tbCheckNum" Text='<%# Bind("Check_Number") %>' TabIndex="7" />
                                                               </div>
                                                           </div>
                                                           <div class="row">
                                                               <div class="col-lg-3">
                                                                   <label>Description:</label>
                                                               </div>
                                                               <div class="col-lg-3">
                                                                   <telerik:RadTextBox runat="server" ID="tbDesc" Text='<%# Bind("Description_") %>' TabIndex="8" />
                                                               </div>
                                                           </div>
                                                           <div class="row top-pad">
                                                               <div class="col-lg-2">
                                                                   <asp:Button ID="btnUpdate" CssClass="btn btn-block btn-success" Text='<%# (Container is GridEditFormInsertItem) ? "Add" : "Update" %>'
                                                                       runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'></asp:Button>
                                                               </div>
                                                               <div class="col-lg-2">
                                                                   <asp:Button ID="btnCancel" CssClass="btn btn-block btn-danger" Text="Cancel" runat="server" CausesValidation="False"
                                                                       CommandName="Cancel"></asp:Button>
                                                               </div>
                                                           </div>
                                                       </div>
                                                   </FormTemplate>
                                               </EditFormSettings>
                                           </MasterTableView>
                                           <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
                                       </telerik:RadGrid>

 

Here is my two DatePickers on page load: 

<div class="row text-center">
                                <div class="col-lg-3">
                                    <div class="row">
                                        <div class="col-lg-3">
                                            <asp:Label runat="server" Text="From: " />
                                        </div>
                                        <div class="col-lg-3">
                                            <telerik:RadDatePicker RenderMode="Lightweight" ID="SearchByDateFrom" runat="server" Culture="en-US" />
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-3">
                                    <div class="row">
                                        <div class="col-lg-3">
                                            <asp:Label runat="server" Text="To: " />
                                        </div>
                                        <div class="col-lg-3">
                                            <telerik:RadDatePicker RenderMode="Lightweight" ID="SearchByDateTo" runat="server" Culture="en-US" />
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-3">
                                    <asp:Button class="btn btn-success btn-block" runat="server" OnClientClick="saveNewSearch()" OnClick="btnSearch_Click" type="button" Text="Search"></asp:Button>
                                </div>
                            </div>
Tyler
Top achievements
Rank 1
 answered on 11 Sep 2017
0 answers
130 views

I am using RadListBox to show a list of items. Each item has an icon. The requirement is jumping on the item when a the first letter of that item is pressed.

For example: It should focus on "Dock" when letter "D" is pressed

Is there any built-in feature to accomplish this?

 

 

Ned
Top achievements
Rank 1
 asked on 11 Sep 2017
3 answers
128 views
Hi,
I am working on Telerik version 2008.3.1314.35. Having problem with customizing filter menu items.
I want the same functionality which is posted here http://www.telerik.com/help/aspnet-ajax/grdreducingfiltermenuoptions.html

String type columns should only have StartsWith and Contains. But it works only first click. If I click on Integer column and all the items shows fine. But once I come back to string column I am able to see all the columns, some times I can see few of them. Its not consistent.

Sample also attached. Please help me in this situation.

Thanks
Sreenivas.
DogBizPro
Top achievements
Rank 1
 answered on 11 Sep 2017
5 answers
1.1K+ views

Hi Telerik,
I tried to find the text from combobox doesn't work using the normal dropdownlist javascript as below

<telerik:RadScriptBlock ID="rsbAction" runat="server">

    <script type="text/javascript">
        function action(sender, args) {
            var rcbCategory = document.getElementById('<%=rcbCategory.ClientID %>');
            var result = false;

            if (rcbCategory != null)
                if (rcbCategory.selectedIndex > 0)
                    result = true;
            args.IsValid = result;
        }

    </script>

</telerik:RadScriptBlock>
I as well tried the code provided by the sample also doesn't work as below :

<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
    <script type="text/javascript">
        function category(sender, args) {
            var result = false;
            var rcbCategory = $find("<%=rcbCategory.ClientID %>");
            var rcbCategoryText = rcbCategory.get_text();

            if (rcbCategoryText.Length > 1) {
                var node = rcbCategory.findItemByText(rcbCategoryText);
                if (node) {
                    var value = node.get_value();
                    if (value.length > 0 && value % 2 == 0)
                        result = true;
                }
            }
            args.IsValid = result;
        }
    </script>

</telerik:RadScriptBlock>

Thank you.

Vaibhav
Top achievements
Rank 1
 answered on 11 Sep 2017
38 answers
2.3K+ views
I have a web page form that a user fills out.  The form contains many data entry fields including the RadAsyncUpload control.  When the user clicks a Submit button, a postback is triggered.  I have this button setup as the Postback Trigger on the AsyncUpload control.  As a result, I am able to successfully process the files.  However, if the user fails to enter a required data entry field or some other error occurs (unrelated to the uploaded files), then I must display an error to the user rather than continue processing the user entered form data.  When this occurs, the user must correct the errors and click the Submit but again.  However, upon returning from the initial Postback, the uploaded files no longer appear in the AsyncUpload control, so the user is forced to re-attach their files and upload them again.  How can I make the RadAsyncUpload control retain the successfully uploaded files so the user does not have to re-attach their files?

thanks
lakshmi
Top achievements
Rank 1
 answered on 11 Sep 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?