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

Is there a way to have the docking panels dynamically resize when the browser window is resized ( vertically)? i got this done horizontally. but wondering how to do it vertically.


 <telerik:RadDockLayout runat="server" ID="RadDockLayout1" OnSaveDockLayout="RadDockLayout1_SaveDockLayout"
            OnLoadDockLayout="RadDockLayout1_LoadDockLayout" EnableEmbeddedSkins="false"
            Skin="None">
            <table style="table-layout: fixed;">
                <tr>
                    <td id="left" style="width: 250px; height: 100%; vertical-align:top;">
                   
                        <telerik:RadDockZone runat="server" ID="RadDockZoneLeftTop" Width="249px"  BorderWidth="0"
                            Docks="1" Orientation="Vertical" FitDocks="true"  HighlightedCssClass="CustomCssClass">
                        </telerik:RadDockZone>
                      
                        <telerik:RadDockZone runat="server" ID="RadDockZoneLeftBottom" Width="249px"   BorderWidth="0"
                            Docks="1" Orientation="Vertical" FitDocks="true"  HighlightedCssClass="CustomCssClass">
                        </telerik:RadDockZone>
                    </td>
                    <td id="centre" style="width: 100%; height: 100%; vertical-align: top;">
                   
                </td>
                    
                    <td id="right" style="width: 250px; height: 100%; vertical-align: top;">
                        <telerik:RadDockZone runat="server" ID="RadDockZoneRightTop" Width="249px"  BorderWidth="0"
                            Docks="1" Orientation="Vertical" FitDocks="true"  HighlightedCssClass="CustomCssClass">
                      </telerik:RadDockZone>
                    
                        <telerik:RadDockZone runat="server" ID="RadDockZoneRightBottom" Width="249px" BorderWidth="0"
                            Docks="1" Orientation="Vertical" FitDocks="true"  HighlightedCssClass="CustomCssClass">
                        </telerik:RadDockZone>
                    </td>
                </tr>
            </table>
            
        </telerik:RadDockLayout>

I use this method to generate the Raddocks dynamically in page_init()
 private RadDock CreateRadDockFromState(DockState state, int number)
    {
        RadDock dock = new RadDock();
        dock.ID = string.Format("RadDock{0}", number);
        dock.ApplyState(state);
        dock.Closed = false;
        dock.DockHandle = DockHandle.TitleBar;
        dock.DockMode = DockMode.Docked;
        dock.EnableRoundedCorners = true;
        dock.EnableAnimation = true;
        dock.DefaultCommands = Telerik.Web.UI.Dock.DefaultCommands.None;
        dock.Width = Unit.Pixel(249);
        dock.Height = Unit.Pixel(300);
        DockCommand dc = new DockCommand();
        dc.AutoPostBack = true;
        dc.Name = "ShowWidgets";
        dc.Text = "Show Widgets";
        dock.Commands.Add(dc);
        dock.Command += new DockCommandEventHandler(Show_Widgets);
        dock.DockPositionChanged += new DockPositionChangedEventHandler(RadDock_DockPositionChanged);
        dock.OnClientDockPositionChanged = "OnClientDockPositionChanged";
        dock.OnClientDragStart = "OnClientDragStart";
        dock.OnClientInitialize = "DockInit";
        dock.Resizable = true;
        return dock;
    }
Pero
Telerik team
 answered on 29 Jul 2010
1 answer
96 views

Below code running old version but i have updated version no run now.

function

 

 

fileUploaded(sender, args) {

 

$find(

 

'RadAjaxManager1').ajaxRequest();

 

sender.deleteFileInputAt(0);

 

}



 

 

<telerik:radasyncupload runat="server" ID="AsyncUpload1" MaxFileInputsCount="1"

 

 

 

 

OnClientFileUploaded="fileUploaded" TargetPhysicalFolder="~/Image/Upload"

 

 

 

Width="90px" OverwriteExistingFiles="True" >

 

 

 

<Localization Select="Choose Avatar" />

 

 

 

</telerik:radasyncupload>

 





 

 

Try

 

 

 

' file.Add(e.File)

 

 

 

Dim fileStream As IO.Stream = e.File.InputStream

 

 

 

Dim imageData As Byte() = New Byte(fileStream.Length - 1) {}

 

fileStream.Read(imageData, 0,

 

CInt(fileStream.Length))

 

Thumbnail1.DataValue = imageData

fileStream.Close()

 

 

Catch ex As Exception

 

 

 

End Try

 

Yana
Telerik team
 answered on 29 Jul 2010
1 answer
94 views
I have a textbox within a panelbar and am unable to get the control to validate from a button on the page. This textbox is added dynamically. Thanks
Nikolay Tsenkov
Telerik team
 answered on 29 Jul 2010
4 answers
110 views
Hi,

Everytime I create a new Grid, the default size is 100%, even though I set the width of each column doesn't help.
Of course I can sum up the column width manually and then assign to WIDTH property of the grid, but is there any way that I can set the width of the Grid based on the column size?

Thanks.
Dimo
Telerik team
 answered on 29 Jul 2010
2 answers
150 views
Hello - I have a grid that has a Quantity, a Cost, and a Total column.  Currently, the Total Column is a TemplateColumn and on ItemDataBound I manaully calculate the Total (which is Quantity * Cost) for each row.  This presents a problem when there are 100+ rows, performance wise.  I know I can change it to a Calculated Column, which would erase the need to manually calculate it in the code behind.  My problem is that the user needs to see the new Total while they are still editing the row.  With the Template column, I can use JavaScript to udpdate it, but am unable to use JS when I change it to a Calculated Column.  This seems like a pretty basic question...  Any ideas?
TPerry
Top achievements
Rank 1
 answered on 29 Jul 2010
3 answers
138 views
Hi,

I'm trying to move a recurring appointment, but when the serverside-event OnAppointmentUpdate fires, the recurrencerule is not changed. For some reason we always use weekly recurrences, even if there's only one occurrence.

In the following example the start and enddate are changed one day earlier, but the recurrencerule is the same after moving the appointment and choosing "Move the series". How can I change the recurrencerule too?

Appointment before move:
Start = 22-07-2010 08:00
End = 22-07-2010 09:00
RecurrenceRule:
DTSTART:20100722T080000Z
DTEND:20100722T090000Z
RRULE:FREQ=WEEKLY;UNTIL=20100722T090000Z;INTERVAL=1;BYDAY=TH

Appointment after move:
Start: 21-07-2010 08:00
End: 21-07-2010 09:00
RecurrenceRule:
DTSTART:20100722T080000Z
DTEND:20100722T090000Z
RRULE:FREQ=WEEKLY;UNTIL=20100722T090000Z;INTERVAL=1;BYDAY=TH
T. Tsonev
Telerik team
 answered on 29 Jul 2010
2 answers
226 views
This is the first time I've tried to make a detail table in a radgrid editable. I have a grid with 3 detail tables. I when I've made one of them updatable so far, but when I enter the new information and hit update the form closes and no data is updated. No error is generated either. I'm using ASP:SqlDataSources for my data. Do I need anything extra to get the details table to run an update?

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CourseList.ascx.cs" Inherits="edu.yale.som.courses.CourseList" %>
<%@ Register TagPrefix="telerik" Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" %>
<telerik:RadGrid runat="server" ID="GridCourses" AutoGenerateColumns="true" DataSourceID="CourseDataSource"
    Skin="WebBlue" AllowAutomaticUpdates="true">
    <MasterTableView DataKeyNames="SOMCourseID" HierarchyDefaultExpanded="False" AutoGenerateColumns="false"
        ExpandCollapseColumn-Display="true">
        <Columns>
            <telerik:GridBoundColumn DataField="SOMCourseID" UniqueName="SOMCourseID" HeaderText="SOMCourseID"
                Visible="false" />
            <telerik:GridBoundColumn DataField="CourseID" UniqueName="CourseID" HeaderText="CRN" />
            <telerik:GridBoundColumn DataField="NumberSection" UniqueName="CourseNumber" HeaderText="Course Number" />
            <telerik:GridBoundColumn DataField="CourseTitle" UniqueName="Title" HeaderText="Title" />
            <telerik:GridBoundColumn DataField="CourseSession" UniqueName="Session" HeaderText="Session" />
            <telerik:GridBoundColumn DataField="Units" UniqueName="Units" HeaderText="Units" />
            <telerik:GridBoundColumn DataField="TermCode" UniqueName="TermCode" HeaderText="TermCode" />
            <telerik:GridBoundColumn DataField="Cohort" UniqueName="Cohort" HeaderText="Cohort" />
        </Columns>
        <DetailTables>
            <telerik:GridTableView DataKeyNames="SOMCourseID" DataSourceID="CourseTimeDataSource"
                runat="server" AutoGenerateColumns="False" AllowAutomaticUpdates="true">
                <Columns>
                    <telerik:GridBoundColumn DataField="ClassTime" UniqueName="ClassTime" HeaderText="Schedule"
                        ReadOnly="true" />
                    <telerik:GridBoundColumn DataField="Day" UniqueName="Day" HeaderText="Day" Visible="false" />
                    <telerik:GridBoundColumn DataField="StartTime" UniqueName="StartTime" HeaderText="Start Time"
                        Visible="false" />
                    <telerik:GridBoundColumn DataField="EndTime" UniqueName="EndTime" HeaderText="End Time"
                        Visible="false" />
                    <telerik:GridBoundColumn DataField="RecordID" UniqueName="RecordID" HeaderText="RecordID"
                        ReadOnly="true" Visible="true" />
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumnCourseTime" />
                </Columns>
                <EditFormSettings ColumnNumber="1">
                    <FormTableItemStyle Width="100%" Height="29px" />
                    <FormTableStyle GridLines="None" CellPadding="2" CellSpacing="0" />
                    <FormStyle Width="100%" BackColor="#eef2ea" />
                    <EditColumn ButtonType="ImageButton" CancelText="Cancel" UpdateText="Update" InsertText="Add" />
                </EditFormSettings>
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="SOMCourseID" MasterKeyField="SOMCourseID" />
                </ParentTableRelation>
            </telerik:GridTableView>
        </DetailTables>
        <DetailTables>
            <telerik:GridTableView DataKeyNames="SOMCourseID" DataSourceID="CourseDescriptionDataSource"
                runat="server" AutoGenerateColumns="False">
                <Columns>
                    <telerik:GridBoundColumn DataField="CourseDescription" UniqueName="Description" HeaderText="Description" />
                </Columns>
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="SOMCourseID" MasterKeyField="SOMCourseID" />
                </ParentTableRelation>
            </telerik:GridTableView>
        </DetailTables>
        <DetailTables>
            <telerik:GridTableView DataKeyNames="SOMCourseID" DataSourceID="SpecializationDataSource"
                runat="server" AutoGenerateColumns="False">
                <Columns>
                    <telerik:GridBoundColumn DataField="Specialization" UniqueName="Specialization" HeaderText="Specialization(s)" />
                </Columns>
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="SOMCourseID" MasterKeyField="SOMCourseID" />
                </ParentTableRelation>
            </telerik:GridTableView>
        </DetailTables>
        <DetailTables>
            <telerik:GridTableView DataKeyNames="SOMCourseID" DataSourceID="InstructorDataSource"
                runat="server" AutoGenerateColumns="False">
                <Columns>
                    <telerik:GridBoundColumn DataField="LastName" UniqueName="LastName" HeaderText="Last Name" />
                    <telerik:GridBoundColumn DataField="FirstName" UniqueName="FirstName" HeaderText="First Name" />
                    <telerik:GridHyperLinkColumn DataTextField="Email" DataNavigateUrlFields="EmailLink"
                        HeaderText="Email" />
                </Columns>
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="SOMCourseID" MasterKeyField="SOMCourseID" />
                </ParentTableRelation>
            </telerik:GridTableView>
        </DetailTables>
    </MasterTableView>
    <FooterStyle HorizontalAlign="Right" Font-Bold="true" />
</telerik:RadGrid>
<asp:SqlDataSource ID="CourseDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:edu_yale_som_courses_dataclasses_connectionString %>"
    ProviderName="System.Data.SqlClient" SelectCommand="Select *, TermCode + CourseID as SOMCourseID, CourseNumber + '-'+ Section as NumberSection from SOMCourses where Termcode = 201003">
</asp:SqlDataSource>
<asp:SqlDataSource ID="CourseTimeDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:edu_yale_som_courses_dataclasses_connectionString %>"
    ProviderName="System.Data.SqlClient" SelectCommand="Select RecordID, SOMCourseID, Day, StartTime, EndTime,  Day + ' ' + StartTime + '-' + EndTime as ClassTime  FROM CourseTime Where SOMCourseID = @SOMCourseID"
    UpdateCommand="Update CourseTime Set Day= '@Day', StartTime='@StartTime', EndTime='@EndTime' WHERE RecordID=@RecordID">
    <SelectParameters>
        <asp:SessionParameter Name="SOMCourseID" SessionField="SOMCourseID" Type="Int64" />
    </SelectParameters>
    <UpdateParameters>
        <asp:Parameter Name="RecordID" Type="Int32" />
    </UpdateParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="CourseDescriptionDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:edu_yale_som_courses_dataclasses_connectionString %>"
    ProviderName="System.Data.SqlClient" SelectCommand="Select *, TermCode + CourseID as SOMCourseID, CourseDescription from SOMCourses where (TermCode + CourseID) = @SOMCourseID ">
    <SelectParameters>
        <asp:SessionParameter Name="SOMCourseID" SessionField="SOMCourseID" Type="Int64" />
    </SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="InstructorDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:edu_yale_som_courses_dataclasses_connectionString %>"
    ProviderName="System.Data.SqlClient" SelectCommand="Select *, 'mailto:'+Email as EmailLink from View_BannerSOMCourseIDInstructorID where SOMCourseID = @SOMCourseID ">
    <SelectParameters>
        <asp:SessionParameter Name="SOMCourseID" SessionField="SOMCourseID" Type="Int64" />
    </SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SpecializationDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:edu_yale_som_courses_dataclasses_connectionString %>"
    ProviderName="System.Data.SqlClient" SelectCommand="Select * from CourseSpecialization where SOMCourseID = @SOMCourseID ">
    <SelectParameters>
        <asp:SessionParameter Name="SOMCourseID" SessionField="SOMCourseID" Type="Int64" />
    </SelectParameters>
</asp:SqlDataSource>
Jon Ingersoll
Top achievements
Rank 1
 answered on 29 Jul 2010
7 answers
141 views
I have a point chart with ScrollMode=XOnly. After I drag a rectangle on the chart, the zoom window doesn't match the position of the rectangle. It is shifted left or right.

Here is the aspx page.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="LabChart.aspx.cs" Culture="en-US" Inherits="IWChronicle.UI.LabChart" %> 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Charting" 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 id="Head1" runat="server"
    <title>Laboratory Chart</title> 
    </head> 
    <body id="Body1" runat="server"
    <form id="Form1" method="post" runat="server"
                <asp:ScriptManager ID="scriptManager1" runat="server" EnablePartialRendering="True" EnablePageMethods="True" EnableScriptGlobalization="True" EnableScriptLocalization="True" /> 
                    <telerik:RadChart ID="LabRadChart" runat="server" DefaultType="Point"  
                        Height="500px" Width="850px"
                        <Series> 
                            <telerik:ChartSeries DefaultLabelValue="#Y" Name="Series 1"  
                            Type="Point"
                                <Appearance LegendDisplayMode="Nothing"
                                    <FillStyle MainColor="213, 247, 255"
                                    </FillStyle> 
                                </Appearance> 
                            </telerik:ChartSeries> 
                        </Series> 
                        <PlotArea> 
                            <XAxis IsZeroBased="False" MaxItemsCount="5"
                                <Appearance ValueFormat="ShortDate"
                                </Appearance> 
                            </XAxis> 
                            <Appearance Dimensions-Margins="18%, 5%, 12%, 10%"
                            </Appearance> 
                        </PlotArea> 
                        <ClientSettings ScrollMode="XOnly" /> 
                    </telerik:RadChart> 
        <asp:Button ID="ResetButton" runat="server" Text="Reset"  
                    onclick="ResetButton_Click" /> 
    </form> 
    </body> 
</html> 
 

Here is the code-behind.
#region "Using statements" 
 
using System; 
using System.Web.UI; 
using Telerik.Charting; 
#endregion 
 
 
namespace IWChronicle.UI { 
 
    partial class LabChart : Page { 
 
        protected void Page_Load(object sender, EventArgs e) { 
            if (!IsPostBack) { 
                LabRadChart.Series[0].Items.AddRange(GetItems(20)); 
                LabRadChart.DataBind(); 
            } 
        } 
 
        private ChartSeriesItem[] GetItems(int count) { 
            DateTime startDate = new DateTime(2000, 1, 1); 
            ChartSeriesItem[] items = new ChartSeriesItem[count]; 
            for (int i = 0; i < count; i++) 
                items[i] = new ChartSeriesItem(startDate.AddDays(i * 30).ToOADate(), i); 
 
            return items; 
        } 
 
        protected void ResetButton_Click(object sender, EventArgs e) { 
            LabRadChart.ClientSettings.XScale = 1.0f; 
        } 
 
 


Also attached are 2 screenshots showing the rectangle and the zoomed window.

This may cause confusion for end users. Is there a work-around?

Thanks!

Jing
dingjing
Top achievements
Rank 2
 answered on 29 Jul 2010
1 answer
142 views

HI,

I have Oracle database with 3,00,000 of records with around 500 users will be accessing the same data in single shot from multiple countries, so i am unable to handle performance issue since i am following the following mechanism

 

objSearchContactResultsDO =

BusinessFactory.SearchContact().SearchContact(objSearchDO);

 

grdSearchContact.DataSource = objSearchContactResultsDO.ContactResultsDO;

objSearchContactResultsDO :- is getting the data from database and pushing to grid.

I am unable to do filter operations of telerik grid since i am using grdsearchcontact.Databind() method.

so i am capturing my fileter conditions from telerik grid and sending to database and that result i am filling with "OnneedDatasource" mentod. so soritng also taking long time since i am doing soring with database.
 
when i do search and sorting, it is doing postback the page and taking long time to give the result.

So Please adivce me the best mechanism to handle bulk data with multiple users.

Thanks in Advance.

Cori
Top achievements
Rank 2
 answered on 29 Jul 2010
1 answer
114 views
Ok, so I implimented OnClientAppointmentsPopulating and I see my custom values posting back...

But in GetAppointments the schedulerInfo object doesnt seem to HAVE those values...?

Ok, so if I get them there somehow, how to I get those values from THERE over to the provider to query my DB?

Peter
Telerik team
 answered on 29 Jul 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?