Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
709 views

Hello,

I dont know whether this is the right place to put this query, but i have read somewhere that RadDateTimePicker is part of RadClender control....so putting it here....

I want to hide DatePopup button programmatically on client side.

is there any way to hide/unhide DatePopup button depend upon business logic ?


Also I tried to enable/disable RadDateTimePicker control , but giving "Object Required" issue in following scenario. I am using "2009.3.1103.35" version.

Scenario :-

1. RadDateTimePicker is disable using follwoing code    
    

 

                var objradDateValidity = $find("<%= radValidity.ClientID %>");

 

 

                objradDateValidity.set_enabled(false);

2. Then after some businees logic ,I make it enable as follows

               var objradDateValidity = $find("<%= radValidity.ClientID %>");

 

 

                objradDateValidity.set_enabled(true);

3. And Now if I change date value using Date popup button and again try to make it disable , it throws "Object Required" error.

4. If I dont change date value and try to make it disable, it does it without throwing any error.



any help will be highly appreciated.

Thanks,

Ajay Khedekar
Dimo
Telerik team
 answered on 23 Feb 2010
1 answer
72 views
Hello,

Even if I enable "Print background colors and images" property under ie8, the background color of appointments doesn't appear on the print page.
I use this simple css for RadScheduler :

.RadScheduler .rsAptContent, 
.RadScheduler .rsAptMid .rsAptIn, 
.RadScheduler .rsAptMid, 
.RadScheduler .rsAptOut 
{ 
    background:red !important; 
} 

With firefox3.5.7, opera10.10 and ie7, the background color is visible.

Could you tell me what is missing ?
Kamen Bundev
Telerik team
 answered on 23 Feb 2010
6 answers
185 views
I'm running into an issue related to resizing dynamically created docks. I'm adding docks in a similar way to the My Portal example provided here http://www.telerik.com/DEMOS/ASPNET/Prometheus/Dock/Examples/MyPortal/DefaultCS.aspx. However I haven't been able to make my docks resizable. I tried adding  "dock.Resizable = true;" to both the CreateRadDock() and CreateRadDockFromState() functions but that didn't work. I know with normal docks you have to set the behavior but I haven't been able to figure out how to do it dynamically. Any help would be appreciated. Thanks.

Kyle
Pero
Telerik team
 answered on 23 Feb 2010
1 answer
121 views
Hi;
I'm trying the trial version of rad web controls in .net2005 framework 2.0. In a page i had a RadPanelBar with 5 RadPanelItem in a RadAjaxPanel.
I had added asp:ScriptManager, telerik:RadAjaxManager with the settings that you have give in the samples. Write the server side code as given in the samples too and it works. When a radpanelitem expanded i'm loading a standard user control (with standard rad or asp items) in it.
I want to has a RadTabStrip in this user control. I had found a sample in your samples that how to load on demand with RadMultiPage in a tabstrip.
I all copied the necessary code from the sample to my usercontrol. when i build it gave the error about adding more than 1 RadScriptManager. And deleted the one in the user control cause i thought it can use the one in the page.
When i build there is no error now. But I can't see the tabstrip in the RadPanelItem.
Where should i check about this problem?
Alperozgur
Top achievements
Rank 1
 answered on 23 Feb 2010
1 answer
115 views
Good day!

We've noticed some performance issue when trying to do CRUD operations on the scheduler. It seems there's a couple of seconds delay from the end of Page_Load() to the starting point of the CRUD event handlers on postback. Is there any way to improve this?

Thanks.
Peter
Telerik team
 answered on 23 Feb 2010
1 answer
113 views
Hi,
I am just writing to see if it is possible to specify the original position of the spell check dialog. We have spellchecker in an iframe which is causing an unnecessary scrolling when popup is launched(I guess popup is set up to position itself in the center by default)? We are thinking that if we can specify the absolute position, scrolling will not happen.
Thank you for your help!
Kate
Georgi Tunev
Telerik team
 answered on 23 Feb 2010
1 answer
86 views
Hi,

I am having trouble getting radwindow to work in cookieless session. If I enable cookies, it works fine. I am trying to open a page in radwindow. I get the following error

The file '/Sample/(S(zn30jp45etuqgi55evymf5fs))/User/Edit.aspx' doesnot exist.
Where Sample is the application root folder.

I think I need to use the Response.ApplyAppPathModifier  method. But I cant figure out how to use it with the setUrl method.

I would appreciate any help in this matter

thanks




Georgi Tunev
Telerik team
 answered on 23 Feb 2010
1 answer
212 views
Hi,

I am using RadGrid binded to objectdatasource, I am trying to provide a facility to users to export the grid data to csv file.

the aspx file is as follow:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestRadGrid._Default" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"
            DataSourceID="ObjectDataSource1" GridLines="None" AllowCustomPaging="True"
            AllowPaging="True" AllowSorting="True"
            onitemcommand="RadGrid1_ItemCommand" >
        <MasterTableView CommandItemDisplay="Top" DataSourceID="ObjectDataSource1">
            <CommandItemSettings ShowExportToCsvButton="true" />
                 <Columns>
                    <telerik:GridBoundColumn DataField="Name" HeaderText="Name" SortExpression="Name" />
                    <telerik:GridBoundColumn DataField="Age" HeaderText="Age" SortExpression="Age" />
                    <telerik:GridBoundColumn DataField="DOB" HeaderText="DOB" SortExpression="DOB" />
                 </Columns>
        </MasterTableView>
        </telerik:RadGrid>
    </div>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"  EnablePaging="True" SelectCountMethod = "getCount" SortParameterName = "sortExpression"
        SelectMethod="GetData" TypeName="TestRadGrid.DataClass">
        <SelectParameters>
            <asp:Parameter Name="criteria" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
    </form>
</body>
</html>

and code behind is as follows:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TestRadGrid
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void RadGrid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
        {
            if (e.CommandName == "ExportToCsv")
            {
                RadGrid1.VirtualItemCount = 12;
                RadGrid1.PageSize = 12;
                RadGrid1.ExportSettings.IgnorePaging = true;
                RadGrid1.ExportSettings.OpenInNewWindow = true;
                //RadGrid1.ExportSettings.ExportOnlyData = true;
                RadGrid1.ExportSettings.FileName = "Test";
                RadGrid1.MasterTableView.ExportToCSV();
            }
        }
    }
}


DataClass providing the methods to objectdatasource is:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

namespace TestRadGrid
{
    public class DataClass
    {
        public DataRow[] GetData(string criteria, int maximumRows, int startRowIndex, string sortExpression)
        {
            DataSet ds = new DataSet();
            
            ds.Tables.Add("Table");
            ds.Tables[0].Columns.Add("Id",System.Type.GetType("System.Int32"));
            ds.Tables[0].Columns.Add("Name");
            ds.Tables[0].Columns.Add("Age");
            ds.Tables[0].Columns.Add("DOB");
            DataRow nrow;
            for (int x = 0; x < 12; x++)
            {
                nrow=ds.Tables[0].NewRow();
                nrow["Id"] = x;
                nrow["Name"]="abc" + x.ToString();
                nrow["Age"] = x;
                nrow["DOB"] = DateTime.Now.AddDays(x);
                ds.Tables[0].Rows.Add(nrow);
            }

            int start=startRowIndex;
            int max=startRowIndex+maximumRows;
            DataRow[] rows = ds.Tables[0].Select("Id>=" + start.ToString() + " and Id<=" + max.ToString(), "");


            return rows;
        }

        public int getCount(string criteria)
        {
            return 12;
        }
        
    }
}

This code is not working, please check the above and advice what i am doing wrong here.

Regards,

Syed Fahad Anwar



Princy
Top achievements
Rank 2
 answered on 23 Feb 2010
1 answer
146 views
Hi
I wanted to have atlest 5-6 coulumns under one heading in a grid.I saw the code which was posted in the below link

http://www.telerik.com/community/code-library/aspnet-ajax/grid/individual-filtering-and-sorting-for-sub-columns-in-template-column.aspx

Now the problem what i am facing is ,when the data is very long, the complete column in the grid gets de-align ..I tried even fixing the size still the same result,
Even in the code which was posted in the thread ,when i change the data its the same issue.

Is there any other method other than GridTemplateColumn to implement it.

This is the same code which i got from that thread,i have highlighted the thing i  have changed.

<radG:RadGrid ID="RadGrid1" AllowPaging="True" AutoGenerateColumns="False" AllowFilteringByColumn="True"
                runat="server" Width="200px" Skin="Glassy">
                <MasterTableView Width="100%">
                    <Columns>
                        <custom:MyCustomFilteringColumn datafield1="Country" datafield2="City" headertext="Country/City"
                            uniquename="MyCustomTemplateColumn" HeaderStyle-VerticalAlign="Middle">
                            <headertemplate>
                            <table id="Table1" cellspacing="1" cellpadding="1" width="100%" border="1">
                                <tr>
                                    <td colspan="2" align="center"><b>Address</b></td>
                                </tr>
                                <tr>
                                    <td style="width:50%">
                                        <asp:LinkButton id="btnSortByCountry" Text="Country" Tooltip="Sort by Country" CommandName='Sort'
                                            CommandArgument='Country' runat="server" Width="100%" /></td>
                                    <td style="width:50%">
                                        <asp:LinkButton id="btnSortByCity" Text="City" ToolTip="Sort by City" CommandName='Sort' CommandArgument='City'
                                            runat="server" Width="100%" /></td>
                                </tr>
                            </table>
                        </headertemplate>
                            <itemtemplate>
                            <table id="Table2" cellspacing="1" cellpadding="1" width="100%" border="1">
                                <tr>
                                    <td style="width:50%">RandomValuuesWithOutSpace</td>
                                    <td style="width:50%"><%# Eval("City") %></td>
                                </tr>
                            </table>
                        </itemtemplate>
                        </custom:MyCustomFilteringColumn>
                    </Columns>
                </MasterTableView>
                <PagerStyle Mode="NumericPages" />
            </radG:RadGrid>




Pavlina
Telerik team
 answered on 23 Feb 2010
4 answers
152 views

The pager control on the bottom of the grid shows with the first, prev on one line, pages on a second line, next, last on a third line, page size on a 4th line and item count/numb pages on the 5th line.

I have played with the wrap function, mode, etc of the pager and haven't had any significant changes, none good at least. I can change the text for he pager size and have it reflect so the changes are working. The grid is created in code and added to a placeholder control.

Below is the code above all the columns and the add to place holder, but it is the area where all the formatting is set.

Hopefully you can tell me what when wrong. The problem came up with I upgraded the website, so it had something to do with the changes. I am currently on 2009.3.1314.35

Thanks for your help
Randy Miller

gvReceipts.BorderStyle = BorderStyle.Solid

gvReceipts.BorderWidth = 1

gvReceipts.CellPadding = 3

'gvReceipts.Font.Size = 3

 

 

gvReceipts.ForeColor = Drawing.Color.Black

gvReceipts.GridLines = GridLines.Vertical

gvReceipts.AllowPaging = True

 

 

gvReceipts.AllowSorting = True

 

 

gvReceipts.AutoGenerateColumns = False

 

 

gvReceipts.Height = 415

gvReceipts.Width = 1350 ' Unit.Percentage(100)

 

 

gvReceipts

gvReceipts.FooterStyle.Width = gvReceipts.Width

gvReceipts.FooterStyle.Wrap = False

 

 

'gvReceipts.PagerStyle.Mode = GridPagerMode.Slider

 

 

gvReceipts.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric

'gvReceipts.PagerStyle.

 

 

gvReceipts.Skin = ""

 

 

gvReceipts.PagerStyle.Width = gvReceipts.Width

gvReceipts.MasterTableView.PagerStyle.Width = gvReceipts.Width

gvReceipts.PagerStyle.Wrap = False

 

 

gvReceipts.MasterTableView.PagerStyle.Wrap = gvReceipts.PagerStyle.Wrap

'gvReceipts.Skin = "Default"

 

 

gvReceipts.PageSize = 15

gvReceipts.GroupingEnabled = True

 

 

gvReceipts.ShowGroupPanel = True

 

 

gvReceipts.ClientSettings.AllowDragToGroup = True

 

 

'gvReceipts.HeaderStyle.BackColor = Drawing.ColorTranslator.FromHtml("#711000")

 

 

gvReceipts.HeaderStyle.Font.Bold = True

 

 

'gvReceipts.HeaderStyle.ForeColor = Drawing.ColorTranslator.FromHtml("#DDAA22")

 

 

'gvReceipts.HeaderStyle.BorderColor = Drawing.ColorTranslator.FromHtml("#711000")

 

 

gvReceipts.HeaderStyle.BorderStyle = BorderStyle.None

'gvReceipts.FooterStyle.BackColor = Drawing.ColorTranslator.FromHtml("#CCCCCC")

 

 

'gvReceipts.MasterTableView.DataMember = "Customers"

 

 

''gvReceipts.MasterTableView.PageSize = 15

 

 

gvReceipts.MasterTableView.AlternatingItemStyle.BackColor = Drawing.ColorTranslator.FromHtml("#6699FF")

gvReceipts.MasterTableView.AlternatingItemStyle.Wrap = False

 

 

RefreshData()

gvReceipts.MasterTableView.DataKeyNames = New String() {"rtn_pnref", "clientid"}

Dim colNewColumn As GridBoundColumn

Dim colNewButtonColumn As GridButtonColumn = New GridButtonColumn

colNewButtonColumn.ButtonType = GridButtonColumnType.ImageButton

colNewButtonColumn.HeaderText = "Select"

 

 

colNewButtonColumn.ImageUrl = "~/ClientServices/insurance/images/print.gif"

 

 

colNewButtonColumn.CommandName = "print"

 

 

colNewButtonColumn.AutoPostBackOnFilter = "True"

 

 

colNewButtonColumn.UniqueName = "colSelect"

 

 

colNewButtonColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center

gvReceipts.MasterTableView.Columns.Add(colNewButtonColumn)

Randy
Top achievements
Rank 1
 answered on 23 Feb 2010
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?