Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
155 views
If you type somthing like 1/x into the edit box, it appears that some client javascript automatically changes this into something like 10/1/2009 when you tab out of the edit box.

Is there a way to disable the automatic conversion?

I would like the edit box to leave the value the user entered so I can do validation when the form is submitted.

Thanks!
Shinu
Top achievements
Rank 2
 answered on 03 Nov 2009
3 answers
933 views
I have two RadGrids (RadGrid1 and RadGrid2)

In radgrid1 I have a list of jobs with a field called "JobID", on a button click, it inserts JobID and current username into another table which RadGrid2 is based on.

I would like to add a test/check to my button click event, that checks RadGrid2 to see if the JobID that is being inserted already exist in radgrid2, and if so pop-up a radalert saying that tells the user they already have that JobID in radgrid2.

I will inclide my current working code, so you can see where I am at, thnks for any help you can provide.
<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" 
    CodeFile="view.aspx.vb" Inherits="jobs_view" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">  
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">  
    <span class="hdrtext">Available Jobs</span> 
    <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="dsViewJobs" GridLines="None" 
        Skin="Default">  
        <MasterTableView AutoGenerateColumns="False" DataKeyNames="JobID" DataSourceID="dsViewJobs">  
            <RowIndicatorColumn> 
                <HeaderStyle Width="20px"></HeaderStyle> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn> 
                <HeaderStyle Width="20px"></HeaderStyle> 
            </ExpandCollapseColumn> 
            <Columns> 
                <telerik:GridBoundColumn DataField="JobID" DataType="System.Int32" HeaderText="JobID" 
                    ReadOnly="True" SortExpression="JobID" UniqueName="JobID" Visible="False">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="JobTitle" HeaderText="JobTitle" SortExpression="JobTitle" 
                    UniqueName="JobTitle" Visible="False">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="JobFile" HeaderText="JobFile" SortExpression="JobFile" 
                    UniqueName="JobFile" Visible="False">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="PositionQty" DataType="System.Int32" HeaderText="PositionQty" 
                    SortExpression="PositionQty" UniqueName="PositionQty" Visible="False">  
                </telerik:GridBoundColumn> 
                <telerik:GridHyperLinkColumn DataNavigateUrlFields="JobFile" DataTextField="JobTitle" 
                    HeaderText="Job Title" UniqueName="JobFileHyperLink">  
                </telerik:GridHyperLinkColumn> 
                <telerik:GridTemplateColumn HeaderText="Apply" UniqueName="Apply">  
                    <ItemTemplate> 
                        <asp:Button ID="btnApply" runat="server" Text="Apply" OnClick="btnApply_Click" /> 
                    </ItemTemplate> 
                </telerik:GridTemplateColumn> 
            </Columns> 
        </MasterTableView> 
    </telerik:RadGrid> 
    <asp:SqlDataSource ID="dsViewJobs" runat="server" ConnectionString="<%$ ConnectionStrings:csSSEA %>" 
        SelectCommand="SELECT * FROM [Jobs] ORDER BY [JobTitle], [PositionQty]" ConflictDetection="CompareAllValues" 
        DeleteCommand="DELETE FROM [Jobs] WHERE [JobID] = @original_JobID AND (([JobTitle] = @original_JobTitle) OR ([JobTitle] IS NULL AND @original_JobTitle IS NULL)) AND (([JobFile] = @original_JobFile) OR ([JobFile] IS NULL AND @original_JobFile IS NULL)) AND [PositionQty] = @original_PositionQty" 
        InsertCommand="INSERT INTO [UserJobs] ([Username], [JobID]) VALUES (@Username, @JobID)" 
        OldValuesParameterFormatString="original_{0}" UpdateCommand="UPDATE [Jobs] SET [JobTitle] = @JobTitle, [JobFile] = @JobFile, [PositionQty] = @PositionQty WHERE [JobID] = @original_JobID AND (([JobTitle] = @original_JobTitle) OR ([JobTitle] IS NULL AND @original_JobTitle IS NULL)) AND (([JobFile] = @original_JobFile) OR ([JobFile] IS NULL AND @original_JobFile IS NULL)) AND [PositionQty] = @original_PositionQty">  
        <DeleteParameters> 
            <asp:Parameter Name="original_JobID" Type="Int32" /> 
            <asp:Parameter Name="original_JobTitle" Type="String" /> 
            <asp:Parameter Name="original_JobFile" Type="String" /> 
            <asp:Parameter Name="original_PositionQty" Type="Int32" /> 
        </DeleteParameters> 
        <UpdateParameters> 
            <asp:Parameter Name="JobTitle" Type="String" /> 
            <asp:Parameter Name="JobFile" Type="String" /> 
            <asp:Parameter Name="PositionQty" Type="Int32" /> 
            <asp:Parameter Name="original_JobID" Type="Int32" /> 
            <asp:Parameter Name="original_JobTitle" Type="String" /> 
            <asp:Parameter Name="original_JobFile" Type="String" /> 
            <asp:Parameter Name="original_PositionQty" Type="Int32" /> 
        </UpdateParameters> 
        <InsertParameters> 
            <asp:ProfileParameter Name="Username" PropertyName="UserName" Type="String" /> 
            <asp:Parameter Name="JobID" DefaultValue="1" Type="Int32" /> 
        </InsertParameters> 
    </asp:SqlDataSource> 
    <br /> 
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" IconUrl="/img/icons/error.png" 
                Skin="Forest" Title="Error">  
                <Windows> 
                <telerik:RadWindow ID="radconfirm" IconUrl="/img/icons/help.png"></telerik:RadWindow>   
                </Windows> 
    </telerik:RadWindowManager> 
    <span class="hdrtext">Jobs You Have Applied For</span> 
 
    <script type="text/javascript">  
        var oldConfirm = radconfirm;  
 
        window.radconfirm = function(text, mozEvent) {  
            var ev = mozEvent ? mozEvent : window.event; //Moz support requires passing the event argument manually        
            //Cancel the event        
            ev.cancelBubble = true;  
            ev.returnValue = false;  
            if (ev.stopPropagation) ev.stopPropagation();  
            if (ev.preventDefault) ev.preventDefault();  
 
            //Determine who is the caller        
            var callerObj = ev.srcElement ? ev.srcElement : ev.target;  
 
            //Call the original radconfirm and pass it all necessary parameters        
            if (callerObj) {  
                //Show the confirm, then when it is closing, if returned value was true, automatically call the caller's click method again.        
                var callBackFn = function(arg) {  
                    if (arg) {  
                        callerObj["onclick"] = "";  
                        if (callerObj.click) callerObj.click(); //Works fine every time in IE, but does not work for links in Moz        
                        else if (callerObj.tagName == "A") //We assume it is a link button!        
                        {  
                            try {  
                                eval(callerObj.href)  
                            }  
                            catch (e) { }  
                        }  
                    }  
                }  
                oldConfirm('Are you sure you want to delete this job from your application?', callBackFn, 300, 100, null,'Delete Confirmation');  
            }  
            return false;  
        }       
    
    </script> 
 
    <telerik:RadGrid ID="RadGrid2" runat="server" DataSourceID="dsViewJobsAppliedFor" 
        GridLines="None" Skin="Default">  
        <MasterTableView AutoGenerateColumns="False" DataKeyNames="UserJobID" DataSourceID="dsViewJobsAppliedFor" 
            AllowAutomaticDeletes="True">  
            <RowIndicatorColumn> 
                <HeaderStyle Width="20px"></HeaderStyle> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn> 
                <HeaderStyle Width="20px"></HeaderStyle> 
            </ExpandCollapseColumn> 
            <Columns> 
                <telerik:GridBoundColumn DataField="username" HeaderText="username" SortExpression="username" 
                    UniqueName="username" Visible="False">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="UserJobID" DataType="System.Int32" HeaderText="UserJobID" 
                    SortExpression="UserJobID" UniqueName="UserJobID" ReadOnly="True" Visible="False">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="JobID" DataType="System.Int32" HeaderText="JobID" 
                    SortExpression="JobID" UniqueName="JobID" Visible="False">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="JobTitle" HeaderText="JobTitle" SortExpression="JobTitle" 
                    UniqueName="JobTitle" Visible="False">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="JobFile" HeaderText="JobFile" SortExpression="JobFile" 
                    UniqueName="JobFile" Visible="False">  
                </telerik:GridBoundColumn> 
                <telerik:GridHyperLinkColumn DataNavigateUrlFields="JobFile" DataTextField="JobTitle" 
                    HeaderText="Job Title" UniqueName="column">  
                </telerik:GridHyperLinkColumn> 
                <%--<telerik:GridButtonColumn ButtonType="PushButton" CommandName="Delete"   
            Text="Delete" UniqueName="Delete" HeaderText="Delete"   
            ConfirmText="Are you sure you want to delete this job from your application?" > 
        </telerik:GridButtonColumn>--%> 
                <telerik:GridTemplateColumn UniqueName="DeleteColumn" HeaderText="Delete">  
                    <%-- <HeaderTemplate>    
                                <table width="100%">     
                                    <tr>    
                                        <td style="width:50%">     
                                            RadConfirm</td>    
                                        <td style="width:50%">     
                                            Default confirm</td>    
                                    </tr>    
                                </table>    
                            </HeaderTemplate>--%> 
                    <ItemTemplate> 
                        <asp:Button ID="btnDelete" ToolTip="Delete Record" runat="server" CausesValidation="False" 
                            Text="Delete" CommandName="Delete" OnClientClick="return radconfirm('Are you sure you want to delete this record?', event);" /> 
                        <%--<table width="100%">     
                                    <tr>    
                                        <td>    
                                            </td>     
                                        <td>    
                                            <asp:ImageButton ID="ImageButton1" ToolTip="Delete Record" runat="server" CausesValidation="False"    
                                                CommandName="Delete" OnClientClick="return confirm('Are you sure you want to delete this record?');"    
                                                ImageUrl="~/RadControls/Grid/Skins/Default/Delete.gif" />    
                                        </td>    
                                    </tr>    
                                </table>--%> 
                    </ItemTemplate> 
                </telerik:GridTemplateColumn> 
            </Columns> 
            <EditFormSettings> 
                <EditColumn ButtonType="ImageButton">  
                </EditColumn> 
            </EditFormSettings> 
        </MasterTableView> 
    </telerik:RadGrid> 
    <asp:SqlDataSource ID="dsViewJobsAppliedFor" runat="server" ConflictDetection="CompareAllValues" 
        ConnectionString="<%$ ConnectionStrings:csSSEA %>" DeleteCommand="DELETE FROM [UserJobs] WHERE [userjobid] = @original_userjobid" 
        InsertCommand="INSERT INTO [UserJobs] ([Username], [JobID]) VALUES (@Username, @JobID)" 
        OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT uj.username, uj.UserJobID, uj.JobID, j.JobTitle, j.JobFile FROM UserJobs uj, Jobs j WHERE ([Username] = @UserName) and uj.jobid = j.jobid" 
        UpdateCommand="UPDATE [UserJobs] SET [Username] = @Username, [JobID] = @JobID WHERE [id] = @original_id AND [Username] = @original_Username AND [JobID] = @original_JobID">  
        <SelectParameters> 
            <asp:ProfileParameter Name="Username" PropertyName="UserName" Type="String" /> 
        </SelectParameters> 
        <DeleteParameters> 
            <asp:Parameter Name="original_userjobid" Type="Int32" /> 
            <asp:Parameter Name="original_Username" Type="String" /> 
            <asp:Parameter Name="original_JobID" Type="Int32" /> 
        </DeleteParameters> 
        <UpdateParameters> 
            <asp:Parameter Name="Username" Type="String" /> 
            <asp:Parameter Name="JobID" Type="Int32" /> 
            <asp:Parameter Name="original_id" Type="Int32" /> 
            <asp:Parameter Name="original_Username" Type="String" /> 
            <asp:Parameter Name="original_JobID" Type="Int32" /> 
        </UpdateParameters> 
        <InsertParameters> 
            <asp:Parameter Name="Username" Type="String" /> 
            <asp:Parameter Name="JobID" Type="Int32" /> 
        </InsertParameters> 
    </asp:SqlDataSource> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadGrid1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadGrid2" /> 
                    <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
</asp:Content> 
 

Imports Telerik.Web.UI  
Imports System.Configuration  
Imports System.Data.SqlClient  
Imports System.Data  
Imports ProfileCommon  
 
Partial Class jobs_view  
    Inherits System.Web.UI.Page  
    Protected Sub btnApply_Click(ByVal sender As ObjectByVal e As System.EventArgs)  
 
        Dim rowCount As Integer = RadGrid2.MasterTableView.GetItems(New GridItemType() {GridItemType.Item, GridItemType.AlternatingItem}).Length  
        If rowCount >= 5 Then 
 
            RadAjaxManager1.ResponseScripts.Add("radalert('Sorry, you can only apply for five (5) jobs.  Please remove a job from your list and try agian.', 330, 210);")  
 
        Else 
 
 
            'Configure SQL Connection  
            Dim cn As SqlConnection = New SqlConnection  
            Dim cmd As SqlCommand = New SqlCommand  
            Dim connString As String = ConfigurationManager.ConnectionStrings("csSSEA").ConnectionString  
            cn.ConnectionString = connString  
            cmd.CommandText = "[usp_UserJobsInsert]" 
            cmd.CommandType = System.Data.CommandType.StoredProcedure  
            cmd.Connection = cn  
 
            'Gets the name if authenticated.  
            Dim CurrentUserName As String 
            If User.Identity.IsAuthenticated Then 
                CurrentUserName = User.Identity.Name  
            Else 
                CurrentUserName = "N/A" 
            End If 
 
            'Get Datagrid Values and declare as sql param      
            Dim btn As Button = DirectCast(sender, Button)  
            Dim dataItem As GridDataItem = DirectCast(btn.NamingContainer, GridDataItem)  
            Dim strJobID As String = dataItem("JobID").Text  
            Dim dataItemKeys As Telerik.Web.UI.GridDataItem = DirectCast(btn.NamingContainer, Telerik.Web.UI.GridDataItem)  
            Dim JobID As String = dataItemKeys("JobId").Text  
 
            cmd.Parameters.Add("@UserName", SqlDbType.VarChar).Value = CurrentUserName  
            cmd.Parameters.Add("@JobID", SqlDbType.Int).Value = JobID  
 
            Try 
                If cn.State = ConnectionState.Closed Then 
                    cn.Open()  
                End If 
                cmd.ExecuteNonQuery()  
                cn.Close()  
                cn.Dispose()  
            Catch ex As Exception  
            End Try 
            RadGrid2.Rebind()  
        End If 
    End Sub 
 
 
End Class 
 

Brett
Top achievements
Rank 2
 answered on 03 Nov 2009
2 answers
105 views
I have a RadGrid which I bind it to a table of dataset. All the filters work apart from BETWEEN which I get the following error:
"Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Operator '>=' incompatible with operand types 'Object' and 'Double'"

This error happens for all the data tyeps. Does anybody know what is the problem? Thanks for your help.
bobTc
Top achievements
Rank 1
 answered on 03 Nov 2009
2 answers
177 views
Hi,

First off .. fantastic components.  We love em.

We recently upgraded to Ajax Q3 2008, and get this error in our log:

/WebResource.axd?d=vI7TvXstQkUlGOkffVYeiVH4oLo4xHYRyAN623_y6fyo6Bi_iDlXR_gHntoUm6ZjweHp_GF5UCroszHCDApuGZG4NC3OcFpX7hlk236bqRE1&t=633052519160000000 
Mozilla/5.0 
(Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.0 (KHTML, like 
Gecko) Chrome/3.0.195.27 Safari/532.0, System.IO.FileNotFoundException: 
Could not load file or assembly 'RadTabStrip.Net2' or one of its 
dependencies. The system cannot find the file specified. 
File name: 'RadTabStrip.Net2' 
 at System.Reflection.Assembly._nLoad(AssemblyName fileName, String 
codeBase, Evidence assemblySecurity, Assembly locationHint, 
StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean 
forIntrospection) 
 at System.Reflection.Assembly.nLoad(AssemblyName fileName, String 
codeBase, Evidence assemblySecurity, Assembly locationHint, 
StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean 
forIntrospection) 
 at System.Reflection.Assembly.InternalLoad(AssemblyName 
assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, 
Boolean forIntrospection) 
 at System.Reflection.Assembly.InternalLoad(String assemblyString, 
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean 
forIntrospection) 
   at System.Reflection.Assembly.Load(String assemblyString) 
   at System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context) 
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) 
 
WRN: Assembly binding logging is turned OFF. 
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. 
Note: There is some performance penalty associated with assembly bind failure logging. 
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. 
 

From what I understand, this file belonged to the old installation?

We've installed the new Telerik.Web.UI.DLL in the GAC, and have done a plain text search of all files (i.e. *.* ) and cannot find a single reference to the previous version RadTabStrip.Net2 ... (new version all in the one Web.UI.DLL), or the actual file.

Must be searching for the wrong thing or something?    

Are you able to help get rid of this error?   The actual TabStrips are appearing fine .. seems an intermittent error...

:-)

Thanks for your help.
vtech
Top achievements
Rank 1
 answered on 03 Nov 2009
1 answer
248 views
Hi, I have telerik ver 2009.02.0817.20

I have an area chart where my x-axis labels are dates using .ToOADate().
I found the code example on your site and it was working at one point early on.
I can't figure out for the life of me now what is wrong.
No matter what I do, the x-axis date lables are all showing up as the .ToOADate():  i.e. the label is "40096" instead of "10/10/2009".
The chartDay.Date, this.ChartStartDate, & this.ChartEndDate are all valid dates and all set to exactly midnight.
Here is my code, where am I going wrong????

<RadControl:RadChart ID="RadChartControl" SeriesOrientation="Vertical" runat="server" Skin="Web20" Height="225px" Width="777px" Visible="true" ChartTitle-Visible="false"></RadControl:RadChart> 

        private void PlotChart(System.Collections.Generic.List<LoanEventResponseTimeChartItem> chartData)  
        {  
            this.RadChartControl.Appearance.TextQuality = Telerik.Charting.Styles.TextQuality.AntiAlias;  
            this.RadChartControl.ChartTitle.TextBlock.Text = "Loan Event Average Response Time by Day";  
            this.RadChartControl.Series.Clear();  
 
            if (chartData != null && chartData.Count > 0)  
            {  
                Telerik.Charting.ChartSeries chartSeries = new Telerik.Charting.ChartSeries();  
                chartSeries.Name = "Loan Event Average Response Time";  
                chartSeries.Type = Telerik.Charting.ChartSeriesType.Area;  
                chartSeries.Appearance.ShowLabels = true;  
                chartSeries.Appearance.TextAppearance.TextProperties.Color = System.Drawing.Color.Black;  
                chartSeries.Appearance.PointMark.Visible = true;// To enable tooltips  
                this.RadChartControl.Series.Add(chartSeries);  
 
                foreach (LoanEventResponseTimeChartItem chartDay in chartData)  
                {  
                    Telerik.Charting.ChartSeriesItem chartItem = new Telerik.Charting.ChartSeriesItem();  
                    chartItem.XValue = chartDay.Date.ToOADate();  
                    chartItem.YValue = chartDay.AvgResponseTimeSecs;  
                    if (chartDay.AvgResponseTimeSecs > 0)  
                    {  
                        chartItem.Label.TextBlock.Appearance.AutoTextWrap = Telerik.Charting.Styles.AutoTextWrap.True;  
                        chartItem.Label.TextBlock.Appearance.Position.Auto = true;  
                        chartItem.Label.TextBlock.Text = chartDay.AvgResponseTimeSecs.ToString();  
                        // Tooltip  
                        chartItem.PointAppearance.Visible = true;// To enable tooltips  
                        chartItem.PointAppearance.Border.Width = (float)1;  
                        chartItem.PointAppearance.Border.Color = System.Drawing.Color.White;  
                        chartItem.PointAppearance.Dimensions.AutoSize = false;  
                        chartItem.ActiveRegion.Tooltip = "Average of " + chartDay.TotalLoanEventCount.ToString("#,###,####,###") + " Loan Events";  
                    }  
                    else 
                    {  
                        chartItem.Label.TextBlock.Text = "";  
                        chartItem.Label.Visible = false;  
                        chartItem.PointAppearance.Visible = false;  
                    }  
                    this.RadChartControl.Series[0].Items.Add(chartItem);  
                }  
 
                this.RadChartControl.Series[0].Appearance.LegendDisplayMode = Telerik.Charting.ChartSeriesLegendDisplayMode.Nothing;  
 
                const double dayStep = 1;  
                //const double hourStep = 1 / 24.0;  
                //const double minuteStep = hourStep / 60;  
                //const double fiveMinuteStep = minuteStep * 5;  
                this.RadChartControl.PlotArea.XAxis.AddRange(this.ChartStartDate.ToOADate(), this.ChartEndDate.ToOADate(), dayStep);  
 
            }  
 
            this.RadChartControl.PlotArea.XAxis.LayoutMode = Telerik.Charting.Styles.ChartAxisLayoutMode.Inside;  
            this.RadChartControl.PlotArea.XAxis.AutoScale = false;  
            this.RadChartControl.PlotArea.XAxis.IsZeroBased = false;  
            this.RadChartControl.PlotArea.XAxis.Appearance.ValueFormat = Telerik.Charting.Styles.ChartValueFormat.ShortDate;  
            this.RadChartControl.PlotArea.XAxis.Appearance.CustomFormat = "MM/dd/yyyy";  
            this.RadChartControl.PlotArea.XAxis.Appearance.MajorGridLines.Visible = false;  
            this.RadChartControl.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = (float)45;  
            this.RadChartControl.PlotArea.XAxis.Appearance.LabelAppearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.Top;  
            this.RadChartControl.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Font = new System.Drawing.Font("Ariel", 8);  
            this.RadChartControl.PlotArea.YAxis.IsZeroBased = false;  
 
            this.RadChartControl.PlotArea.EmptySeriesMessage.TextBlock.Text = "No data is available for the given criteria";  
            this.RadChartControl.PlotArea.Appearance.Dimensions.Margins.Top = Telerik.Charting.Styles.Unit.Pixel(0);  
            this.RadChartControl.PlotArea.Appearance.Dimensions.Margins.Bottom = Telerik.Charting.Styles.Unit.Pixel(68);  
            this.RadChartControl.PlotArea.Appearance.Dimensions.Margins.Left = Telerik.Charting.Styles.Unit.Pixel(55);  
            this.RadChartControl.PlotArea.Appearance.Dimensions.Margins.Right = Telerik.Charting.Styles.Unit.Pixel(0);  
 
            if (chartData == null || chartData.Count < 1)  
            {  
                this.RadChartControl.PlotArea.YAxis.AutoScale = false;  
                this.RadChartControl.PlotArea.YAxis.MaxValue = 0;  
                this.RadChartControl.PlotArea.YAxis.MinValue = 0;  
            }  
 
            this.RadChartControl.DataBind();  
        }  
 


Thanks,
Ray
Sir
Top achievements
Rank 1
 answered on 03 Nov 2009
2 answers
165 views

I have a grid which used an Insert/Edit form.

When you Insert a new record, it inserts fine except.

Then Insert from clears and stays open, I would like it to close automatically.

When you Update, the update form also stays open, but I would like that to remain.

Any ideas?


Thanks.

Cameron Arnott
Top achievements
Rank 1
 answered on 02 Nov 2009
1 answer
453 views
Hi Telerik Guys,

I have a problem with assigning the column width in percentage for rad grid.

Can any one tell me how we set the column width in percentage for the grid columns.

Please gives your responses ASPS.


<

 

telerik:RadGrid ID="RadGrid" runat="server" Width="97%" DataSourceID="ObjectDataSource"

 

 

SkinID="NoPostBackOnRowSelect" GridLines="Vertical" AllowSorting="true" Style="margin: 0px 10px 0px 10px"

 

 

AutoGenerateColumns="False" OnItemDataBound="EmailPhoneRadGrid_ItemDataBound">

 

 

<MasterTableView DataKeyNames="phoneEmailID" DataSourceID="EmailPhoneObjectDataSource"

 

 

Frame="Void">

 

 

<NoRecordsTemplate>

 

No records to display !

 

</NoRecordsTemplate>

 

 

<Columns>

 

 

<telerik:GridBoundColumn DataField="Col1" HeaderText="Col1" SortExpression="Col1" UniqueName="Col1">

 

 

<HeaderStyle Font-Names="Trebuchet MS" Font-Size="14px" ForeColor="#3496b4" Width="48.5%" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Col2" HeaderText="Col2" SortExpression="Col2"

 

 

UniqueName="Col2">

 

 

<HeaderStyle Font-Names="Trebuchet MS" Font-Size="14px" ForeColor="#3496b4" Width="15%" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Col3" HeaderText="Col3"

 

 

SortExpression="Col3" UniqueName="Col3">

 

 

<HeaderStyle Font-Names="Trebuchet MS" Font-Size="14px" ForeColor="#3496b4" Width="15%" />

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

</telerik:RadGrid>


I am using above code. Is this correct or not. Please guide me.

Thanks in Advance.

 

Schlurk
Top achievements
Rank 2
 answered on 02 Nov 2009
2 answers
229 views
Hi,

Im triying to extract the primary key value for parent groupfooter item when i click on it (my gridfooteritems are links). I have two levels of groups

protected void tk_Grid_ItemDataBound(object sender, GridItemEventArgs e) 
    { 
    if (e.Item is GridGroupFooterItem) 
        { 
 
            GridGroupFooterItem gridfooteritem = e.Item as GridGroupFooterItem;                         
 
            if (double.Parse(gridfooteritem["Enero"].Text) == 0) gridfooteritem["Enero"].Text = ""
            gridfooteritem["Enero"].Text = "<a class=linkstotal href=frmAnexoBalance.aspx?Periodo=ENERO&MesID=1&GGPPID=0>" + gridfooteritem["Enero"].Text + "</a>"

Regards Gino
Gino Suarez
Top achievements
Rank 1
 answered on 02 Nov 2009
1 answer
91 views
i am trying to load a tree server-side in a code behind page and need to set certain nodes to be initially hidden from the user. they are made visible based on the answers to certain questions via javascipt client-side (which works fine). i cannot figure out how cause them to be initially hidden or to set a css class on the <LI>. by appending "tree_node_hidden" to the CssClass property of the node - this only causes the caption to be hidden and does not collapse the node.

mynode.CssClass +=

" tree_node_hidden "

 


results in this...

<li class="rtLI"><div class="rtMid">
   <span class="rtSp"></span><img src="../images/eforms_blank.gif" alt="" class="rtImg" /><span class="rtIn tree_node tree_node_hidden">Employer</span>
  </div></li>

thanks for any help

paul
Schlurk
Top achievements
Rank 2
 answered on 02 Nov 2009
1 answer
254 views
I am using the Office2007 skin for the Tabstrip control and need to change the background color from that light blue to another color.

Following instructions from another post, I created the following style:

.customBackground {
  background-color:  #eeeeee  !important;
}

Then added the style to the CssStyle property of the tabstrip.

It does not override the Office2007 background color.  

Is this possible?

Thanks,
Jaime
Schlurk
Top achievements
Rank 2
 answered on 02 Nov 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?