Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
145 views
I'm using querry optimization to return data for a particular date range on the schedule.  When I click on the left or right arrow the page is not rebiding the data.  I have to click to go button to get the scheduler to rebind.  Below is the code I'm using.  From all of the examples I've seen this should be working properly but it's not.

<telerik:RadScheduler ID="RadScheduler1" runat="server" Width="900px" TimelineView-NumberOfSlots="5" 
            Skin="Default" EnableEmbeddedSkins="true" EnableEmbeddedBaseStylesheet="false" 
            GroupingDirection="Vertical" OnAppointmentDelete="RadScheduler1_AppointmentDelete" 
            OnAppointmentInsert="RadScheduler1_AppointmentInsert" OnAppointmentUpdate="RadScheduler1_AppointmentUpdate" 
            OnFormCreating="RadScheduler1_FormCreating" OnDataBound="RadScheduler1_OnDataBound" 
            OnNavigationComplete="RadScheduler1_NavigationComplete" StartInsertingInAdvancedForm="True" 
            AdvancedForm-ZIndex="2000" AdvancedForm-Modal="True">  
            <MonthView VisibleAppointmentsPerDay="20" AdaptiveRowHeight="true" /> 
            <TimelineView SlotDuration="12:00:00" NumberOfSlots="10" TimeLabelSpan="2" /> 
            <ResourceTypes> 
                <telerik:ResourceType DataSourceID="edsUsers" ForeignKeyField="UserID" KeyField="UserID" 
                    Name="User Name" TextField="UserName" /> 
            </ResourceTypes> 
            <ResourceTypes> 
                <telerik:ResourceType DataSourceID="edsClients" ForeignKeyField="ClientID" KeyField="ClientID" 
                    Name="Client Name" TextField="ClientName" /> 
            </ResourceTypes> 
            <ResourceTypes> 
                <telerik:ResourceType DataSourceID="edsCategories" ForeignKeyField="CategoryID" KeyField="CategoryID" 
                    Name="Category" TextField="Category" /> 
            </ResourceTypes> 
            <ResourceStyles> 
                <telerik:ResourceStyleMapping Type="Category" Text="Out of Office" ApplyCssClass="rsCategoryViolet" /> 
                <telerik:ResourceStyleMapping Type="Category" Text="After Hours" ApplyCssClass="rsCategoryRed" /> 
                <telerik:ResourceStyleMapping Type="Category" Text="Projects" ApplyCssClass="rsCategoryDarkGreen" /> 
                <telerik:ResourceStyleMapping Type="Category" Text="MACs" ApplyCssClass="rsCategoryGreen" /> 
                <telerik:ResourceStyleMapping Type="Category" Text="VNMS" ApplyCssClass="rsCategoryDarkBlue" /> 
                <telerik:ResourceStyleMapping Type="Category" Text="IPT/Engineering" ApplyCssClass="rsCategoryDarkRed" /> 
                <telerik:ResourceStyleMapping Type="Category" Text="Other" ApplyCssClass="rsCategoryOrange" /> 
            </ResourceStyles> 
            <TimeSlotContextMenuSettings EnableDefault="true" /> 
            <AppointmentContextMenuSettings EnableDefault="true" /> 
        </telerik:RadScheduler> 
    </telerik:RadAjaxPanel> 

protected void Page_Load(object sender, EventArgs e)  
    {  
        if (!IsPostBack)  
        {  
            ddlView.SelectedIndex = 1;  
            RadScheduler1.SelectedView = SchedulerViewType.TimelineView;  
            RadScheduler1.SelectedDate = DateUtilities.GetStartOfCurrentWeekMonday();  
            BindSchedule();  
        }  
 
        RadScheduler1.GroupBy = RadComboBox1.SelectedValue;  
    }  
 
 private void BindSchedule()  
    {  
        RadScheduler1.DataSource = TED.BLL.Appointment.Appointments(SafeValue.SafeInt(ddlView.SelectedValue),SafeValue.SafeInt(ddlCategory.SelectedValue),SafeValue.SafeInt(ddlClientName.SelectedValue),Users,RadScheduler1.VisibleRangeStart, RadScheduler1.VisibleRangeEnd);  
        RadScheduler1.DataKeyField = "ID";  
        RadScheduler1.DataStartField = "Start";  
        RadScheduler1.DataEndField = "End";  
        RadScheduler1.DataSubjectField = "Subject";  
        RadScheduler1.DataRecurrenceParentKeyField = "RecurrenceParentID";  
        RadScheduler1.DataRecurrenceField = "RecurrenceRule";  
 
        RadScheduler1.DataBind();  
    }  
 
protected void RadScheduler1_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e)  
    {  
        RadScheduler scheduler1 = (RadScheduler)sender;  
        if (e.Command == SchedulerNavigationCommand.SwitchToMonthView)  
        {  
            scheduler1.OverflowBehavior = OverflowBehavior.Expand;  
        }  
        else  
        {  
            scheduler1.OverflowBehavior = OverflowBehavior.Scroll;  
        }  
        BindSchedule();  
    } 


Timothy Kruszewski
Top achievements
Rank 1
 answered on 24 May 2010
1 answer
223 views
I've been trying to solve this problem for about 12 hours now...

I have a panelbar with multiple sections. On Page Load (or when the user switches to a different panel section) I want to populate that section textboxs with the appropriate information from the SQL query in Code Behind (or anywhere else that will work in each section).

For example:

Panel 1 - Login Information
---- Login:         asp textbox ID: txtLogin
---- Password:  asp textbox ID: txtPassword1
---- Confirm Password: asp textbox ID: txtPassword1
---- "Save Button"

When clicking the save button I want to save the section data back to the database and do a postback to the same section.

In code behind doing a simple query to member data base using Member_ID as filter.
For example: (sudo code)
Session("MemberID") = "760"
Select Member_ID, mem_login, mem_pass from Personal_Info Where Member_ID = Session("MemberID")

The query returns:
mem_login: jadam
mem_pass: xxxxx

Here's the code behind:

 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load  
 
        'Get User login information from database  
          
        Dim ConnectionString As String = ConfigurationManager.ConnectionStrings("AcvpmDataCS").ConnectionString  
        Dim conn As New SqlConnection(ConnectionString)  
        Dim cmd As New SqlCommand("Select Member_ID, mem_login, mem_password FROM Personal_Info WHERE Member_ID = @member_id", conn)  
          
        Using conn  
            conn.Open()  
            cmd.Parameters.AddWithValue("@member_id", Session("MemberID"))  
 
            Dim Reader As SqlDataReader = cmd.ExecuteReader  
            While Reader.Read()  
                Dim txtLogin As TextBox = CType(RadPanelBar1.FindControl("txtLogin"), TextBox)  
                txtLogin.Text = Reader("mem_login").ToString  
 
            End While 
            conn.Close()  
        End Using  
 
    End Sub 


I've tested the query (used it in other places) and the query returns the proper information I just don't know how to map the panelbar items to the SQL Select results.

I want to have a "Save" button in each panel section since there is a lot of information on each user (over 360 fields) spread out through multiple sections of the PanelBar. 

Panel 2 - Home Address
Same setup as login with labels and textboxes of their address information

Panel 3 - Busines Address
etc.

Any suggestions?
Thanks,
Joe
Nikolay Tsenkov
Telerik team
 answered on 24 May 2010
20 answers
557 views
I am using Q3 2008 radmenu.

I tried the width=900 property and it does not change my menu width.

How do I get the menu width to extend across the width of my page?

---

Nevermind. This does work. I guess my page was cached.

It would be nice to be able to delete these if no one has answered yet. :)

priyanshu atreya
Top achievements
Rank 1
 answered on 24 May 2010
2 answers
436 views
Hello all,
I have been trying to figure this out and I can't seem to find any documentation on it, and any functions that might just do what I need to accomplish it client side.

scenario: I have a grid bound through  a web service, works great!
in my grid I have a GridTemplateColumn

                                <telerik:GridTemplateColumn HeaderText="Claiming" UniqueName="AmountToClaim"> 
                                        <ItemStyle CssClass="EclaimClaimAmount" /> 
                                        <HeaderStyle Width="75px" HorizontalAlign="center" /> 
                                        <ItemTemplate> 
                                            <asp:TextBox ID="Step3TitlesClaimAmountTextBox" EnableViewState="false" onKeyDown="return OnlyAllowNumbers(this);" 
                                                runat="Server" CssClass="standardTextBoxClaimedAmount" onfocus="CalculateTotals('standardTextBoxClaimedAmount', 'textBoxStandardClaimedFooter')" 
                                                onblur="CalculateTotals('standardTextBoxClaimedAmount', 'textBoxStandardClaimedFooter'); CheckBalance();"></asp:TextBox> 
                                        </ItemTemplate> 
                                        <FooterTemplate> 
                                            <span style="color: Yellow; font-weight: 600;">Total: </span> 
                                            <asp:TextBox ID="Step3TitlesClaimAmountFooterTextBox" EnableViewState="false" runat="server" 
                                                CssClass="textBoxStandardClaimedFooter" BorderStyle="none" BackColor="#0075BD" 
                                                ForeColor="white" Font-Bold="true"> 
                                            </asp:TextBox> 
                                        </FooterTemplate> 
                                    </telerik:GridTemplateColumn> 

this is the javascript function I've come up with so far
    function ValidateMoney() { 
        var grid = $find("<%=Step3TitlesRadGrid.ClientID%>"); 
        var tableView = grid.get_masterTableView(); 
        var items = tableView.get_dataItems(); 
        for(var i = 0; i<items.length; i++){ 
            var rowValues = items[i].get_dataItem(); 
            if(rowValues.ApprovedAmount < ??how to get the text vale?? ){ 
            } 
        } 
    } 

using javascript how would I loop through rows in this grid and get the value of each Step3TitlesClaimAmountTextBox

Any help or pointers would be greatly appreciated 

Thank you,
Josh
Josh
Top achievements
Rank 1
 answered on 24 May 2010
1 answer
105 views
Team

I've Radgrid with first 2 columns are link based. If I export the same to MS word 2003 the links are also coming.
While I ExportOnlyData it removes all the datas too in the MS Word..
Pls. give me the solution to come around this...

I hope U'll help me out on this.


Thanks
Rajesh N.
Daniel
Telerik team
 answered on 24 May 2010
2 answers
255 views
Hi all,

I had a problem with my grid showing a horizontal scrollbar when it shouldn't.  I searched this forum for answers and found these three gems:
Remove the width on the MasterTableView.
Set the TableLayout to Fixed. 
Make sure the total of the column widths is less than the grid width.

That fixed it for IE8 - 8.0.7600, FF 3.6.3, and Chrome 4.1.249.1064.  But the problem still persists in IE7.  Can someone look at my grid declaration and see if there is something I can do to fix this?  Thanks!

 <telerik:RadGrid ID="grdFilters" runat="server" Width="614px" Height="150px" Skin="Web20"  
             AllowSorting="true" AutoGenerateColumns="false" AllowAutomaticDeletes="True"> 
             <MasterTableView RetrieveAllDataFields="false" ShowHeadersWhenNoRecords="true" 
             EnableNoRecordsTemplate="true" CommandItemDisplay="None" TableLayout="Fixed" > 
             <Columns> 
                 <telerik:GridBoundColumn DataField="FieldName" SortExpression="FieldName"  
                 HeaderText="Filter Type" HeaderStyle-Width="140px" > 
                 </telerik:GridBoundColumn> 
                 <telerik:GridBoundColumn DataField="FieldCompTypeText" SortExpression="FieldCompTypeText"  
                 HeaderText="Operand" HeaderStyle-Width="120px" > 
                 </telerik:GridBoundColumn> 
                 <telerik:GridBoundColumn DataField="FieldCompValueText" SortExpression="FieldCompValueText" 
                 HeaderStyle-Width="230px" HeaderText="Value" > 
                 </telerik:GridBoundColumn> 
                 <telerik:GridButtonColumn Text="Delete" CommandName="Delete" ButtonType="ImageButton"> 
                 <HeaderStyle Width="70px" /> 
                 </telerik:GridButtonColumn> 
                 <telerik:GridBoundColumn DataField="FieldLineItem" Visible="false" HeaderStyle-Width="0px"> 
                 </telerik:GridBoundColumn> 
                 </Columns> 
                 <NoRecordsTemplate > 
                   <div style="font-style: italic; vertical-align: middle; text-align:center;"> 
                   <br /><br /> 
                   No filters to display 
                   </div> 
                   </NoRecordsTemplate> 
                  </MasterTableView> 
                    <ClientSettings Scrolling-AllowScroll="true" Scrolling-SaveScrollPosition="true" 
                    Scrolling-UseStaticHeaders="true" Selecting-AllowRowSelect="true" 
                    EnablePostBackOnRowClick="true"  > 
                    </ClientSettings> 
</telerik:RadGrid> 


dd
Top achievements
Rank 1
 answered on 24 May 2010
1 answer
238 views
I'm using a RadEditor inside an Ajax Update Panel and Have a custom tools file.
<telerik:RadEditor ID="reQuestionText" OnClientLoad="OnClientLoad" StripFormattingOnPaste="MSWord" 
                                    EditModes="Design" Width="100%" Height="150px" runat="server" ToolsFile="~/Controls/Telerik/RadEditorBasicTools.xml" /> 


In the page, I don't display the Editor on the Page_Load itself. The editor is displayed only after I click a button.
But, once it is displayed, the toolbar buttons don't display properly (see attachment radeditor_on_initial_page_load.png). 
protected void Page_Load(object sender, EventArgs e) 
{ 
   if(!IsPostBack) 
      reQuestionText.Visible = false; 
} 
 
protected void btnDisplayEditor_Click(object sender, EventArgs e) 
{ 
   reQuestionText.Visible = true; 
} 
 
protected void btnSave_Click(object sender, EventArgs e) 
{ 
   SaveRadEditorContent(); 
} 


Then if I do a postback (use a Save button to save the content in the editor), the editor seems to display so weirdly (see attachment radeditor_after_postback.png). 

The same works properly if I display the editor on the first time itself.

Any help will be greatly appreciated.

Thanks,
Ashu.
Ashu Sukumar
Top achievements
Rank 1
 answered on 24 May 2010
1 answer
89 views
Hi Everyone,

It seems that is a problem with the javascript code that is added to the onload atribute of the body tag, but only for IE, for Firefox this is working correctly.

To reproduce this problem just open the demo editor page in IE, switch to HTML view and add the onload="alert('page loaded')" code to the body tag. After that switch to Preview view or Design view and switch back to HTML view. You will notice the onload attribute is removed.

As I've said, on the Firefox this is not happening (the onload attribute is still there).

Please tell me, is this a known issue and if so it is fixed?

Thanks,
Marius
Rumen
Telerik team
 answered on 24 May 2010
2 answers
137 views
I have a template column in a  radgrid.
The filter row applies any filters whenever a user enters text into any filter textbox and presses enter.

I have added a template column that has a dropdown bound to a linq to sql datasource.

It is populating just fine.  I am hocking up to the selectedindexchanged event on the dropdown when a user changes the filter item in the dropdown and it is set to autopost back.

In the selectedIndexChanged server side code (.cs)  I need to apply whatever they selected to the radgrid filters.  

What I mean by this:
  If the user has already applied a few filters before selecting a item in the dropdown. I need to append this additional filter parameter to the filterexpression of the radgrid.

Anyone aware of a good example of applying another filter and maintaining the current filters already applied.


Wired_Nerve
Top achievements
Rank 2
 answered on 24 May 2010
1 answer
137 views
Hello,

I am using telerik asp.net ajax trial version. I used form decorator  for asp.net buttons. In IE7 I get correct shape of the button while in Forefox the button shape is looks distorted (as displayed in attached image)

<asp:Button Skin="Web20" Style="color: #fff; width: 100px;" ID="btnSearch" runat="server" Text="Search" EnableEmbeddedScripts="false" /> 
<asp:Button Skin="Web20" Style="color: #fff; width: 100px;" ID="btnResetSearch" runat="server" Text="Reset" /> 
 
.... 
.... 
 
<telerik:RadFormDecorator ID="FormDecorator1" runat="server" DecoratedControls="Buttons,Textbox" Skin="Web20"> 
</telerik:RadFormDecorator> 


Can you please let me know the solution for same ?

Thanks,
Prayag
Rumen
Telerik team
 answered on 24 May 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?