Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
77 views
Hi,
     We are using asp.net Ajax 2008 Q3 version now we are trying to upgrade to newer version i followed the link 
 but did not find any luck pls. provide some help.

Thanks,
Sanjeev
Sanjeev
Top achievements
Rank 1
 answered on 26 Mar 2010
4 answers
208 views
Hi,

I have a VB.NET project with a FormView which has an EditItemTemplate and InsertItemTemplate.
Both templates contain a RadDatePicker with the same ID and properties assigned, because I want to reference both with the same code, depending on which FormViewMode is assigned. Unfortunately my code appears to pick up only the EditItemTemplate version of the RadDatePicker, regardless of the current FormViewMode. When the form is running in Insert mode, all standard .NET controls are bound successfully, but the RadDatePicker is not. I've tried calling the two RadDatePicker controls by different ID names, but the problem appears to be with Insert mode. Another forum post suggested changing the DefaultMode of the FormView, but this doesn't make any difference in my case. Any ideas would be greatly appreciated.

Cheers,
Neill Davies - Nightfreight I.T.


VB.NET (shortened):


 

 

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

 

 


If
Session("ApplicationStatus").ToString.Trim = "NEW" Then

 

 

 

 

CDCustomerDetails.ChangeMode(FormViewMode.Insert)

 

Else

 

 

 

CDCustomerDetails.ChangeMode(FormViewMode.Edit)

 

 

End If

 

 

 


Dim ProposedStartDateCtrl As RadDatePicker = CType(CDCustomerDetails.FindControl("RadProposedStartDate"), RadDatePicker)

 

ProposedStartDateCtrl.MinDate = DateTime.Now.Day &

"/" & DateTime.Now.Month & "/" & DateTime.Now.Year

 

ProposedStartDateCtrl.FocusedDate = ProposedStartDateCtrl.MinDate

 

 

End

 

Sub

 

 

 

 

The minimum date setting & focussed date only work when the form is running in Edit mode.


HTML (shortened):

 

 

<telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="4" BorderColor="Black" BorderStyle="Solid">

 

 

 

<telerik:RadPageView ID="RadPageView1" runat="server" Selected="True">

 

 

 

&nbsp;<asp:FormView ID="CDCustomerDetails" runat="server" DefaultMode="Insert" BorderColor="White" CssClass="form"

 

 

 

DataSourceID="datCustomerDetails">

 

 

 

<EditItemTemplate>

 

 

 

<table>

 

 

 

<tr>

 

 

 

<td>
<telerik:RadDatePicker ID="RadProposedStartDate" runat="server" Culture="English (United Kingdom)"

 

 

 

DbSelectedDate='<%# Bind("ProposedStartDate") %>'>

 

 

 

<Calendar UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" ViewSelectorText="x">

 

 

 

</Calendar>

 

 

 

<DatePopupButton HoverImageUrl="" ImageUrl="" />

 

 

 

</telerik:RadDatePicker>

 

 

 

<br />

 

 

 

<asp:RangeValidator ID="valProposedStartDate" runat="server" ControlToValidate="RadProposedStartDate"

 

 

 

Display="Dynamic" ErrorMessage="Only future dates accepted, format DD/MM/YYYY"

 

 

 

Font-Bold="True" MaximumValue="31/12/2099" MinimumValue="01/12/2009" Type="Date"

 

 

 

Width="216px"></asp:RangeValidator></td>

 

 

 

</tr>
</table>

 

 

 

</EditItemTemplate>

 

 

 

<InsertItemTemplate>
<table>

 

 

 

<tr>

 

 

 

<td>
<telerik:RadDatePicker ID="RadProposedStartDate" runat="server" Culture="English (United Kingdom)" DbSelectedDate='<%# Bind("ProposedStartDate") %>'>

 

 

 

<Calendar UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" ViewSelectorText="x">

 

 

 

</Calendar>

 

 

 

<DatePopupButton HoverImageUrl="" ImageUrl="" />

 

 

 

</telerik:RadDatePicker>

 

 

 

<br />

 

 

 

<asp:RangeValidator ID="valProposedStartDate" runat="server" ControlToValidate="RadProposedStartDate"

 

 

 

Display="Dynamic" ErrorMessage="Only future dates accepted, format DD/MM/YYYY"

 

 

 

Font-Bold="True" MaximumValue="31/12/2099" MinimumValue="01/12/2009" Type="Date"

 

 

 

Width="216px"></asp:RangeValidator></td>

 

 

 

</tr>
</table>

 

 

 

</InsertItemTemplate>

 

Jared Lewis
Top achievements
Rank 1
 answered on 26 Mar 2010
1 answer
109 views

I have the following code and it seems to work fairly well:

<table cellpadding="0" border="0" cellspacing="0">  
    <tr> 
        <td><%= Class.Property %></td>  
    </tr> 
</table> 
 

Now the problem is that the data doesnt get written when I place the previous code in a RadPanelBar ItemTemplate:
<telerik:RadPanelBar ID="SummaryPanelBar" runat="server">  
    <Items> 
        <telerik:RadPanelItem Text="General">  
            <ItemTemplate> 
<table cellpadding="0" border="0" cellspacing="0">  
    <tr> 
        <td><%= Class.Property %></td>  
    </tr> 
</table> 
            </ItemTemplate> 
        </telerik:RadPanelItem> 
    </Items> 
</telerik:RadPanelBar> 
 

Any clue as to why?

J
Simon
Telerik team
 answered on 26 Mar 2010
1 answer
166 views
Hi,

We have made some Changes to our Teleric-Controls and have compiled the new DLLs using Nant.
The Build was sucessfull and some Controls are working quite fine (ec. the RadDatePicker). But when opening a Page with the RadEditor, we get the following error:

Assembly 'Telerik.Web.UI, Version=2009.2.826.35, Culture=neutral, PublicKeyToken=29ac1a93ec063d92' contains a Web resource with name 'Telerik.Web.UI.Editor.RadEditor.js', but does not contain an embedded resource with name 'Telerik.Web.UI.Editor.RadEditor.js'.


We didn't make any changes to the RadEditor-Control and the .js-File exists in our Sourcecode-folder.
Are there any additional parameters or changes in the configfiles nessessery when using Nant?

Thanks.
Lini
Telerik team
 answered on 26 Mar 2010
4 answers
94 views
Hi,

this is shanker am doing application my requirement is catch the databound value in Itemdatabound event in GridEditable mode I am write this code 

protected void fulldaygrid_ItemDataBound(object sender, GridItemEventArgs e)
        {
            int? student_absence_id = null;

            if ((e.Item is GridEditableItem || e.Item is GridDataItem) && e.Item.IsInEditMode)
            {



                GridEditableItem editedItem = (GridEditableItem)e.Item;
                int item = editedItem.ItemIndex - 1;
                    student_absence_id = editedItem.OwnerTableView.Items[item].Cells[1].ToString().GetInteger();
                    //int? eventId = GetEventId(e.Item);
                    if (student_absence_id.HasValue)
                    {
                        var det = studentattendancemanager.sch_view_student_absence_single_day_detail(student_absence_id);



                        //Label lblStudentname = e.Item.FindControl("lblStudentname") as Label;
                        //if (lblStudentname != null)
                        //{
                        //    string Name = det.first_name + det.last_name;
                        //    lblStudentname.Text = Name;
                        //}
                        //Label lblStudentNumber = e.Item.FindControl("lblStudentNumber") as Label;
                        //if (lblStudentNumber != null)
                        //{
                        //    lblStudentNumber.Text = det.student_number;
                        //}

                        TextBox txtDescription = e.Item.FindControl("txtDescription") as TextBox;
                        if (txtDescription != null)
                        {
                            txtDescription.Text = det.description;
                      }


                }   
            }
        }

it's not working i am face this error 
Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index

thanks and regards
shanker.B

shanker bangari
Top achievements
Rank 1
 answered on 26 Mar 2010
5 answers
122 views
Hi,

this is shanker I am doing project by using telirik controls .My requirement is I have two rad grids one parent and child the child rad grid am put in edit forms .that grid binding in item data bound  event of parent grid .It's working but i have one item template filed in child grid that filed check box .the check box not cheked to belongs to database cloumn how to check that 

this my code 
 protected void Bysessiongrid_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
            {

                int? eventId = GetEventId(e.Item);
                RadGrid childgrid = e.Item.FindControl("childgrid") as RadGrid;
                if (childgrid != null)
                {
                    childgrid.DataSource = studentattendancemanager.sch_view_student_absence_session_child_list(eventId.Value, RadsessionAttendancedate.SelectedDate.Value);
                    childgrid.DataBind();
                    
                }
}
this c# code

source code is 

 <telerik:RadGrid ID="Bysessiongrid"   Width="100%"  
            AllowSorting="True" AllowPaging="True" PageSize="7" runat="server" AutoGenerateColumns="False"
            OnPreRender="Bysessiongrid_PreRender" ShowStatusBar="true" 
                           EnableLinqExpressions="false" 
                            
                           ondeletecommand="Bysessiongrid_DeleteCommand" 
                           onitemdatabound="Bysessiongrid_ItemDataBound" 
                           onupdatecommand="Bysessiongrid_UpdateCommand" 
                           oncancelcommand="Bysessiongrid_CancelCommand" 
                           oneditcommand="Bysessiongrid_EditCommand" 
                           onpageindexchanged="Bysessiongrid_PageIndexChanged" >
  <PagerStyle Mode="NextPrevAndNumeric" ></PagerStyle>
<MasterTableView DataKeyNames="class_student_id,student_absence_id,calendar_date">
           <Columns>
                    <telerik:GridEditCommandColumn >
                </telerik:GridEditCommandColumn>
                <telerik:GridBoundColumn DataField="student_absence_id" DataType="System.Int32" HeaderText="ID"
                    SortExpression="student_absence_id" UniqueName="student_absence_id" Visible="false" ReadOnly="true" >
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="student_name" HeaderText="Student Name" SortExpression="student_name"
                    UniqueName="student_name" >
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="student_number" HeaderText="Student Number" SortExpression="student_number"
                    UniqueName="student_number" >
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="student_is_absent" HeaderText="Absentee" SortExpression="student_is_absent"
                    UniqueName="student_is_absent">
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn>
                <ItemTemplate>
                    <asp:Button ID="BysessiongridDelete" runat="server" Text="Delete" CommandName="Delete" Visible="false"/>
                </ItemTemplate>
                </telerik:GridTemplateColumn>
                </Columns>
                  <EditFormSettings EditFormType="Template">
                   <FormTemplate>
                    <div>
                        <div class="floatFix">
                            <div style="float: left; width: 500px;">
                                <div class="inputRow">
                                    <div class="inputColLeft">
                                      Student Name:</div>
                                    <div class="inputColRight">
                                        <asp:Label ID="Studentsession" runat="server" Text='<%#Bind("student_name")%>'></asp:Label>
                                    </div>
                                </div>
                                <div class="inputRow">
                                    <div class="inputColLeft">
                                      Student Number:</div>
                                    <div class="inputColRight">
                                        <asp:Label ID="Studentnumbersession" runat="server" Text='<%#Bind("student_number")%>'></asp:Label>
                                    </div>
                                </div>
                                <div class="inputRow">
                                    <div class="inputColLeft">
                                      Description:</div>
                                    <div class="inputColRight">
                                         <asp:TextBox ID="txtdescriptionsession" runat="server"></asp:TextBox>
                                    </div>
                                </div>
                                <div class="inputRow">
                                    <div class="inputColRight">
                                    <telerik:RadGrid runat="server" Id="childgrid" AutoGenerateColumns="false" >
                                    <MasterTableView DataKeyNames="class_student_id,session_schedule_detail_id">
                                     <Columns>
                                     <telerik:GridBoundColumn DataField="class_student_id" DataType="System.Int32" HeaderText="ID"
                                       SortExpression="class_student_id" UniqueName="class_student_id" Visible="false" ReadOnly="true" >
                                      </telerik:GridBoundColumn>
                                   <telerik:GridBoundColumn DataField="subject_name" HeaderText="Subject" SortExpression="subject"
                                    UniqueName="subject" >
                                   </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="calendar_date" HeaderText="Calendar Date" SortExpression="calendar_date"
                                 UniqueName="calendar_date" >
                                </telerik:GridBoundColumn>
                                 <telerik:GridBoundColumn DataField="session_time" HeaderText="Session Time" SortExpression="session_time"
                                 UniqueName="session_time" >
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn >
                            <ItemTemplate>
                            <asp:CheckBox ID="absenteecheck" runat="server"  />
                            </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            
                                     </Columns>
                                    </MasterTableView>
                                    </telerik:RadGrid>
                                    </div>
                                    <div class="inputColRight">
                                        
                                    </div>
                                </div>
                            </div>
                        </div>
                         <div style="text-align: right;">
                            <asp:Button ID="Button1" ValidationGroup="event" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                            </asp:Button>&nbsp;
                            <asp:Button ID="Button2" Text="Cancel" runat="server" CausesValidation="False"
                                CommandName="Cancel"></asp:Button>
                        </div>
                    </div>
                </FormTemplate>
            </EditFormSettings>
            </MasterTableView>
    </telerik:RadGrid>

how to checked true in child grid column it,s argent please any solution .

thanks and regrids
shanker.b
Insad
Top achievements
Rank 2
 answered on 26 Mar 2010
1 answer
138 views
Hi everyone,

my problem is a little bit strange. You can see my problem in the picture. I have two table, station and data. I want to get result only root station data but root station data is sum of child station data. How can I do easly? Please help me... I use Telerik Rad AJAX 2009 Q3.
Yavor
Telerik team
 answered on 26 Mar 2010
4 answers
114 views
I have created a scheduler and associated advanced form based on the examples and that is working nicely. I went back in to add the export functions and based on the sample...
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
 
        <script type="text/javascript"
            function Export(sender, e) { 
                $find("<%= RadAjaxManager1.ClientID %>").__doPostBack(sender.name, ""); 
            } 
        </script> 
 
    </telerik:RadCodeBlock> 
The page posts back, but nothing happens??

 <AppointmentTemplate>
                <%--<div style="color: #ffffff; font-size: medium;">--%>
                <strong style="color: #ffffff">Title:
                    <%#Eval("Subject") %>
                    <br />
                    Type:
                    <%# Eval ("reservation_type") %>
                    <br />
                    Resource:
                    <%--<asp:Label ID="lblResourceTitle" runat="server"></asp:Label>--%>
                </strong>
                <%-- </div>--%>
                <div style="text-align: right;">
                    <asp:Button runat="server" ID="Button1" CssClass="rsExportButton" ToolTip="Export to iCalendar"
                        CommandName="Export" OnClientClick="Export(this, event); return false;" Style="cursor: pointer;
                        cursor: hand;" />
                </div>
            </AppointmentTemplate>
T. Tsonev
Telerik team
 answered on 26 Mar 2010
3 answers
246 views
Hi,

How do I change background color client-side?  I've wasted hours trying to get this thing to like a normal control.

I'm trying to use a color picker and client-side javascript to change the page background and this thing is the only control that won't change.

Peter
Telerik team
 answered on 26 Mar 2010
6 answers
329 views
Hi,

I have a RAD Tooltip manager in my code that opens up the user control. Problem is my user control has a script tag and this tag is not getting executed. I will explain you in detail below.

Default.aspx
<asp:ScriptManager ID="safd" runat="server">  
    </asp:ScriptManager> 
    <div> 
        <asp:HyperLink ID="hypTooltip" runat="server" NavigateUrl="#" Text="Tooltip" /> 
        <telerik:RadToolTipManager ID="radToolTipManager" runat="server" OffsetY="-7" OffsetX="10" 
            Width="300" Height="300" RelativeTo="Element" Position="Center" HideEvent="ManualClose" 
            ShowEvent="OnClick" ManualClose="True" OnClientShow="OnClientShowTooltipMessage" 
            OnAjaxUpdate="radToolTipManager_AJAXUpdate">  
        </telerik:RadToolTipManager> 
    </div> 
Default.aspx.cs
protected void Page_Load(object sender, EventArgs e)  
        {  
            if (!Page.IsPostBack)  
            {  
                radToolTipManager.TargetControls.Add(hypTooltip.ClientID, true);  
            }  
        }  
 
        protected void radToolTipManager_AJAXUpdate(object sender, ToolTipUpdateEventArgs e)  
        {  
 
            Control ctrToolTip = Page.LoadControl("Tooltip.ascx");  
            e.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrToolTip);  
        } 

Tooltip.ascx
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Tooltip.ascx.cs" Inherits="WebApplication5.Tooltip" %> 
<div> 
    Inside Div  
 
    <script type="text/javascript" language="javascript" src="http://test.sharevalue.com/company.asp?symbol=MSFT">          
    </script> 
 
</div> 
As you see in the ascx page, the url in the script tag generates me the contents. Contents from the Url will look something like this.Please keep in mind this data will be dynamic based on the symbol I pass in the query string.
Ex:
document.write('');
document.write('Home Page');
document.write('
Microsoft Corporation  NASDAQ GS: MSFT
3/04/10 4:00pm 100.63  Change: +0.17 | +0.60%
  1d  | 5d  | 1m  | 3m  | 6m  | 1y
Open:
High:
Volume:
Yield:
28.65
28.65
28.27
15.73');
document.write('');

The same script tag if I place in aspx page - it works. But if I invoke using Rad Tooltip manager, it doesn't work. It just returns the blank tooltip for me.

Could someone help me out on this? Do I need to register this script anywhere if I want to use it with RAD Tooltip?
Regards,
Kishan G K
Tsvetie
Telerik team
 answered on 26 Mar 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?