Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
78 views
Ok so the slowness if probably a bit my fault :)

...it's a UL with 136 LIs each containing a thumbnail

So it's super laggy

Any suggestions to speed it up?

Steve
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 14 Sep 2011
8 answers
309 views
I am Using Telerik rad Grid and I have Inline Add Edit and Delete Image buttons and for very first time none of the click events are firing and for the second time all events work fine. So can you suggest me any solotion for this problem

Thank You,
Rama
Rama
Top achievements
Rank 1
 answered on 14 Sep 2011
1 answer
141 views
hi 
i use rad confirm in delete button on toolbar .
confirm work but my code for delete in codbehind not work.!
pls help

toolbar:
<td colspan="3" height="40" valign="top">
     <telerik:RadToolBar ID="RadToolBar1" OnClientButtonClicking="clientButtonClicked" runat="server" dir="rtl" Height="30px" 
         onbuttonclick="RadToolBar1_ButtonClick"  Skin="Office2007" Width="100%">
         <Items>
             <telerik:RadToolBarButton runat="server" Text="new">
             </telerik:RadToolBarButton>
             <telerik:RadToolBarButton runat="server" Text="save">
             </telerik:RadToolBarButton>
             <telerik:RadToolBarButton runat="server" Text="edit">
             </telerik:RadToolBarButton>
             <telerik:RadToolBarButton runat="server" Text="del" >
             </telerik:RadToolBarButton>
         </Items>
     </telerik:RadToolBar>

javascript :
<script type="text/javascript">
    //<![CDATA[
    var lastClickedItem = null;
    var clickCalledAfterRadconfirm = false;
    function clientButtonClicked(sender, args) {
        if (args.get_item().get_text() == 'Del') {
            if (!clickCalledAfterRadconfirm) {
                args.set_cancel(true);
                lastClickedItem = args.get_item();
                radconfirm('DelØŸ', confirmCallBackFn, 330, 100, null, 'Tasnim232');
            }
        }
    }
 
     
 
    function confirmCallBackFn(arg) {
        if (args) {
            clickCalledAfterRadconfirm = true;
            lastClickedItem.click();
        }
        else
            clickCalledAfterRadconfirm = false;
        lastClickedItem = null;
    }
 
     
                        //]]>                                                                       
</script>

codebehind:
protected void RadToolBar1_ButtonClick(object sender, RadToolBarEventArgs e)
    {
        if (e.Item.Index == 0)
        {
            T_Tittle.Text = "";
            T_ID.Text = "0";
        }
        else
            if (e.Item.Index == 1)
            {
                int Opr_ = 0;
                if ((T_ID.Text == "") | (T_ID.Text == "0"))
                    Opr_ = 1;
                else
                    Opr_ = 2;
                Pishraft _Sanj = new Pishraft();
                BLL_Pishraft _Ins = new BLL_Pishraft();
                _Sanj.Pishraft_ID = Convert.ToInt32(T_ID.Text);
                _Sanj.Pishraft_Tittle = T_Tittle.Text;
                DataTable DT_ = _Ins.Pishraft_Act(_Sanj, Opr_);
                if (DT_.Rows[0][0].ToString() == "1")
                {
                    WindowManager_.RadAlert("OK", 330, 100, "Tasnim", "");
                    Grid_.DataBind();
                }
                else
                    if (DT_.Rows[0][0].ToString() == "2")
                        WindowManager_.RadAlert("د", 330, 100, "Tasnim", "");
                    else
                        if (DT_.Rows[0][0].ToString() == "-1")
                            WindowManager_.RadAlert("ok", 330, 100, "Tasnim", "");
            }
            else
                if (e.Item.Index == 2)
                {
                    Grid__SelectedIndexChanged(sender, e);
                }
                else
                    if (e.Item.Index == 3)
                    {
                        if (T_ID.Text != "")
                        {
                             
 
                            Pishraft _Noe = new Pishraft();
                            BLL_Pishraft _Ins = new BLL_Pishraft();
                            _Noe.Pishraft_ID = Convert.ToInt32(T_ID.Text);
                            _Noe.Pishraft_Tittle = T_Tittle.Text;
                            DataTable DT_N = _Ins.Pishraft_Act(_Noe, 3);
                            if (DT_N.Rows[0][0].ToString() == "1")
                            {
                                WindowManager_.RadAlert("عت", 330, 100, "Tasnim", "");
                                Grid_.DataBind();
                            }
                            
 
                    }
 
 
    }
Marin Bratanov
Telerik team
 answered on 14 Sep 2011
3 answers
429 views
Hi Telerik !

I have added an TWO COLUMNS on to my GRID CONTEXT MENU(using your sample code for how to Add Custom Column).

Created Date & Modified Date are the two customs columns that I have added on to the GRID CONTEXT MENU.

Iam not able to get the value against  CREATED DATE in the GRID CONTEXT MENU, though I have used the CODE that you have mentioned (in your samples).

Below is the vode that I have been using in my .CS file :-

using System;  
using System.Collections;  
using System.Data;  
using System.Configuration;  
using System.Drawing;  
using System.Drawing.Imaging;  
using System.IO;  
using System.Web;  
using System.Collections.Generic;  
using Telerik.Web.UI.Widgets;  
using Telerik.Web.UI;  
using System.Data.SqlClient;  
using System.Web.UI.WebControls;  
 
public partial class DocumentManagementSystem : System.Web.UI.Page  
{  
 
    protected void Page_Load(object sender, EventArgs e)  
    {  
        //DocumentsRadFileExplorer.WindowManager.ReloadOnShow = true;   
          
        GetMappedPath GMP = new GetMappedPath();  
 
        Dictionary<string, string> mappedPathsInConfigFile = GMP.GetMappingsFromConfigFile();  
 
        string DocumentPath = "";  
        foreach (KeyValuePair<string, string> mappedPath in mappedPathsInConfigFile)  
        {  
            DocumentPath = mappedPath.Value.Replace("/", "\\");  
        }  
 
        string VirtualPath = Request["__EVENTARGUMENT"];  
        string EventTarget = Request["__EVENTTARGET"];  
        if (EventTarget == "Archive")  
        {  
            if (VirtualPath.LastIndexOf("/") + 1 == VirtualPath.Length)  
            {  
                Archive(VirtualPath, "Folder",DocumentPath );  
            }  
            else  
            {  
                Archive(VirtualPath, "File",DocumentPath );  
            }  
        }  
 
        if (!IsPostBack)  
        {  
            string[] viewPaths = new string[] { DocumentPath };  
            string[] uploadPaths = new string[] { DocumentPath };  
            string[] deletePaths = new string[] { DocumentPath };  
 
            DocumentsRadFileExplorer.Configuration.ContentProviderTypeName = typeof(CustomFileSystemProvider).AssemblyQualifiedName;  
            DocumentsRadFileExplorer.Configuration.ViewPaths = viewPaths;  
            DocumentsRadFileExplorer.Configuration.UploadPaths = uploadPaths;  
            DocumentsRadFileExplorer.Configuration.DeletePaths = deletePaths;  
 
            AddCreatedAndModifiedDate();  
          
        }  
       
      
          
 
 
 
        //if you want the custom context menu item to be visible in the grid as well  
         
        if (!IsPostBack)  
        {  
            //context menu item  
            RadMenuItem customMenuOption = new RadMenuItem("Archive");  
            customMenuOption.PostBack = false;  
            customMenuOption.Value = "Archive";  
            if (DocumentsRadFileExplorer.TreeView.ContextMenus[0].Items.FindItemByText("Archive") == null)  
            {  
                DocumentsRadFileExplorer.TreeView.ContextMenus[0].Items.Add(customMenuOption);  
 
            }  
 
            DocumentsRadFileExplorer.GridContextMenu.Items.Add(customMenuOption.Clone());  
            DocumentsRadFileExplorer.TreeView.OnClientContextMenuItemClicked = "treeContextMenuClicked";  
 
              
        }  
 
    }  
 
 
 
    private void AddGridColumn(string name, string uniqueName, bool sortable)  
    {  
        //remove first if grid has a column with that name  
        //RemoveGridColumn(uniqueName);  
        // Add a new column with the specified name  
        GridTemplateColumn gridTemplateColumn1 = new GridTemplateColumn();  
        gridTemplateColumn1.HeaderText = name;  
        if (sortable)  
        {  
            gridTemplateColumn1.SortExpression = uniqueName;  
            gridTemplateColumn1.UniqueName = uniqueName;  
            gridTemplateColumn1.DataField = uniqueName;  
              
        }  
 
        DocumentsRadFileExplorer.Grid.Columns.Add(gridTemplateColumn1);  
    }  
 
    private void AddCreatedAndModifiedDate()  
    {  
        AddGridColumn("Created Date", "Date", true);  
        AddGridColumn("Modified Date", "Date", true);  
 
 
    }  
 
    private static int DateComparer(FileBrowserItem item1, FileBrowserItem item2)  
    {  
        //treat folders separate from files  
        DateTime date1 = DateTime.Parse(item1.Attributes["Date"]);  
        DateTime date2 = DateTime.Parse(item2.Attributes["Date"]);  
        if (item1 is DirectoryItem)  
        {  
            if (item2 is DirectoryItem)  
            {  
                return DateTime.Compare(date1, date2);  
            }  
            else  
            {  
                return -1;  
            }  
        }  
        else  
        {  
            if (item2 is DirectoryItem)  
            {  
                return 1;  
            }  
            else  
            {  
                return DateTime.Compare(date1, date2);  
            }  
        }  
    }  
 
    public void Archive(string VirtualPath, string DocType, string DocumentPath)  
    {  
        string physicalTargetPath = DocumentPath.Substring(0,DocumentPath.IndexOf("SharedDocument")).Replace("\\","/") + VirtualPath;  
        if (DocType == "Folder")  
            FileSystem.ArchiveFolder(physicalTargetPath, VirtualPath);  
        else  
            FileSystem.ArchiveFile(physicalTargetPath, VirtualPath);  
 
        Response.Redirect("DocumentManagementSystem.aspx");  
    }  
 
    protected void DocumentsRadFileExplorer_GridPopulated(object sender, RadFileExplorerGridEventArgs e)  
    {  
        //implement sorting for the custom Date column  
        string CreatedDateColumn = e.SortColumnName;  
        string ModifiedDatesortingColumn = e.SortColumnName;  
        if (CreatedDateColumn == "Created Date")  
        {  
            e.List.Sort(DateComparer);  
            if (e.SortDirection.IndexOf("DESC") != -1)  
            {  
                //reverse order  
                e.List.Reverse();  
            }  
 
        }  
 
 
        if (ModifiedDatesortingColumn == "Modified Date")  
        {  
            e.List.Sort(DateComparer);  
            if (e.SortDirection.IndexOf("DESC") != -1)  
            {  
                //reverse order  
                e.List.Reverse();  
            }  
        }  
 
    }  
 
 
    //public class CustomColumnsContentProvider : FileSystemContentProvider  
    //{  
 
 
    //}  
 
 
}  
 

While for CUSTOMCOLUMNSCONTENT PROVIDER , I have used the code in the separate file as shown below :-
using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Web;  
using Telerik.Web.UI.Widgets;  
using System.Configuration;  
using System.IO;  
using System.Security.Permissions;  
using System.Security;  
using System.Xml;  
using System.Text.RegularExpressions;  
 
 
/// <summary> 
/// Summary description for CustomFileSistemProvider  
/// </summary> 
public class CustomFileSystemProvider : FileBrowserContentProvider  
{  
    GetMappedPath GMP = new GetMappedPath();  
    private string _itemHandlerPath;  
    public string ItemHandlerPath  
    {  
        get  
        {  
            return this._itemHandlerPath;  
        }  
    }  
 
    private PathPermissions fullPermissions = PathPermissions.Read | PathPermissions.Delete | PathPermissions.Upload;  
    private Dictionary<string, string> mappedPathsInConfigFile;  
 
    /// <summary> 
    /// Returns the mappings from the configuration file ;   
    /// </summary> 
    public Dictionary<string, string> MappedPaths  
    {  
        get { return mappedPathsInConfigFile; }  
    }  
 
    public CustomFileSystemProvider(HttpContext context, string[] searchPatterns, string[] viewPaths, string[] uploadPaths, string[] deletePaths, string selectedUrl, string selectedItemTag)  
        :  
        base(context, searchPatterns, viewPaths, uploadPaths, deletePaths, selectedUrl, selectedItemTag)  
    {  
        // The paths look like "C:\Foder_1\Folder_2" or "C:\Foder_1\Folder_2\"   ;  
        this.mappedPathsInConfigFile = GMP.GetMappingsFromConfigFile(); ;  
        this._itemHandlerPath = GMP.GetPathToGenericHandler();  
    }  
 
    public override DirectoryItem ResolveRootDirectoryAsTree(string path)  
    {  
        string physicalPath;  
        string virtualPath = string.Empty;  
 
        if (this.IsPhysicalPath(path))  
        {// The path is a physical path ;  
            physicalPath = path;  
 
            foreach (KeyValuePair<string, string> mappedPath in MappedPaths)  
            {  
                // Check whether a mapping exists for the current physical paths ;  
                if (GMP.AddSlashAtEndOfPhysicalPath(physicalPath).ToLower().StartsWith(mappedPath.Value.ToLower()))  
                {// Exists   
                    virtualPath = Regex.Replace(GMP.AddSlashAtEndOfPhysicalPath(physicalPath), Regex.Escape(mappedPath.Value), mappedPath.Key, RegexOptions.IgnoreCase);  
                    virtualPathvirtualPath = virtualPath.Replace('\\', '/');  
                    virtualPath = GMP.AddSlashAtEndOfVirtualPath(virtualPath);  
                    break;// Exit the 'foreach' loop ;  
                }  
            }  
 
            // Mappind does not exist ;  
        }  
        else  
        {// Virtual path ;  
            virtualPath = GMP.AddSlashAtEndOfVirtualPath(path);  
            physicalPath = this.GetPhysicalFromVirtualPath(path);  
            if (physicalPath == null)  
                return null;  
        }  
 
        DirectoryItem result = new DirectoryItem(this.GetDirectoryName(physicalPath), string.Empty, virtualPath, string.Empty, fullPermissions, null, GetDirectories(virtualPath));  
        foreach (DirectoryItem dirItem in result.Directories)  
        {  
            // Get the information from the physical directory  
            DirectoryInfo dInfo = new DirectoryInfo(Context.Server.MapPath(VirtualPathUtility.AppendTrailingSlash(dirItem.Path)));  
 
            // Add the information to the attributes collection of the item. It will be automatically picked up by the FileExplorer  
            // If the name attribute matches the unique name of a grid column  
 
 
            dirItem.Attributes.Add("Created Date", dInfo.LastWriteTime.ToString());  
            dirItem.Attributes.Add("Modified Date", dInfo.LastAccessTime.ToString());  
             
        }  
 
 
        return result;  
    }  
 
    public override DirectoryItem ResolveDirectory(string virtualPath)  
    {  
        string physicalPath;  
        physicalPath = this.GetPhysicalFromVirtualPath(virtualPath);  
 
        if (physicalPath == null)  
            return null;  
 
        DirectoryItem result = new DirectoryItem(this.GetDirectoryName(physicalPath), virtualPath, virtualPath, virtualPath, fullPermissions, GetFiles(virtualPath), null);  
 
        foreach (FileItem fileItem in result.Files)  
        {  
            // Get the information from the physical file  
            FileInfo fInfo = new FileInfo(Context.Server.MapPath(VirtualPathUtility.AppendTrailingSlash(result.Path) + fileItem.Name));  
 
            // Add the information to the attributes collection of the item. It will be automatically picked up by the FileExplorer  
            // If the name attribute matches the unique name of a grid column  
 
            fileItem.Attributes.Add("Created Date", fInfo.CreationTime.ToString());  
            fileItem.Attributes.Add("Modified Date", fInfo.CreationTime.ToString());  
 
            // Type targetType = typeof(System.Security.Principal.NTAccount);  
            // string value = fInfo.GetAccessControl().GetOwner(targetType).Value.Replace("\\", "\\\\");  
            //string ownerName = "Telerik";  
            //fileItem.Attributes.Add("Owner", ownerName);  
        }  
 
 
 
        return result;  
    } 
My application does not return any error.
I dont know where is Iam doing mistake ???

Please help ??

Ajay Jamwal

 
Rumen
Telerik team
 answered on 14 Sep 2011
3 answers
129 views
Hi

I have 2 radchart in my page. I am differentiating these two charts based on the two column. There are Dispensation and Discretion. using the above two columns, i am setting as DataManager.ValuesYColumns for each chart.  I am applying group by "Type" which is another column.  This code is working perfect  for Discretion. The same one is not working for Dispensation. In Dispensation, i have values for December and march month. But it is appearing in the December month. I did sample application application. it is working exactly how i need. When i copy and paste the same code in my project it is behaving differently.  I have spent 2 days to fix this. I tried all possible ways.

chart.PlotArea.XAxis.DataLabelsColumn = "MonthYear";
        chart.PlotArea.XAxis.Appearance.ValueFormat = Telerik.Charting.Styles.ChartValueFormat.ShortDate;
        chart.PlotArea.XAxis.Appearance.CustomFormat = "MMM-yy";
  
  
        chart.PlotArea.XAxis.AutoScale = false;
        chart.PlotArea.YAxis.AutoScale = false;
  
        chart.ChartTitle.Visible = true;
        chart.ChartTitle.TextBlock.Appearance.Visible = true;
        chart.ChartTitle.Appearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.TopLeft;
  
          
  
        if (chart.ID == "radChart")
        {
            chart.PlotArea.YAxis.AutoScale = true;
            chart.DataManager.ValuesYColumns = new string[] { "Discretion" };
            //chart.PlotArea.YAxis.MinValue = start;
            //chart.PlotArea.YAxis.MaxValue = end;
            //chart.PlotArea.YAxis.LabelStep = diff;
            if (strCrewType == "FD")
                chart.ChartTitle.TextBlock.Text = "Incidents of Flight Deck Operating into Discretion";
            else
                chart.ChartTitle.TextBlock.Text = "Incidents of Crew Operating into Discretion";
        }
        else
        {
            chart.PlotArea.YAxis.AutoScale = false;
            //chart.PlotArea.YAxis.MinValue = start;
            //chart.PlotArea.YAxis.MaxValue = end;
            chart.PlotArea.YAxis.LabelStep = diff;
            chart.DataManager.ValuesYColumns = new string[] { "Dispensations" };
  
            chart.ChartTitle.TextBlock.Text = "QCAA Dispensations";
        }
  
        chart.DefaultType = Telerik.Charting.ChartSeriesType.StackedBar;
  
chart.DataGroupColumn = "Type";
var obj = (from c in listCrewMetricsOut
                           where c.CrewType == strCrewType
                           select c);
                chart.DataSource = obj;
                chart.DataBind();
Yavor
Telerik team
 answered on 14 Sep 2011
1 answer
98 views
I can get a menu to have a specific root level height and scrolling, if I had code the menu items i.e.

<telerik:RadMenu ID="RadMenu1" runat="server" EnableAutoScroll="True" Height="20px"
                Skin="AFKN" Font-Bold="True" EnableEmbeddedSkins="False" OnItemClick="RadMenu1_ItemClick">
                <collapseanimation type="OutQuint" duration="200"></collapseanimation>
                <items>
                   <telerik:RadMenuItem runat="server" Text="Home" OnItemClick="RadMenu1_ItemClick" NavigateUrl="MenuTest.aspx">
 <GroupSettings Height="100px"> </GroupSettings>
                       <Items>
                           <telerik:RadMenuItem runat="server" Text="Blah"  NavigateUrl="TabTest.aspx">
                         
                               <Items>
                                   <telerik:RadMenuItem runat="server" Text="More Blah Blah" NavigateUrl="#">
                                   </telerik:RadMenuItem>
                               </Items>
                           </telerik:RadMenuItem>
                           <telerik:RadMenuItem runat="server" Text="Blah Blah" NavigateUrl="#">
                           </telerik:RadMenuItem>
                           <telerik:RadMenuItem runat="server" Text="Blah Blah Blah" NavigateUrl="#">
                           </telerik:RadMenuItem>
                           <telerik:RadMenuItem runat="server" Text="Blah Blah Blah Blah" NavigateUrl="#">
                           </telerik:RadMenuItem>
                           <telerik:RadMenuItem runat="server" Text="Blip Blip" NavigateUrl="#">
                               <Items>
                                   <telerik:RadMenuItem runat="server" Text="More Blip Blip" NavigateUrl="#">
                                    <Items>
                                       <telerik:RadMenuItem runat="server" Text="Blop" NavigateUrl="#"></telerik:RadMenuItem>
                                       <telerik:RadMenuItem runat="server" Text="Blop Blop" NavigateUrl="#"></telerik:RadMenuItem>
                                       <telerik:RadMenuItem runat="server" Text="Blop Blop Blop" NavigateUrl="#"></telerik:RadMenuItem>
                                   </Items>
                                  
                                  
                                   </telerik:RadMenuItem>
                               </Items>
                           </telerik:RadMenuItem>
                           <telerik:RadMenuItem runat="server" Text="Bleep Bleep" NavigateUrl="#">
                           </telerik:RadMenuItem>
                           <telerik:RadMenuItem runat="server" Text="Bleep Bleep Bleep" NavigateUrl="#">
                           </telerik:RadMenuItem>
                           <telerik:RadMenuItem runat="server" Text="Bleep Bleep Bleep Bleep" NavigateUrl="#">
                           </telerik:RadMenuItem>                          
                       </Items>
                   </telerik:RadMenuItem>
                   <telerik:RadMenuItem runat="server" Text="About Us" NavigateUrl="#">
                       <Items>
                           <telerik:RadMenuItem runat="server" Text="Blah" NavigateUrl="#">
                           </telerik:RadMenuItem>
                           <telerik:RadMenuItem runat="server" Text="Blah Blah" NavigateUrl="#">
                               <Items>
                                   <telerik:RadMenuItem runat="server" Text="More Blah Blah" NavigateUrl="#">
                                   </telerik:RadMenuItem>
                               </Items>
                           </telerik:RadMenuItem>
                           <telerik:RadMenuItem runat="server" Text="Blah Blah Blah" NavigateUrl="#">
                           </telerik:RadMenuItem>
                           <telerik:RadMenuItem runat="server" Text="Blah Blah Blah Blah" NavigateUrl="#">
                           </telerik:RadMenuItem>
                       </Items>
                   </telerik:RadMenuItem>
                   <telerik:RadMenuItem runat="server" Text="Services" NavigateUrl="#">
                   </telerik:RadMenuItem>
                   <telerik:RadMenuItem runat="server" Text="Case Studies" NavigateUrl="#">
                   </telerik:RadMenuItem>
               </items>
            </telerik:RadMenu>

However, how do I get the same behavior, when bound to a site map? i.e.

 <asp:SiteMapDataSource ID="siteMapDataSource" runat="server"
  SiteMapProvider="GlobalNavigationSiteMap" StartingNodeOffset="0"  ShowStartingNode="False"/>

    <telerik:RadMenu ID="radMenuMainNav" runat="server" EnableAutoScroll="True" Height="20px"
        DataSourceID="siteMapDataSource"  Flow="Horizontal">
        <collapseanimation type="OutQuint" duration="200"></collapseanimation>
    </telerik:RadMenu>

Thanks in advance,

Keith
Kate
Telerik team
 answered on 14 Sep 2011
3 answers
219 views
I have a new RadGrid on a page within an existing asp Update Panel.  I have enabled selecting rows, and created an event to run when the user selects a row, and I thought I did what I needed to tell the RadGrid which event to fire, but I can't get the server side event to fire.  Can someone please tell me what am I missing here?

<telerik:RadGrid ID="gridLink" runat="server" AllowPaging="True" AutoGenerateColumns="False" CellSpacing="0" 
            DataSourceID="sdsLinkRecords" GridLines="None" ShowGroupPanel="True" AllowCustomPaging="True" Skin="Simple" 
            OnItemCommand="gridLink_ItemCommand">
            <ClientSettings AllowDragToGroup="True">
                <Selecting AllowRowSelect="True" />
            </ClientSettings>
            <MasterTableView DataKeyNames="fullID" DataSourceID="sdsLinkRecords">
                <CommandItemSettings ExportToPdfText="Export to PDF" />
                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                    <HeaderStyle Width="10px" />
                </RowIndicatorColumn>
                <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                    <HeaderStyle Width="10px" />
                </ExpandCollapseColumn>
                <Columns>
 ...
                </Columns>
                <EditFormSettings>
                    <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                    </EditColumn>
                </EditFormSettings>
            </MasterTableView>
            <FilterMenu EnableImageSprites="False">
            </FilterMenu>
            <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
            </HeaderContextMenu>
        </telerik:RadGrid>

Protected Sub gridLink_ItemCommand(sender As Object, e As Telerik.Web.UI.GridCommandEventArgs) Handles gridLink.ItemCommand
  
        If e.CommandName = "Select" Then
            Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)
            Dim oldReportsID As String = lblFullSeqNum.Text
            Dim tblIncidentsID As Integer = item("tblIncidentsID").Text
  
....
        End If
  
    End Sub
Nicole
Top achievements
Rank 1
 answered on 14 Sep 2011
14 answers
364 views
I looking to make a appointment scheduler that has 3 distinct views.
1) For the business schedule. IE Monday-Friday 9-5
2) Business appointments, which contains all the client appointments
2) The client: show only their appointments and what is available based on the business schedule

All of the appointment would be tagged with a custom attribute called type, which would be either business or client. I wanted to business to go in a create their schedule, which would be tagged business.

I don't think 1 and 2 are difficult since you can change the query for each one them. One asking for the business and the other for client.

The problem is 3. I want the client to see availability based on the business schedule.  Also, to mark off times when other people have made appointments.  I dont want to see either these in the scheduler as appointments.  What I wanted to do in the TimeSlotCreated event was if the custom attribute was for the business, not to show the appointment, but I did want to change the cssclass field available style. If the appointment was by another person, I wanted again not show it as an appointment,but I also wanted to change to cssclas field to a taken style. and lastly for the use to show their appointment.

any direction is appreciated.  i tried removing an appointment in the TimeSlotCreated event.  I was also thinking of having 2 schedulers on the page. one that was not visiable and using the data from the other one to do this.
Peter
Telerik team
 answered on 14 Sep 2011
5 answers
217 views
Hi to all,
I validated my XHTML Transitional page using W3C online validator and following error comming from RadButton was obtained
Line 192, Column 289: there is no attribute "align" 
…><span class="rbText rbPrimary" align="center">Obsah spravodajcu []</span><inp…✉ 
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using ....

My Radbutton is defined in markup:
<td style="width:190px;white-space:nowrap;text-align:right">
   <telerik:RadButton ID="btnDoc" runat="server" ButtonType="LinkButton" Width="190px"
        Text='<%# "Obsah spravodajcu [" + Utils.GetFileLengthFriendly(Server.MapPath("~/Documents/" +  Eval   ("Document"))) + "]" %>' NavigateUrl='<%# "~/Documents/" +  Eval("Document")%>' Target="_blank" Visible='<%# Eval("Document") != null %>' CausesValidation="false" CssClass="unwrapped">
        <Icon PrimaryIconUrl="~/Styles/icon_pdf.png" />
    </telerik:RadButton>    
 </td>

I can not find the reason why not allowed attribute align="center" is rendered for relevant span tag.
Any idea?
Thanks
-Marian
Marian
Top achievements
Rank 1
 answered on 14 Sep 2011
3 answers
358 views
Hello,

All my RadGrid Columns are dynamic i have to create columns based on current a page state. I ll come to know the columns to be created only on a selection of a dropdownlist in the same page.
Please let me know the right RadGrid event to create a dynamic columns in the RadGrid.

Appreciate you quick response.

Thanks
Prabhu
Petrofac
Top achievements
Rank 1
 answered on 14 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?