Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
132 views
I have a radgrid in which I am using a custom edit form. When I do anything on the edit form I am getting the error in the screenshot attached to this post. Below is the code for my edit form control and code behind of the custom edit form control.

Custom Edit Form Control UI Code:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EditSCAC.ascx.cs" Inherits="EditSCAC" %>
<telerik:RadAjaxManager ID="radAjaxMgr" runat="server" UpdatePanelsRenderMode="Inline">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="scacGrid">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="scacTypeDDL" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<div>
    <table id="scacEditTable">
        <tr>
            <td>
                <table>
                    <tr>
                        <td>
                            <asp:Label runat="server">SCAC:</asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="scacTB" runat="server"  Text='<%# DataBinder.Eval( Container, "DataItem.SCAC") %>'></asp:TextBox>
                        </td>
                        <td>
                            <asp:Label runat="server">SCAC DESCRIPTION:</asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="scacDescTB" runat="server"  Text='<%# DataBinder.Eval( Container, "DataItem.SCAC_DESC") %>'></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label runat="server">SCAC PHONE:</asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="scaPhoneTB" runat="server"  Text='<%# DataBinder.Eval( Container, "DataItem.SCAC_PHONE") %>'></asp:TextBox>
                        </td>
                        <td>
                            <asp:Label runat="server">SCAC TYPE:</asp:Label>
                        </td>
                        <td>
                            <telerik:RadComboBox ID="scacTypeDDL" AutoPostBack="True" runat="server" EmptyMessage="Please choose a type...">
                            </telerik:RadComboBox>
                        </td>
                        <td>
                            <asp:Label runat="server">CONTACT:</asp:Label>
                        </td>
                        <td>
                            <telerik:RadComboBox ID="contactDDL" AutoPostBack="True" runat="server" EmptyMessage="Please choose a contact...">
                            </telerik:RadComboBox>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:Button ID="btnUpdate" Text="Update" runat="server" CommandName="Update" Visible='<%# !(DataItem is GridInsertionObject) %>'
                                CausesValidation="true" ValidationGroup="FormValidationGroup"></asp:Button>
                            <asp:Button ID="btnInsert" Text="Insert" runat="server" CommandName="PerformInsert"
                                Visible='<%# (DataItem is GridInsertionObject) %>' CausesValidation="true" ValidationGroup="FormValidationGroup">
                            </asp:Button>
                              
                            <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                CommandName="Cancel"></asp:Button>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</div>


Custom Edit Form Control Code Behind:
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DataAccess;
using Telerik.Web.UI;
 
namespace IRRIS.Site.DTTS
{
    public partial class EditSCAC : System.Web.UI.UserControl
    {
        public object DataItem { get; set; }
 
        protected void Page_Load(object sender, EventArgs e)
        {
            Populate_SCACDDL();
            Populate_ContactsDDL();
        }
 
        protected void Populate_SCACDDL()
        {
            var ds = new DataSet();
            var factory = new QueryFactory(new Configuration().DataConfigurationFile);
            var query = factory.GetQuery("P_GET_SCAC_TYPES");
            query.Fill(ds);
 
            var list = new List<string>();
            var dt = ds.Tables[0];
            list = (from dr in dt.AsEnumerable()
                    select dr.Field<string>("LUVALUE")).ToList<string>();
 
            scacTypeDDL.DataTextField = ds.Tables[0].Columns["LUDESCRIPTION"].ToString();
            scacTypeDDL.DataValueField = ds.Tables[0].Columns[1].ToString();
            scacTypeDDL.DataSource = ds.Tables[0];
 
            var scacTypeDdlValue = String.Empty;
             
            if (DataItem != null)
            {
                scacTypeDdlValue = DataBinder.Eval(DataItem, "SCAC_TYPE").ToString();
                if (!list.Contains(scacTypeDdlValue))
                {
                    scacTypeDDL.SelectedIndex = -1;
                }
                else
                {
                    scacTypeDDL.SelectedValue = scacTypeDdlValue;
                }
            }
        }
 
        protected void Populate_ContactsDDL()
        {
            var ds = new DataSet();
            var factory = new QueryFactory(new Configuration().DataConfigurationFile);
            var query = factory.GetQuery("P_GET_ALL_CONTACTS");
            query.Fill(ds);
 
            var list = new List<string>();
            var dt = ds.Tables[0];
            list = (from dr in dt.AsEnumerable()
                    select Convert.ToString(dr.Field<decimal>("CONTACT_ID"))).ToList<string>();
 
            contactDDL.DataTextField = ds.Tables[0].Columns["CONTACT_ORG"].ToString();
            contactDDL.DataValueField = ds.Tables[0].Columns[0].ToString();
            contactDDL.DataSource = ds.Tables[0];
 
            var contactDdlValue = String.Empty;
             
            if (DataItem != null)
            {
                contactDdlValue = DataBinder.Eval(DataItem, "SCAC_CONTACT_ID").ToString();
                if (!list.Contains(contactDdlValue))
                {
                    contactDDL.SelectedIndex = -1;
                }
                else
                {
                    contactDDL.SelectedValue = contactDdlValue;
                }
            }
        }
    }
}


Any ideas what could be causing this error?
Eyup
Telerik team
 answered on 08 May 2013
1 answer
203 views
Hi there,

I'm handling the client side event 'OnClientHiding'. The event is raised and my code is called. In my code some click events are assigned to some check boxes using jQuery. Unfortunately the click event handlers don't run when I click on the check boxes.

The jQuery code works perfectly when the page first loads. Its when I try and re-initialize the check boxes after a call back that it doesn't run properly.

Do you have any idea how to fix this?

Here is some code...

$(document).ready(function () {  
    f
(); 
}); 
 
 
function LoadingPanelHiding(sender, eventArgs) { 
     f
(); 
 
} 
 
 
function f() { 
         $
('.selectAll').click(function () { 
             alert
('Hello world!'); 
        
}); 
 
} 

Cheers, Ian.
Trustteam
Top achievements
Rank 2
 answered on 08 May 2013
3 answers
105 views
Hi,

I am in the process of developing a custom dashboard webpart in Sharepoint 2010 by making use of RadChart. I need to add RadToolTips to the series items of the radchart showing the values of the series items. I am able to bring tool tips by making use of RadToolTipManager by setting its AutoTooltipify property to true but using RadToolTipManager I am not able to display any image or control the appearance of the tooltip as I could do in ordinary RadToolTip (any html snippet can be included in ordinary RadToolTip).
So can you please tell me a way for showing RadToolTip with an image in it for RadChart Series item (without using RadToolTipManager)? Please respond to this ASAP since I am doing POC for making use of RadChart within Sharepoint webpart. 

Note: This RadChart is being used in the Visual Webpart in VS 2010. The version of Rad controls I use is "RadControls for ASP.NET AJAX Q1 2013" 

Thanks,
Rahib S.
Stamo Gochev
Telerik team
 answered on 08 May 2013
1 answer
142 views
Hi,

I created a radChart programmatically, with positive and negative values. But when the chart is plotted, a black line appears in the zero value.
How do i disable/hide this?
Peshito
Telerik team
 answered on 08 May 2013
1 answer
76 views
Hi,

How to change the Radmenuitem forecolor kn mouse overing?

Thanks for reply,
Tia.
Shinu
Top achievements
Rank 2
 answered on 08 May 2013
1 answer
133 views
i have two dropdownlist in that one dropdownlist connected with stored procedure it contains data textfield is cellname and data valuefield is cellid based on cellid the second dropdownlist displays zone name.  in second dropdownlist contains list of values. after selecting the value and button click event performed. if button clicked, default first value is loaded.
Shinu
Top achievements
Rank 2
 answered on 08 May 2013
4 answers
164 views
Hi All,

I'm currently trying to make a simple form using the ASP.NET Grid control and I am running into an issue. When I try to use CRUD with the Entity Framework, all the fields that are not relationships to other tables work great, but fields that are relationships don't show up at all. A great example is the Telerik example:
http://demos.telerik.com/aspnet-ajax/grid/examples/databinding/net35datasourcecontrols/defaultcs.aspx

In the second grid, the one that is bound to an Entity, you see that category shows up as an ID. I don't even get this much in my app. I see all the fields except for the Category field. Ideally it would show the name of the category, and then when you do any CRUD operations, it would show the field as a ComboBox.

Is this something that is even possible with the Telerik controls?


Thanks!
Antonio Stoilkov
Telerik team
 answered on 08 May 2013
3 answers
202 views
I cant seem to get formatting working in the Pivot Grid. For example, here us the code, but the date is always shown unformatted.

        <telerik:PivotGridRowField Caption="TransDate" DataField="TransDate" SortOrder="Descending"
            DataFormatString="{0:MM/dd/yy}">


Milena
Telerik team
 answered on 08 May 2013
1 answer
173 views
Dear Telerik,

we are using RadSplitter, RadDockLayout , RadDock and RadChart in our application.

  1. We need to set our custom width and height of raddock and radchart when we drop those from radsplitter to raddocklayout.
  2. similarly when dropped from raddocklayout to radsplitter  the raddock and radchart within should to width and height of radsplitter.
  3. if we resize raddock then radchart should resize automatically itself.

In ASPX side code :

  <telerik:RadSplitter ID="RadSplitter1" runat="server" Height="100%" BorderSize="0"
            BorderWidth="0" Skin="Black">
            <telerik:RadPane ID="RadPane1" runat="server" Width="350px" BorderSize="0" BorderWidth="0"
                Height="100%">
                <telerik:RadSlidingZone ID="RadSlidingZone1" runat="server" BorderSize="0" BorderWidth="0">
                    <telerik:RadSlidingPane ID="RadSlidingPane1" Title="RadSlidingPane1" runat="server"
                        BorderSize="0" BorderWidth="0" Width="300px">
                        <telerik:RadDockLayout runat="server" ID="RadDockLayout1" OnLoadDockLayout="RadDockLayout11_LoadDockLayout"
                            StoreLayoutInViewState="false" EnableViewState="false">
                            <telerik:RadDockZone runat="server" ID="RadDockZoneVertical1" Orientation="Vertical"
                                FitDocks="true" RenderMode="Classic" BorderSize="0" BorderWidth="0" Width="270px"
                                MinHeight="270px">
                                <telerik:RadDock runat="server" ID="RadDock9" Text="Chart 1" EnableAnimation="true"
                                    DockMode="Default" EnableAjaxSkinRendering="true" EnableEmbeddedBaseStylesheet="true"
                                    RenderMode="Classic" Width="150px" EnableRoundedCorners="true" Resizable="true"
                                    DockHandle="Grip" Skin="Black" BorderSize="0" BorderWidth="0" AutoPostBack="true"
                                    UniqueName="raddoc1" CssClass="chartDock">
                                    <ContentTemplate>
  <telerik:RadChart ID="radChartJP" runat="server" IntelligentLabelsEnabled="True"
                                           Legend-Visible="true" ChartTitle-TextBlock-Text=""
                                            AutoLayout="false" Skin="Default">
                                        </telerik:RadChart>
                                        </div>
                                    </ContentTemplate>
                                </telerik:RadDock>
</telerik:RadDockZone>
                        </telerik:RadDockLayout>
                    </telerik:RadSlidingPane>
                </telerik:RadSlidingZone>
            </telerik:RadPane>
        </telerik:RadSplitter>

Could you please advise how to achieve the same.



Slav
Telerik team
 answered on 08 May 2013
1 answer
207 views
HI

i have enabled  CdnSettings-TelerikCdn="Enabled"

<telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" CdnSettings-TelerikCdn="Enabled" />

i get the follwoing css files loaded on the page . I want the following css to be combined to singel file  and load on the page . I have even enabled EnableStyleSheetCombine="true"  but that dint combine the css


<link href="http://aspnet-skins.telerikstatic.com/ajaxz/2009.3.1203/Menu.css" type="text/css"

    rel="stylesheet" class="Telerik_stylesheet" />

<link href="http://aspnet-skins.telerikstatic.com/ajaxz/2009.3.1203/Outlook/Menu.Outlook.css"

    type="text/css" rel="stylesheet" class="Telerik_stylesheet" />

<link href="http://aspnet-skins.telerikstatic.com/ajaxz/2009.3.1203/TabStrip.css"

    type="text/css" rel="stylesheet" class="Telerik_stylesheet" />

<link href="http://aspnet-skins.telerikstatic.com/ajaxz/2009.3.1203/Default/TabStrip.Default.css"

    type="text/css" rel="stylesheet" class="Telerik_stylesheet" />

<link href="http://aspnet-skins.telerikstatic.com/ajaxz/2009.3.1203/ListBox.css"

    type="text/css" rel="stylesheet" class="Telerik_stylesheet" />

<link href="http://aspnet-skins.telerikstatic.com/ajaxz/2009.3.1203/Hay/ListBox.Hay.css"

    type="text/css" rel="stylesheet" class="Telerik_stylesheet" />

we have even other css to load on the page . it would be helpful if we can combine  aspnet-skins.telerikstatic.com CSS in single file. please help me in resolveing the issue

Ivan Zhekov
Telerik team
 answered on 08 May 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?