Telerik Forums
UI for ASP.NET AJAX Forum
23 answers
616 views

Hi, I have the following button in the radgrid

 

  <telerik:GridButtonColumn CommandName="CustomDelCommand" ConfirmText="Delete this record?" ConfirmDialogType="RadWindow" ItemStyle-Width="18" HeaderStyle-Width="18"
                        ConfirmTitle="Delete" ButtonType="FontIconButton" >
                    </telerik:GridButtonColumn>

My item command code is here, the problem is the event not firing for chrome, safari. IE no problem. Anyone any idea?

 protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == "CustomDelCommand")
            {
                MailAddress addr = new MailAddress(User.Identity.Name);
                string username = addr.User;
          var Id = (int)((GridDataItem)e.Item).GetDataKeyValue("id");

//del id record.
               
            }
        }

Pavlina
Telerik team
 answered on 15 Nov 2017
10 answers
2.3K+ views

One of our Grids is basically a build your own query page and can often return upwards of 50 pages of 50 items.

We want the select all checkbox to select all the items across all the returned pages. However, the default functionality is to only select what's on the current page.

The official workaround is to temporarily set the page size to that of the datasource.data().length, select all the items, then return the page size to what it was previously.

The problem is that grid.dataSource.pageSize() doesn't return a promise. It only returnsthe current page size... asynchronously and instantly. The example shown for the workaround, as far as I can tell, could never have worked.

Does anyone have a solution to selecting all items when you have several pages of data?

Preslav
Telerik team
 answered on 15 Nov 2017
1 answer
96 views

I've a Grid with one of the Columns "No. of Notes" which hold link int values.

When clicked on one of the value I want to open a window which shows already existing notes, who and when was the note entered and should allow the user to enter any new notes. The user shouldn't be able to edit existing notes.

Do you have any specific control to handle this? Or any suggestions on how to achieve this will be appreciated. 

Eyup
Telerik team
 answered on 15 Nov 2017
5 answers
151 views
We are using the Kendo UI Scheduler for MVC. Is there any way to integrate with exchange and display events in an outlook calendar? 
Plamen
Telerik team
 answered on 15 Nov 2017
2 answers
82 views

Hi team,

I've got issue when binding a dynamic Datatable to kendoGrid, the data of boolean column is auto converted to false when it's null.

Is there anyway to handle this case, please advise.

Thanks

thuy
Top achievements
Rank 1
 answered on 15 Nov 2017
9 answers
1.2K+ views
Hi,
    I am yogesh. I am new to asp.net with c# and working on telerik asp.netajax radgrid control. i want to select a row from radgrid and need to display values of row in textboxes which are in the same page.Could anyone help me out plz...
Anil
Top achievements
Rank 1
 answered on 14 Nov 2017
0 answers
133 views

Hi there, 

 

I'm having a problem with my radrid multi-level grouping.

When a Ajax request occours my grid loses all data.

 

I show my source code.

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/IAMS.Master" AutoEventWireup="true" CodeBehind="ForeCastManager.aspx.cs" Inherits="LCG.Web.IAMS.AWA.Pages.ForeCastManager" %>
 
<%@ Register Src="~/Controls/Common/CustomNotification.ascx" TagPrefix="common" TagName="notification" %>
<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <telerik:RadAjaxManager ID="ForecastAjaxManager" runat="server">
        <AjaxSettings>
 
            <telerik:AjaxSetting AjaxControlID="ForecastClientesRadGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="TabForecastList" />
                    <telerik:AjaxUpdatedControl ControlID="ForecastPagesViews" LoadingPanelID="TaskLoadingPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="ForecastPagesViews">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="TabForecastList" />
                    <telerik:AjaxUpdatedControl ControlID="ForecastPagesViews" LoadingPanelID="TaskLoadingPanel" />
 
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="TabForecastList">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="TabForecastList" />
                    <telerik:AjaxUpdatedControl ControlID="ForecastPagesViews" LoadingPanelID="TaskLoadingPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="ForecastAjaxManager">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ForecastPagesViews" LoadingPanelID="TaskLoadingPanel" />
                    <telerik:AjaxUpdatedControl ControlID="TabForecastList" />
                    <telerik:AjaxUpdatedControl ControlID="ForecastClientesRadGrid" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel runat="server" ID="TaskLoadingPanel">
    </telerik:RadAjaxLoadingPanel>
</asp:Content>
<asp:Content ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <telerik:RadMenu runat="server" ID="MainMenu" RenderMode="Auto" EnableRoundedCorners="True" Width="100%"
        OnClientItemClicking="onMainMenuItemClicking" meta:resourcekey="RadMenu4Resource1" Style="z-index: 1">
        <Items>
            <telerik:RadMenuItem runat="server" Text="Create New" NavigateUrl="#CreateDocumentManagerAccount" meta:resourcekey="CreateDocumentManagerAccount">
            </telerik:RadMenuItem>
            <!-- when i click in "Create New" button a AjaxManager_request occours and i lost my grid information -->
                 
            <telerik:RadMenuItem runat="server" Text="Delete" NavigateUrl="#DeleteDocumentManagerAccount" meta:resourcekey="DeleteDocumentManagerAccount">
            </telerik:RadMenuItem>
        </Items>
    </telerik:RadMenu>
    <telerik:RadTabStrip ID="TabForecastList" runat="server"
        MultiPageID="ForecastPagesViews"
        Orientation="HorizontalTop"
        OnClientLoad="OnClientLoad"
        SelectedIndex="0">
    </telerik:RadTabStrip>
    <telerik:RadMultiPage ID="ForecastPagesViews" runat="server" OnPageViewCreated="ForecastPagesViews_PageViewCreated" Orientation="HorizontalTop" SelectedIndex="0" PerTabScrolling="true" RenderMode="Classic" ReorderTabsOnSelect="true">
        <telerik:RadPageView ID="DocumentClientsPageView" runat="server" Height="600px">
                <telerik:RadGrid
                    runat="server" ID="ForecastClientesRadGrid"
                    AutoGenerateColumns="False"
                    Height="600px"
                    BorderWidth="0px"
                    AllowSorting="True"
                    Style="outline: none"
                    EnableLinqExpressions="False"
                    OnItemCommand="ForecastClientesRadGrid_ItemCommand"
                    ShowGroupPanel="True"
                    FilterMenu-Enabled="true"
                    OnDetailTableDataBind="ForecastClientesRadGrid_DetailTableDataBind"
                    OnNeedDataSource="ForecastClientesRadGrid_NeedDataSource"
                    AllowPaging="True"
                    FilterType="Combined"
                    AllowFilteringByColumn="True"
                    AllowMultiRowEdit="True"
                    AllowAutomaticUpdates="True">
                    <ClientSettings
                        Scrolling-AllowScroll="True"
                        Scrolling-UseStaticHeaders="true"
                        Selecting-AllowRowSelect="true"
                        AllowGroupExpandCollapse="True"
                        AllowDragToGroup="true"
                        EnableRowHoverStyle="true">
                        <Selecting AllowRowSelect="True" />
                        <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                        <ClientEvents OnRowDblClick="OnRowDblClick" />
                    </ClientSettings>
                    <PagerStyle Mode="NumericPages" PageSizeControlType="None"></PagerStyle>
                    <MasterTableView TableLayout="Fixed" PageSize="16" Width="100%" ClientDataKeyNames="ID" DataKeyNames="Id">
                        <DetailTables>
                            <telerik:GridTableView DataKeyNames="Id" Name="Forecast" Width="100%" AllowFilteringByColumn="false">
                                <Columns>
                                    <telerik:GridButtonColumn
                                        CommandName="RowClick"
                                        ImageUrl="../Images/edit.png" ButtonType="ImageButton"
                                        ItemStyle-HorizontalAlign="Center" ItemStyle-Width="30px" HeaderStyle-Width="30px"
                                        UniqueName="imageSingleClick">
                                    </telerik:GridButtonColumn>
                                    <telerik:GridBoundColumn DataField="Id" DataType="System.Int32" HeaderText="Id" SortExpression="Id" UniqueName="Id" Display="false">
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text="" />
                                        </ColumnValidationSettings>
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Description" HeaderText="Description" SortExpression="Description" AllowFiltering="false" UniqueName="Description">
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text="" />
                                        </ColumnValidationSettings>
                                    </telerik:GridBoundColumn>
                                </Columns>
                            </telerik:GridTableView>
                        </DetailTables>
                        <Columns>
                            <telerik:GridBoundColumn DataField="Id" DataType="System.Int32" FilterControlAltText="Filter Id column" HeaderText="Id" SortExpression="Id" UniqueName="Id" Display="false">
                                <ColumnValidationSettings>
                                    <ModelErrorMessage Text="" />
                                </ColumnValidationSettings>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Name" FilterControlAltText="Filter NIF column" HeaderText="Name" SortExpression="Name" UniqueName="Name" HeaderButtonType="TextButton">
                                <ColumnValidationSettings>
                                    <ModelErrorMessage Text="" />
                                </ColumnValidationSettings>
                            </telerik:GridBoundColumn>
                        </Columns>
                        <PagerStyle PageSizeControlType="None" />
                    </MasterTableView>
                    <FilterMenu CssClass="RadFilterMenu_CheckList">
                    </FilterMenu>
                </telerik:RadGrid>
        </telerik:RadPageView>
    </telerik:RadMultiPage>
 
    <telerik:RadScriptBlock runat="server">
        <script type="text/javascript" src="../Scripts/pages/forecastManagerAccount.js"></script>
        <script type="text/javascript" src="../Scripts/lib/tabLib.js"></script>
        <script type="text/javascript">
            //<![CDATA[
            $(document).ready(function () {
                window.forecastManager = new Object();
                window.forecastManager.ajaxManager = $find("<%= ForecastAjaxManager.ClientID %>");
            });
 
 
            function OnRowDblClick(sender, args) {
                var index = args._itemIndexHierarchical;
                __doPostBack("<%= ForecastClientesRadGrid.UniqueID %>", "<%= this.CustomDoubleClickCommand %>" + ":" + index);
            }
 
            function onMainMenuItemClicking(sender, args) {
                mainMenuItemClicking(sender, args);
            }
 
            //]]>
        </script>
    </telerik:RadScriptBlock>
    <common:notification runat="server" ID="NotificationDialog" />
</asp:Content>

 

And respective code-behind

using LCG.Business.Entities.Contacts;
using LCG.Client.Contracts.Service;
using LCG.Client.Proxies.Proxies;
using LCG.Web.IAMS.AWA.Code;
using LCG.Web.IAMS.AWA.Controls.Documents;
using LCG.Web.IAMS.AWA.Controls.Forecast;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Threading;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
 
namespace LCG.Web.IAMS.AWA.Pages
{
    public partial class ForeCastManager : System.Web.UI.Page
    {
        ServiceFactory factory = new ServiceFactory();
        private SessionClientCredentials _credentials;
        private SessionClientCredentials credentials
        {
            get
            {
                if (_credentials == null)
                    _credentials = SessionCredentials.GetCurrentUser();
 
                return _credentials;
            }
        }
        public static string PageUrl = System.Web.VirtualPathUtility.ToAbsolute("~/Pages/ForeCastManager.aspx");
        private static string _moduleName = "Forecast";
        public string CustomDoubleClickCommand
        {
            get
            {
                return "CustomRowDoubleClick";
            }
        }
        public int TabIndex
        {
            get
            {
                return (int?)Session["tabIndex"] ?? TabForecastList.Tabs.Count;
            }
            set
            {
                Session["tabIndex"] = value;
            }
        }
 
        #region Page events
        protected void Page_Init(object sender, EventArgs e)
        {
 
            if (!Page.IsPostBack)
            {
                TabForecastList.Tabs.Add(new RadTab() { Text = _moduleName });
                TabIndex = 1;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            ForecastAjaxManager.AjaxRequest += ForecastAjaxManager_AjaxRequest;
            var tabTemplate = new TabTemplate();
            foreach (RadTab tab in TabForecastList.Tabs)
            {
                if (!tab.Text.Equals(_moduleName, StringComparison.InvariantCultureIgnoreCase))
                {
                    tabTemplate.InstantiateIn(tab, _moduleName);
                }
            }
 
            if (!IsPostBack)
            {
                //TODO:Alterar isto para resources
                Page.Title = "IAMS - Forecast";
                RadSkinManager skinManager = new RadSkinManager();
                if (HttpContext.Current.Session["cultureId"] != null)
                {
                    string cultureId = (string)HttpContext.Current.Session["cultureId"];
                    Thread.CurrentThread.CurrentUICulture = new CultureInfo(cultureId);
                    Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(cultureId);
                }
            }
        }
        private void AddTab(string title, string id)
        {
            var tabTemplate = new TabTemplate();
            RadTab tab = new RadTab() { Text = title };
            tab.PostBack = false;
 
            tabTemplate.InstantiateIn(tab, _moduleName);
            TabForecastList.Tabs.Insert(TabForecastList.Tabs.Count, tab);
            TabForecastList.DataBind();
            TabForecastList.SelectedIndex = tab.Index;
        }
        private void AddPageView(bool isNew, string pvId)
        {
            try
            {
                RadPageView pageView = new RadPageView();
 
                if (isNew)
                {
                    pageView.ID = "NewForecast" + pvId;
                    //TabIndex++;
                }
                else
                {
                    pageView.ID = pvId;
                }
 
                pageView.CssClass = "pageView";
                ForecastPagesViews.PageViews.Add(pageView);
                ForecastPagesViews.SelectedIndex = pageView.Index;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        private void ForecastAjaxManager_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            string argument = e.Argument.ToLower();
            string[] strCommand = argument.Split('|');
 
            if (strCommand != null)
            {
                switch (strCommand[0])
                {
                    case "createdocumentmanageraccount":
                        TabIndex++;
                        AddTab("NewForecast", TabIndex.ToString());
                        AddPageView(true, TabIndex.ToString());
                        break;
 
                    case "savedocument":
                        ForecastInfo forecastInfo = FindFileTreeInfoControl(ForecastPagesViews.SelectedPageView.ID);
                        if (forecastInfo == null)
                        {
                            forecastInfo = FindFileTreeInfoControl(string.Format("NewForecast{0}", TabIndex));
                        }
                        forecastInfo.Save();
 
                        break;
                    default:
                        break;
                }
            }
        }
        private ForecastInfo FindFileTreeInfoControl(string id)
        {
            Control foundControl = ForecastPagesViews.SelectedPageView.FindControl(id);
            if (foundControl == null || foundControl.Controls == null || foundControl.Controls.Count == 0)
            {
                NotificationDialog.Show("Error", "An error occured getting the document.", TypeOfNotifications.Warning);
            }
 
            return (ForecastInfo)foundControl.Controls[0];
        }
 
        #endregion
        protected void ForecastPagesViews_PageViewCreated(object sender, Telerik.Web.UI.RadMultiPageEventArgs e)
        {
            if (e.PageView.ID.Contains("NewForecast"))
            {
                e.PageView.Controls.Add(LoadDocumentInfo(0));
            }
            else
            {
                e.PageView.Controls.Add(LoadDocumentInfo(int.Parse(e.PageView.ID)));
            }
        }
 
        private Control LoadDocumentInfo(int forecastId)
        {
            ForecastInfo forecastInfo = (ForecastInfo)Page.LoadControl("~/Controls/Forecast/ForecastInfo.ascx");
            var proxyCompany = factory.CreateClient<IContactService>(credentials, false);
 
            forecastInfo.SaveForecast += ForecastInfo_SaveForecast;
 
            if (forecastId == 0)
            {
                forecastInfo.Forecast = new Forecast();
                forecastInfo.ID = string.Format("ForecastInfonewForecast{0}", TabIndex);
            }
            else
            {
                Forecast forecast = new Forecast();
                forecast.Id = forecastId;
                forecast = proxyCompany.GetForecastById(forecast);
                #region EDIT
                proxyCompany.OpenChannel();
                forecastInfo.Forecast = forecast;
                //TODO: alterar isto
                forecastInfo.Companies = proxyCompany.GetCompanies(credentials.Account, credentials.User, 100, "").ToList();
                forecastInfo.Description = forecast.Description;
                forecastInfo.LoadForeCast();
                proxyCompany.CloseChannel();
                #endregion
 
            }
 
            return forecastInfo;
        }
 
        private void ForecastInfo_SaveForecast(Forecast forecast, EventArgs e)
        {
            var proxy = factory.CreateClient<IContactService>(credentials, false);
            try
            {
                proxy.OpenChannel();
 
                Forecast newForecast = proxy.GetForecastById(forecast);
 
                if (newForecast == null)
                {
                    newForecast = new Forecast();
                }
                newForecast.Description = forecast.Description;
                newForecast.CompanyId = forecast.CompanyId;
                newForecast.Id = forecast.Id;
                newForecast.Records = forecast.Records;
                if (forecast.Id != 0)
                {
                    proxy.UpdateForecast(forecast);
                }
                else
                {
                    proxy.CreateForecast(forecast);
                }
                TabForecastList.SelectedTab.Text = newForecast.Description;
                Label lbl = (Label)TabForecastList.SelectedTab.FindControl("lblTabTitle");
                lbl.Text = newForecast.Description;
                ForecastClientesRadGrid.DataBind();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                proxy.CloseChannel();
            }
        }
 
        protected void ForecastClientesRadGrid_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            if (e.CommandName == "RowClick")
            {
 
                GridEditableItem editedItem = e.Item as GridEditableItem;
                Hashtable newValues = new Hashtable();
                e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editedItem);
                int entityId = newValues["Id"] != null ? Convert.ToInt32(newValues["Id"]) : 0;
                string title = newValues["Description"].ToString().Length > 20 ? string.Format("{0}...", newValues["Description"].ToString().Substring(0, 20)) : newValues["Description"].ToString();
                string eventArgument = string.Format("{0}:{1}:{2}", e.CommandName, entityId, title);
                OpenTab(eventArgument);
 
            }
        }
 
        protected void ForecastClientesRadGrid_DetailTableDataBind(object sender, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)
        {
            GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;
            var proxyForecast = factory.CreateClient<IContactService>(credentials);
            switch (e.DetailTableView.Name)
            {
                //1º
                case "Forecast":
                    {
                        string CompanyId = dataItem.GetDataKeyValue("Id").ToString();
                        e.DetailTableView.DataSource = proxyForecast.GetForeCastsByCompany(CompanyId).ToList();
                        break;
                    }
            }
        }
 
        protected void ForecastClientesRadGrid_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            if (!e.IsFromDetailTable)
            {
                var proxy = factory.CreateClient<IContactService>(credentials);
                List<Company> lstCompanies = new List<Company>();
                lstCompanies.AddRange(proxy.GetAllCompanies(credentials.Account, credentials.User).ToList());
                ForecastClientesRadGrid.DataSource = lstCompanies;
            }
        }
 
        private void OpenTab(string eventArgument)
        {
            string[] command = eventArgument.Split(':');
            string taskId = string.Empty;
            string title = string.Empty;
 
            switch (command[0])
            {
                case "CustomRowDoubleClick":
                    GridDataItem dataItem = (GridDataItem)ForecastClientesRadGrid.SelectedItems[0];
                    if (command.Length == 6 || (command.Length == 3 && dataItem["AbbreviatedName"].Text.Contains("DM#")))
                    {
                        taskId = dataItem["Id"].Text;
                        title = dataItem["Description"].Text;
                        title = (title.Length > 20 ? title.Substring(0, 20) + "..." : title);
                    }
                    break;
                case "RowClick":
 
                    taskId = command[1];
                    title = command[2];
                    break;
 
                default:
                    break;
            }
 
            if (!string.IsNullOrEmpty(taskId))
            {
                if (TabForecastList.FindTabByText(title) == null)
                {
                    AddTab(title, taskId);
                    AddPageView(false, taskId);
                }
                else
                {
                    TabForecastList.FindTabByText(title).Selected = true;
                    ForecastPagesViews.PageViews[TabForecastList.FindTabByText(title).Index].Selected = true;
                }
            }
 
        }
    }
}

 

Someone can help me?

 

Best regards,

 

 

 

tiago
Top achievements
Rank 1
 asked on 14 Nov 2017
1 answer
244 views

I'm using the RadAsyncUpload to upload files to a custom handler which stores the files into our database.  The custom handler returns a key value for the file which I want to then use during form postback to attach those uploads to the current record (which may be a brand-new record).  I can see the custom returned data on the client in OnClientFileUploaded() by using args.get_fileInfo().  From that standpoint I have everything working, upload, saving, validation, returning the file key.

Here's my definition of RadAsyncUpload:

                           <telerik:RadAsyncUpload RenderMode="Lightweight"

                                ID="AttachmentAsyncUploader"
                                runat="server"
                                CssClass="async-attachment"
                                MultipleFileSelection="Automatic"
                                UploadedFilesRendering="BelowFileInput"
                                OnClientFileSelected="OnClientFileSelected"
                                OnClientFileUploading="OnClientFileUploading"
                                OnClientValidationFailed="OnClientValidationFailed"
                                OnClientFileUploaded="OnClientFileUploaded"
                                OnClientFileUploadRemoved="OnClientFileUploadRemoved"
                                MaxFileSize="26214400"
                                DropZones="#DropZone"
                                HttpHandlerUrl="~/FileUploader.ashx"
                                HideFileInput="true">
                                <Localization Select="Select Files for Upload" />
                            </telerik:RadAsyncUpload>

Now the user posts the form back, so I call AttachmentAsyncUploader.UploadedFiles() which gives me a list of the files that were uploaded, but I can see no way to access the custom fileInfo fields that were returned by the handler.  Obviously just the file name isn't enough to figure out which attachments need to be attached to the newly created records.

Here is how I'm building and returning the meta-data from the custom handler, FileUploader.ashx (most importantly AttachedFileGuid):

            var result = CreateDefaultUploadResult<FileUploaderResult>(file);

             result.AttachedFileGuid = InsertFile(file);

             return result;

What is the expected way to get the full information about the uploaded files back to the postback?  Obviously, I can build my own field to store all that, but it seems an awful hack to use RadAsyncUpload and then just ignore it completely on postback.

Thanks in advance,

Vessy
Telerik team
 answered on 14 Nov 2017
1 answer
120 views

Hi,

I'm trying to figure out a way or if it is possible to get the other values from the selected record. For example,

If i have a query setup with multiple table joins as follows:

Select table1.person_id,

table1.name,

table1.age,

table1.gender,

table2.address_id, 

table2.address_1, 

table2.address_2,

table2.address_3,

table3.something1,

table3.something2

such that it could return multiple addresses for a single person

I would have the AutoCompleteBox DataTextField set to 'name', and the DataValueField set to 'person_id'.

How would i pull the address_id value out of the selected record, or really any of the other values?

I'm able to access these within the DropDownItemTemplate using DataBinder.Eval(Container.Dataitem, "address_id") to format what the user sees, but once they click the record i cannot save away the extra information that may or may not be displayed in the template. Since the person_id can have multiple address_id's associated to it, i cannot pull that value from the field and run a separate query since I'm not able to define which address was specifically chosen.

 

Peter Milchev
Telerik team
 answered on 14 Nov 2017
2 answers
285 views

Temp files are not getting cleared from App_Data folder. Below is the .aspx code

<telerik:RadAsyncUpload runat="server" ID="AsyncUpload1" HideFileInput="true" MultipleFileSelection="Automatic"
                                            AllowedFileExtensions=".tif,.tiff,.pdf" OnClientFileSelected="onFileSelected"
                                            OnClientFileUploadRemoved="onFileSelected" TemporaryFileExpiration="05:00:00">

Below is the C# code for reading the image bytes.

foreach (UploadedFile file in AsyncUpload1.UploadedFiles)
{

 using (MemoryStream ms = new MemoryStream())
    {
                file.InputStream.CopyTo(ms);

    }

}

Jason
Top achievements
Rank 1
 answered on 14 Nov 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?