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

<

 

 

script type="text/javascript" src="../Scripts/corCalendarEvent.js"></script>
<

 

 

script type="text/javascript">

 

 

 

 

 

 

 

function OpenCalendarSectionWin(sender, eventArgs) {  

 

var oWnd = $find("<%=EventWindow.ClientID %>");

 

oWnd.setUrl(

 

"HttpContext.Current.Request.Url.ToString()");

 

 

 

 

 

 

var apt = eventArgs.get_appointment();

 

subject = apt.get_subject();

description = apt.get_description();

start = apt.get_start();

end = apt.get_end();

start = dateFormat(start,

 

"dddd, mmmm, dS, yyyy, h:MM:ss TT");

 

 

 

end = dateFormat(end,

 

"dddd, mmmm, dS, yyyy, h:MM:ss TT");

 

 

 

document.getElementById(

 

"EventText").innerHTML = subject;

 

 

 

document.getElementById(

 

"EventDescription").innerHTML = description;

 

 

 

document.getElementById(

 

"EventStart").innerHTML = start.toString() + " CST";

 

 

 

document.getElementById(

 

"EventEnd").innerHTML = end.toString() + " CST";

 

 

 

oWnd.show();

}

 

 

</

 

 

script>

//Only in IE "7" do I get the following error: Object doesn't support this property or method
Please advise procedure

 

 

 

 

 

Kevon
Top achievements
Rank 1
 answered on 11 Nov 2010
11 answers
297 views
Hi,
I have a problem that only seems to occurs when the HierarchyLoadMode is set to Client. I have used the client mode in other similar scenarios and have not had any problems.
I load up an intial page in a rad window. This rad window contains a user control. This user control contains a rad grid summary, amongst other things.
The rad grid summary contains a master table and one detail table. The tables are databound using NeedDataSource and DetailTableDataBind. The grid has a column containing a link that launchs a different rad window which allows you to edit and save some related data. When you close the rad window, it fires the OnWindowClose hook of the radwindow and causes an ajax post back of the control that contains the rad grid (i.e. the controls contained in the original rad window). This all works fine until you expand one of master table rows.

If you expanded one of the items,and then try to open the second rad window again by clicking on that link in the radgrid column, then close the radwindow (hence triggering the ajax update to the control containing the grid), you get the error:

"Specified argument was out of the range of valid values.
Parameter name: ItemHierarchicalIndex"


This only occurs if HiearchyLoadMode is set to client. Setting it to ServerBind and ServerOnDemand is fine. I have the same exact setup somewhere else, and it is working ... So i must be doing something silly in this particular example. Would appreciate it if I could get some help.

The control containing the RadGrid:
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"> 
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="RadGridSummary"> 
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="RadGridSummary" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManagerProxy> 
<div class="BaseSummary" id="BaseSummaryDiv" runat="server"> 
    <div class="BaseSummaryControl"> 
        <telerik:RadGrid ID="RadGridSummary" runat="server" PageSize="10" AutoGenerateEditColumn="false" 
            GridLines="None" BorderStyle="Solid" AllowMultiRowSelection="true"> 
            <ClientSettings Selecting-AllowRowSelect="true"> 
            </ClientSettings> 
            <MasterTableView DataKeyNames="SecurityGuardAvailabilityTemplateId" CurrentResetPageIndexAction="SetPageIndexToFirst" 
                Dir="LTR" TableLayout="Auto" Frame="void" CommandItemDisplay="None" GridLines="Horizontal" HierarchyLoadMode="Client" 
                AutoGenerateColumns="false"> 
                <NoRecordsTemplate> 
                    <div> 
                        There are no records to display</div> 
                </NoRecordsTemplate> 
                <Columns> 
                    <telerik:GridTemplateColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                        ForceExtractValue="None" HeaderText="Availability Times" UniqueName="ShiftName"> 
                        <ItemTemplate> 
                            <asp:Label ID="guardAvailabilityTime" runat="server"></asp:Label> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                </Columns> 
                <ParentTableRelation> 
                    <telerik:GridRelationFields DetailKeyField="TemplateId" MasterKeyField="SecurityGuardAvailabilityTemplateId" /> 
                </ParentTableRelation> 
                <DetailTables> 
                    <telerik:GridTableView Name="DaysTable" DataKeyNames="TemplateId" AutoGenerateColumns="false"> 
                        <Columns> 
                            <telerik:GridBoundColumn HeaderText="Day" UniqueName="DayName" DataField="DayName"> 
                            </telerik:GridBoundColumn> 
                            <telerik:GridDateTimeColumn HeaderText="Start Time" UniqueName="StartTime" DataField="StartTime" 
                                DataFormatString="{0:HH:mm}"> 
                            </telerik:GridDateTimeColumn> 
                            <telerik:GridDateTimeColumn HeaderText="End Time" UniqueName="EndTime" DataField="EndTime" 
                                DataFormatString="{0:HH:mm}"> 
                            </telerik:GridDateTimeColumn> 
                        </Columns> 
                    </telerik:GridTableView> 
                </DetailTables> 
                <ExpandCollapseColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                    Resizable="False" Visible="False"> 
                    <HeaderStyle Width="20px" /> 
                </ExpandCollapseColumn> 
                <RowIndicatorColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                    Visible="False"> 
                    <HeaderStyle Width="20px" /> 
                </RowIndicatorColumn> 
            </MasterTableView> 
        </telerik:RadGrid> 
    </div> 
</div> 




This is the code that populates the grids:
void RadGridGuardSummary_DetailTableDataBind(object source, GridDetailTableDataBindEventArgs e) 
    { 
        if (e.DetailTableView.Name == "DaysTable") 
        { 
            GridDataItem parentRow = e.DetailTableView.ParentItem; 
            int securityGuardAvailabilitiesTemplateId = (int)parentRow.OwnerTableView.DataKeyValues[parentRow.ItemIndex]["SecurityGuardAvailabilityTemplateId"]; 
            SomeDataRecord rec = SomeDatatable.GetRecord(securityGuardAvailabilitiesTemplateId.ToString(), false); 
            e.DetailTableView.DataSource = DateTemplate.DayTemplate.GenerateDayTemplates(rec); 
        } 
    } 
 public void RadGridSummary_NeedDataSource(object source, GridNeedDataSourceEventArgs e) 
    { 
         DataTable data = this.GetData(); 
         if (data != null) 
            { 
                RadGridSummary.DataSource = data; 
            } 
    } 

This is the javascript that is called when the radwindow is closed:
function OnRadWindowClose() { 
                var oWnd = GetRadWindow(); 
                var parentWindow = oWnd.GetWindowManager().GetWindowByName("StandardWindow"); 
                var contentFrame = parentWindow.GetContentFrame(); 
                contentFrame.contentWindow.RefreshControls(); 
                oWnd.Close(); 
            } 

This is the RefreshControils method:
function RefreshControls() { 
                var ajaxManager = $find("<%=RadAjaxManager1.ClientID%>"); 
                if (ajaxManager != null) { 
                    ajaxManager.ajaxRequest("Refresh"); 
                } 
                return; 
            }        

This is the AjaxUpdate method
void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e) 
    { 
        if (e.Argument == "Refresh") 
        { 
            ReloadRecord(); 
        } 
    } 

Again, any help will be much appreciated. This one has me stumped
Radoslav
Telerik team
 answered on 11 Nov 2010
1 answer
106 views
In IE7 the resource header width is not wide enough to show the contents of the header.

Supposedly this was fixed in Q1 2010 SP1 (version 2010.1.415) :
  • Fixed: Timeline view Vertical header width is broken in IE7

I am running version 2010.2.826.35 and am still seeing the issue.

Just wondering if there is a workaround or something I can use.
Peter
Telerik team
 answered on 11 Nov 2010
10 answers
252 views
The Telerik Suite of tools is just plain Awesome, but now with the ability for a programmer to be able to also easily tweek the look and feel of the controls without having to know all that CSS crap is just genious.  I will be using the VSB as soon is it is made available in the control suite.  Thank you Telerik for making my job easier!

Steve
Bart Welch
Top achievements
Rank 1
 answered on 11 Nov 2010
5 answers
161 views
Hi!

I have an appointment like this:
StartDate: 2010-01-21 08:00
EndDate: 2010-01-23 10:00

In the scheduler it will be treated as an all-day-appointment only on day 2010-01-22.

Is it possible to treat the entire appointment as "all-day" in the scheduler somehow?

What I want is to show the appointment in the "all-day-row" all three days.
Dobry Zranchev
Telerik team
 answered on 11 Nov 2010
1 answer
83 views
itemcreated not fire when radmenu sits in a radgrid template column, should this be the case or i am doing something wrong?
Peter
Telerik team
 answered on 11 Nov 2010
1 answer
128 views
We put the Radtooltip control associate with Listbox, but tooltip only shows the empty box without contents. Could you login our site to take a look? Thanks

www.ocmtesting.com

Login: demouser@telserv.com

Password: p


Under Service/Mac menu, Click Ticket Resource View to test.

Thanks a lot.

Peter
Telerik team
 answered on 11 Nov 2010
6 answers
299 views
Hi Telerekians!

I had one little request... is there a way to control where the validation text appears?  Currently it is displaying above and below the control, but I'd rather be able to pick one or the other.  Is that possible/going to be possible?

Thank you!
Karl
Top achievements
Rank 1
 answered on 11 Nov 2010
4 answers
209 views
I've a page with a RadScheduler on it and I'm trying to get ToolTips working with the scheduler.

I've got all the relevant code from this example but the tooltip manager isn't firing its OnAjaxUpdate event. For information, my RadToolTipManager definition is shown below.

<telerik:RadToolTipManager runat="server"
                           ID="RadToolTipManager1"
                           Width="320"
                           Height="210"
                           Skin="Office2007"
                           Animation="None"
                           HideEvent="LeaveToolTip"
                           Text="Loading..."
                           RelativeTo="Element"
                           OnAjaxUpdate="RadToolTipManager1_AjaxUpdate"
                           OnClientBeforeShow="SchedulerToolTipBeforeShow"
                           EnableShadow="true"/>


I know that the relevant controls are being added to the TargetControls collection, I can watch it happen in the debugger and I can see that the ID of the control added to the TargetControls collection is the same as the appointment that is rendered on the page.

Putting a breakpoint in the server-side event handler fires nothing, but then I guess that that is because no Ajax request is ever made. I know this 'cos I added the alert call in to the following JS code from the page.
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequestHandler);
function beginRequestHandler(sender, args) {
    alert("!");
    if (args.get_postBackElement().id.indexOf('RadScheduler1') != -1) {
        hideActiveToolTip();
    }
}

and I don't get the alert or my expected tooltip. All I get is the standard HTML tooltip.

Is there a reason why the Ajax event wouldn't be called?

-- 
Stuart
Svetlina Anati
Telerik team
 answered on 11 Nov 2010
3 answers
362 views
When I export grid to excel column headers always centered. I cannot change it. radgrid's all column headersactuallt left aligned. this situation exists even in live demos. http://localhost:8301/radcontrols_aspnetajax/grid/examples/generalfeatures/exporting/defaultcs.aspx
can I change the headers's alignment while exported ? there's only one ticket at this forum and there's no answer to that. (I already tried offered solutions)
thanks.
Jörgen Hyving
Top achievements
Rank 1
 answered on 11 Nov 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?