Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
173 views
I have following paragraphs defined.

<paragraphs> 
    <paragraph name="Normal" value="&lt;p&gt;" /> 
    <paragraph name="&lt;h6&gt;Local header&lt;/h6&gt;" value="&lt;h6&gt;" /> 
</paragraphs> 

In the dropdown the choices Normal and "Local header" is displayed, but when you select  a "local header" (h6) element in the editor the text "Heading 6" is displayed in the  dropdown. How can make so the text "Local header" is displayed instead?
arnesten
Top achievements
Rank 1
 answered on 18 Nov 2009
1 answer
219 views
I have a new page using the RAD listboxes, when I place the RAD scriptmanager on the page and navigate to it, I recieve an object reference not set to an instance error message.  I am running telerik version 2009.3.1103.35.  If I replace the rad script manager with a regular script manager the error stops but none of the skins are working correctly.

<%

@ Page Language="C#" AutoEventWireup="true" CodeBehind="ShipmentForwardingVendorCrews.aspx.cs"

 

 

Inherits="Graebel.RITS.Web.Relocations.ShipmentForwardingVendorCrews" %>

 

<%

@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

 

<%

@ Register assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" namespace="System.Web.UI.WebControls" tagprefix="asp" %>

 

<!

 

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 runat="server">

 

 

<title>Shipment Forwarding Vendor Crews</title>

 

 

<link href="../Graebel.css" rel="stylesheet" />

 

</

 

head>

 

<

 

body>

 

 

<form id="ShipmentForwardingVendorCrews" runat="server">

 

 

<asp:ScriptManager ID="ScriptManager1" runat="server">

 

 

</asp:ScriptManager>

 

 

<asp:Panel ID="PageContent" runat="server">

 

 

<h1>

 

Shipment Forwarding Vendor Crews

</h1>

 

 

<br />

 

 

<asp:DropDownList ID="ddlODAgent" runat="server">

 

 

</asp:DropDownList>

 

 

<br />

 

 

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">

 

 

<telerik:RadListBox ID="rlbIsNotCrewLeads" runat="server" Width="200px"

 

 

Height="200px" AllowTransfer="True"

 

 

TransferToID="rlbIsCrewLeads" AutoPostBackOnTransfer="True"

 

 

AllowReorder="True" AutoPostBackOnReorder="True" EnableDragAndDrop="True"

 

 

DataSourceID="UnassignedCrewLeadsDataSource" DataKeyField="VendorCrewId" DataTextField="FirstName"

 

 

DataValueField="VendorCrewId" Skin="Sunset" BorderColor="Black"

 

 

BorderWidth="2px" CausesValidation="False" EmptyMessage="No Crew Members Exist"

 

 

ForeColor="Black">

 

 

<EmptyMessageTemplate>

 

No Crew Members Exist

 

</EmptyMessageTemplate>

 

 

</telerik:RadListBox>

 

 

<telerik:RadListBox ID="rlbIsCrewLeads" runat="server" Width="200px" Height="200px"

 

 

SelectionMode="Multiple" AllowReorder="True" AutoPostBackOnReorder="True"

 

 

EnableDragAndDrop="True" Skin="Telerik"

 

 

EmptyMessage="No Assigned Crew Members Exist">

 

 

<EmptyMessageTemplate>

 

No Assigned Crew Members Exist

 

</EmptyMessageTemplate>

 

 

</telerik:RadListBox>

 

 

<br />

 

 

</telerik:RadAjaxPanel>

 

 

<asp:EntityDataSource ID="UnassignedCrewLeadsDataSource" runat="server"

 

 

AutoGenerateWhereClause="True"

 

 

CommandText="SELECT value crew

 

FROM VendorCrew AS crew

WHERE NOT EXISTS(SELECT sfvc.VendorCrew.VendorCrewId

FROM ShipmentForwardingVendorCrew AS sfvc

WHERE sfvc.Shipments.ShipmentId = @ShipmentId)

AND crew.CompanyEntities.CompanyEntityId = @VendorId

AND crew.IsActive = true

AND crew.IsCrewLead = true"

 

 

 

ConnectionString="name=RITSNetEntities"

 

 

DefaultContainerName="RITSNetEntities"

 

 

Include="ShipmentForwardingVendorCrew,CompanyEntities">

 

 

<CommandParameters>

 

 

<asp:QueryStringParameter Name="ShipmentId" QueryStringField="10" Type="Int32" />

 

 

<asp:ControlParameter ControlID="ddlODAgent" Name="VendorId"

 

 

PropertyName="SelectedValue" Type="Int32" />

 

 

</CommandParameters>

 

 

</asp:EntityDataSource>

 

<%

--<asp:EntityDataSource ID="AssignedCrewLeadsDataSource" runat="server"

 

AutoGenerateWhereClause="True"

CommandText="SELECT value crew

FROM VendorCrew AS crew

WHERE EXISTS(SELECT sfvc.VendorCrew.VendorCrewId

FROM ShipmentForwardingVendorCrew AS sfvc

WHERE sfvc.Shipments.ShipmentId = @ShipmentId)

AND crew.CompanyEntities.CompanyEntityId = @VendorId

AND crew.IsActive = true

AND crew.IsCrewLead = true"

ConnectionString="name=RITSNetEntities"

DefaultContainerName="RITSNetEntities"

Include="ShipmentForwardingVendorCrew,CompanyEntities">

<CommandParameters>

<asp:QueryStringParameter Name="ShipmentId" QueryStringField="10" Type="Int32" />

<asp:ControlParameter ControlID="ddlODAgent" Name="VendorId"

PropertyName="SelectedValue" Type="Int32" />

</CommandParameters>

</asp:EntityDataSource>--

 

%>

 

 

<asp:EntityDataSource ID="UnassignedCrewDataSource" runat="server"

 

 

AutoGenerateWhereClause="True"

 

 

CommandText="SELECT value crew

 

FROM VendorCrew AS crew

WHERE NOT EXISTS(SELECT sfvc.VendorCrew.VendorCrewId

FROM ShipmentForwardingVendorCrew AS sfvc

WHERE sfvc.Shipments.ShipmentId = @ShipmentId)

AND crew.CompanyEntities.CompanyEntityId = @VendorId

AND crew.IsActive = true"

 

 

 

ConnectionString="name=RITSNetEntities"

 

 

DefaultContainerName="RITSNetEntities"

 

 

Include="ShipmentForwardingVendorCrew,CompanyEntities">

 

 

<CommandParameters>

 

 

<asp:QueryStringParameter Name="ShipmentId" QueryStringField="10" Type="Int32" />

 

 

<asp:ControlParameter ControlID="ddlODAgent" Name="VendorId"

 

 

PropertyName="SelectedValue" Type="Int32" />

 

 

</CommandParameters>

 

 

</asp:EntityDataSource>

 

<%

--<asp:EntityDataSource ID="AssignedCrewDataSource" runat="server"

 

AutoGenerateWhereClause="True"

CommandText="SELECT value crew

FROM VendorCrew AS crew

WHERE EXISTS(SELECT sfvc.VendorCrew.VendorCrewId

FROM ShipmentForwardingVendorCrew AS sfvc

WHERE sfvc.Shipments.ShipmentId = @ShipmentId)

AND crew.CompanyEntities.CompanyEntityId = @VendorId

AND crew.IsActive = true"

ConnectionString="name=RITSNetEntities"

DefaultContainerName="RITSNetEntities"

Include="ShipmentForwardingVendorCrew,CompanyEntities">

<CommandParameters>

<asp:QueryStringParameter Name="ShipmentId" QueryStringField="10" Type="Int32" />

<asp:ControlParameter ControlID="ddlODAgent" Name="VendorId"

PropertyName="SelectedValue" Type="Int32" />

</CommandParameters>

</asp:EntityDataSource>--

 

%>

 

 

</asp:Panel>

 

 

</form>

 

</

 

body>

 

</

 

html>

 

Veselin Vasilev
Telerik team
 answered on 18 Nov 2009
2 answers
66 views
Hi,

 I m using RadCombo to select multiple items using chekbox, i need to handle the FooterTemplate enable/disable or visible/hidden via CLIENT SCRIPT.

Placing some control on the FooterTemplate, once if i select the item is called "Custom" checkbox then only footertemplete visible = true, otherwise it shold be hidden.


How can i handle this using client script..


Thanks & Regards,

Suresh Kannan P
Suresh Kannan
Top achievements
Rank 1
 answered on 18 Nov 2009
4 answers
95 views
Hi All,

I do not want to apply radajaxloadingpanel for my grid, how can i do this.

my webform contains radajaxpanel in side this i have rad grid and some textboxes and button.  for radajaxpanel i have given loadingoanel id, loading panel is working fine when i click on buttons, but loading panel is getting struck when i click export to excel command in grid. 

so i donot want to apply radajaxloadingpanel for my grid, how can i do this.

Please help me regarding this.
pradeep k
Top achievements
Rank 1
 answered on 18 Nov 2009
2 answers
85 views
Hi

I show different panels on a page based on the different menu options

I want to do this with JS, It works perfectly on the first click but then after that locks up the page and doesnt recognioze any more clicks

I assume I am missing something simple but am unable to put a finger on it

function onClicked(sender, eventArgs) 
            { 
             
            var name = eventArgs.get_item().get_text(); 
             
                if (name = "Panel1"
                { 
                    document.getElementById("Panel1").style.display='block'
                    document.getElementById("Panel2").style.display='none'
                    document.getElementById("Panel3").style.display='none'
                } 
                if (name = "Panel2"
                { 
                    document.getElementById("Panel2").style.display='block'
                    document.getElementById("Panel1").style.display='none'
                    document.getElementById("Panel3").style.display='none';  
                } 
                if (name = "Panel3"
                { 
                   document.getElementById("Panel1").style.display='none'
                    document.getElementById("Panel2").style.display='none'
                    document.getElementById("Panel3").style.display='block'
                } 
                 
            } 
Ciaran
Top achievements
Rank 1
 answered on 18 Nov 2009
1 answer
156 views
Hi,

I'm having a problem populating my Rad Rotator using the traditional way of using a datasource in the ASP side of the code, this is what my code looks like.

<telerik:RadRotator runat="server" ID="RadRotator1" RotatorType="AutomaticAdvance" ScrollDirection="Up" FrameDuration="7000" 
        DataSourceID="SqlDataSource1">  
    <Items> 
        <telerik:RadRotatorItem> 
            <ItemTemplate> 
                <asp:Image ID="imgAdBanner" runat="server" ImageUrl='<%# "~/ImageFilePath/" & Eval("ImageName") %>' 
                        
NavigateUrl='<%# Eval("LinkUrl") %>'  AlternateText='<%# Eval("AltText") %>' />
                        
            </ItemTemplate> 
        </telerik:RadRotatorItem> 
    </Items> 
</telerik:RadRotator> 
 
<asp:SqlDataSource runat="server" ID="SqlDataSource1" 
    ConnectionString="<%$ ConnectionStrings : CS %>" 
    SelectCommand="SELECT ImageName, LinkUrl, AltText FROM RotatorImages">  
</asp:SqlDataSource> 

Any advice will be greatly appreciated.
Shinu
Top achievements
Rank 2
 answered on 18 Nov 2009
1 answer
107 views
Hi,
      I'm aware that there is the functionality to reorder and move columns around in a gridview, however are there functions to Hide and Unhide specific columns and show all columns.

Regards

Robert
Shinu
Top achievements
Rank 2
 answered on 18 Nov 2009
1 answer
169 views
Hi,

I have one grid which contains around 150 records. I have Edit Case button. Initially I have set the Page Size of the grid as 10. User can change the page size and will select some 100th record and clicks on Edit case button.
I need to display the selected case details and also need to reduce the page size of the grid from 10 (Or user selected page size) to 5 and wherever the 100th record exists (i.e in any page) that needs to be highlighted. Is this possible in the RadGrid?

Regards,
Medac
Mira
Telerik team
 answered on 18 Nov 2009
1 answer
111 views
Is there a way to establish the datalabelscolumn for a numeric column?

I am returning  3 columns from a stored procedure.  Column 1 is weekname and has values 1-52 in rotating order, the other two are the series data.

DataLabelsColumn is being set in page.load as:

rctrend.PlotArea.XAxis.DataLabelsColumn = "weekname"

 


If from the stored procedure, I do this:  Select [weekname] as weekname
I get 3 series in my chart  and the datalabelscolumn directive is ignored.

If from the stored procedure, I do this:  Select convert(varchar(10),[weekname]) as weekname
or SELECT convert(text, convert(varchar(10),[weekname]) )) as weekname
I get 3 series in my chart and the datalabelscolumn directive is ignored.


If from the stored procedure, I do this:  SELECT 'w ' + convert(varchar(10), [weekname]) as weekname
DataLabelsColumn is respected and I get 2 series.

Whole routine is below:
    Private Sub MakeGraph()  
        If Not IsPostBack Then  
            rctrend.Chart.PlotArea.YAxis.AutoScale = True 
            rctrend.PlotArea.YAxis.AutoScale = True 
            rctrend.PlotArea.YAxis.IsZeroBased = False 
            rctrend.PlotArea.XAxis.DataLabelsColumn = "weekname" 
        End If  
 
        rctrend.ChartTitle.TextBlock.Text = "Something" 
        rctrend.DataSource = gensql.Get52WeekGraph  
        rctrend.DataBind()  
 
        If Not IsPostBack Then  
            rctrend.Series(0).Appearance.ShowLabels = False 
            rctrend.Series(1).Appearance.ShowLabels = False 
        End If  
    End Sub 
Giuseppe
Telerik team
 answered on 18 Nov 2009
17 answers
1.1K+ views
Hi,
 I am getting the following error when I am performing insert using "PerformInsert" from CommandItemTemplate.
Unable to cast object of type 'Telerik.Web.UI.GridCommandItem' to type 'Telerik.Web.UI.GridEditFormInsertItem'
ASPX Page : Grid Definition
<telerik:RadGrid ID="RadGrid1" Skin="Sunset" GridLines="None" runat="server" 
                 Width="97%" AllowPaging="True" AutoGenerateColumns="False" AllowMultiRowEdit="True" 
                OnNeedDataSource="RadGrid1_NeedDataSource"   
                AllowFilteringByColumn="True"    
                AllowSorting="True" PageSize="5" AllowMultiRowSelection="True"   
                ongridexporting="RadGrid1_GridExporting" OnItemCreated="RadGrid1_ItemCreated" 
                OnItemCommand="RadGrid1_ItemCommand" OnItemDataBound="RadGrid1_ItemDataBound">  
 
            <HeaderContextMenu Skin="Inox" EnableTheming="True">  
            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
            </HeaderContextMenu> 
 
                <PagerStyle Mode="NextPrevNumericAndAdvanced" /> 
                <MasterTableView Width="100%" CommandItemDisplay="TopAndBottom" DataKeyNames="DespatchNum" GridLines="None"   
                     AutoGenerateColumns="False" EditMode="EditForms">  
                    <Columns>                 
ASPX : Command Item Template Definition
 <CommandItemTemplate> 
                    <div style="padding: 0 5px;">  
                        Custom command item template&nbsp;&nbsp;&nbsp;&nbsp;  
                        <asp:LinkButton ID="btnEditSelected" runat="server" CommandName="EditSelected" Visible='<%# RadGrid1.EditIndexes.Count == 0 %>'>  
                        <img style="border:0px;vertical-align:middle;" alt="" src="../App_Themes/Sunset/Edit.gif" /></asp:LinkButton>&nbsp;&nbsp;  
                          
                        <asp:LinkButton ID="btnUpdateEdited" runat="server" CommandName="UpdateAll" Visible='<%# RadGrid1.EditIndexes.Count > 0 %>'>  
                        <img style="border:0px;vertical-align:middle;" alt="" src="../App_Themes/Sunset/Update.gif" /></asp:LinkButton>&nbsp;&nbsp;  
                          
                        <asp:LinkButton ID="btnCancel" runat="server" CommandName="CancelAll" Visible='<%# RadGrid1.EditIndexes.Count > 0 || RadGrid1.MasterTableView.IsItemInserted %>' CausesValidation="False">  
                        <img style="border:0px;vertical-align:middle;" alt="" src="../App_Themes/Sunset/Cancel.gif" /></asp:LinkButton>&nbsp;&nbsp;  
                          
                        <asp:LinkButton ID="btnAddNew" runat="server" CommandName="InitInsert" Visible='<%# !RadGrid1.MasterTableView.IsItemInserted %>'>  
                        <img style="border:0px;vertical-align:middle;" alt="" src="../App_Themes/Sunset/AddRecord.gif" /></asp:LinkButton>&nbsp;&nbsp;  
                          
                        <%--<asp:LinkButton ID="btnInsert" runat="server" CommandName="PerformInsert" Text="Insert" Visible='<%# RadGrid1.MasterTableView.IsItemInserted %>'>  
                        <img style="border:0px;vertical-align:middle;" alt="" src="../App_Themes/Sunset/Update.gif" /></asp:LinkButton>&nbsp;&nbsp;--%> 
                          
                        <asp:LinkButton ID="btnInsert" runat="server" CommandName="PerformInsert" Visible='<%# RadGrid1.MasterTableView.IsItemInserted %>'>  
                        <img style="border:0px;vertical-align:middle;" alt="" src="../App_Themes/Sunset/Update.gif" /></asp:LinkButton>&nbsp;&nbsp;  
                          
                        <asp:LinkButton ID="btnDelete" OnClientClick="javascript:return confirm('Delete all selected customers?')" runat="server" CommandName="DeleteAll">  
                        <img style="border:0px;vertical-align:middle;" alt="" src="../App_Themes/Sunset/Delete.gif" /></asp:LinkButton>&nbsp;&nbsp;  
                          
                        <asp:LinkButton ID="btnRefresh" runat="server" CommandName="RebindGrid">  
                        <img style="border:0px;vertical-align:middle;" alt="" src="../App_Themes/Sunset/Refresh.gif" /></asp:LinkButton> 
                          
                        <asp:LinkButton ID="btnExportExcel" runat="server" CommandName="ExportToExcel">  
                        <img style="border:0px;vertical-align:middle;" alt="Export To Excel" src="" /></asp:LinkButton> 
                    </div> 
                </CommandItemTemplate> 

C# : Insert functionality inplemented in Item Command Event
 protected void RadGrid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)  
        {  
            if (e.CommandName == "PerformInsert")  
            {  
                    //GridDataInsertItem insertedItem = e.Item as GridDataInsertItem;  
                GridEditFormInsertItem insertedItem = (GridEditFormInsertItem)e.Item;  
                  
                  
                //GridDataInsertItem insertedItem = (GridDataInsertItem)e.Item;  
 
                string Status = (insertedItem["DespatchStatus"].Controls[0] as TextBox).Text;  
                string RegionCode = (insertedItem["RegionCode"].FindControl("txtRegionCode"as TextBox).Text;  
                string LabCode = (insertedItem["LabCode"].Controls[0] as TextBox).Text;  
                string SampleCode = (insertedItem["SampleCode"].Controls[0] as RadComboBox).SelectedValue.ToString();  
            }  
        } 

I am getting error in line 6:
"GridEditFormInsertItem insertedItem = (GridEditFormInsertItem)e.Item;"

I have implemented Update and Delete methods similarly from Command Item Template, they seem to work fine. Just Insert is giving me this particular error.
But if i use the "Insert" button that comes by default in edit form, it is working fine.

I hope this information is sufficient. I you need further information please do let me know.

P.S : I have seen a few other suggestions in the forum saying to remove 
AllowAutomaticUpdates="true", AllowAutomaticInserts="true". I have removed all of them.
Yavor
Telerik team
 answered on 18 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?