Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
144 views
Hello,

Using any skin, the tabstrip loads with the first tab appearing as the currently selected tab.  The status remains even if another tab has been selected.  Also, the selection hand does not appear for the first tab, the tab that is in the selected state.  Also, the first tab appears selected despite the SelectedIndex being set to a value greater than 0.  How is this resolved?  What client-side code might reset the state based on the selection event?

Any help/guidance would be greatly appreciated.

Thank you.

Doug
Kevin
Top achievements
Rank 1
 answered on 03 Jun 2008
2 answers
310 views

I have used the example in MultiColumn Combo  to make the RADComboBox work with LINQ. I cannot extend the example to show the records in a related table which is used as a lookup.

Have two tables:
    Parent [table1] - List of records  [parentfield1 and parentfield2] parentfield2 links to childfield1 in table2
    Child  [table2] - List of related records by parentfield2 to childfield1 [want to show these records in the ComboBox...childfield1 and childfield2]

What is described below does work in a fashion. It only lists the key field in table 1 (parentfield1).

Code is as follows:

Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%
@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" 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 runat="server"><title>Untitled Page</title></head>

<

body>

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

<div>

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

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" height="200px" width="784px">

<telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticUpdates="True" AllowPaging="True" AllowSorting="True" AutoGenerateEditColumn="True" DataMember="DefaultView" DataSourceID="LinqDataSource1" GridLines="None" Skin="Mac">

<ExportSettings><Pdf FontType="Subset" PaperSize="Letter" /><Excel Format="Html" /><Csv ColumnDelimiter="Comma" RowDelimiter="NewLine" /></ExportSettings>

<MasterTableView AutoGenerateColumns="False" CommandItemDisplay="None" CurrentResetPageIndexAction="SetPageIndexToFirst" DataMember="DefaultView" DataSourceID="LinqDataSource1" Dir="LTR" Frame="Border" TableLayout="Auto" DataKeyNames="ParentField1"> 

<RowIndicatorColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" Visible="False"> <HeaderStyle Width="20px" /> </RowIndicatorColumn>

 <ExpandCollapseColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" Resizable="False" Visible="False"> <HeaderStyle Width="20px" /></ExpandCollapseColumn> 

<Columns>
<telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="ParentField1" DataType="System.Int32" FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="ParentField1" ReadOnly="True" SortExpression="ParentField1" UniqueName="ParentField1"> </telerik:GridBoundColumn>

<telerik:GridTemplateColumn CurrentFilterFunction="NoFilter" DataField="ParentField2" FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="ParentField2" SortExpression="ParentField2" UniqueName="ParentField2"> 

<EditItemTemplate> <telerik:RadComboBox ID="RadComboBox1" Runat="server" DataSourceID="LinqDataSource1" Height="100px" RadComboBoxImagePosition="Right" SelectedValue='<%# Bind("ParentField2") %>' Skin="Mac" Width="208px" EnableLoadOnDemand="true" DataTextField="ParentField2" DataValueField="ParentField2"  OnItemsRequested="RadComboBox1_ItemsRequested">
<CollapseAnimation Duration="200" Type="OutQuint" />
<ExpandAnimation Type="OutQuart" />
</telerik:RadComboBox>

</EditItemTemplate>

<ItemTemplate>  <asp:Label runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.ParentField2") %>'>  </asp:Label>  </ItemTemplate>

 </telerik:GridTemplateColumn>  

 </Columns>

 <EditFormSettings>

 <EditColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType">

 </EditColumn>

 </EditFormSettings>

 </MasterTableView>

 </telerik:RadGrid>

 <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server" height="75px" width="75px"> <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border:0px;" /> </telerik:RadAjaxLoadingPanel>

<asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="DataClassesDataContext" EnableUpdate="True"  TableName="Table1"> </asp:LinqDataSource>

 </telerik:RadAjaxPanel>

  </div>

 </form>

</

body>

</

html>

Default.aspx.cs

using

System; using System.Configuration; using System.Data; using System.Linq; using  system.Web; using System.Web.Security; using System.Web.UI; using  system.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using System.IO; using Telerik.Web.UI; using System.Collections;

public

partial class _Default : System.Web.UI.Page {

protected void Page_Load(object sender, EventArgs e) { }

protected void RadComboBox1_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)

{

DataClassesDataContext db = new DataClassesDataContext();

var initstatus = from s in db.table2

group s by s.childfield1 into x

select new { field1 = x.Key, field2 = x };

RadComboBox combobox = (RadComboBox)sender;

combobox.Items.Clear();

foreach(var table2 in initstatus)

{

RadComboBoxItem item = new RadComboBoxItem();

combobox.Items.Add(item);

} } }

oVan
Top achievements
Rank 2
 answered on 03 Jun 2008
4 answers
100 views
Hi all,

I have web site to be localize (English and Arabic)
in radcombobox i add this property dir=rtl
and it work switching between ltr and rtl
but the drop down list can not switch from ltr to rtl in all skins except Default skin

in other words
rtl work for Default skin  only
Mohamed
Top achievements
Rank 1
 answered on 03 Jun 2008
1 answer
403 views
Hello,

I was wondering if someone could attach an example of how I can change the icon of a radalert object. I have looked at the WIndow_DynamicTemplate example project, but for the life of me, I can't even get it to run.

I am using the method to call my radalert from within an AJAX.NET update panel if that helps anyone.
I am also calling radalert from my code-behind as such:
Dim scriptstring As String = "radalert('<b>" + Message + "</b>!', 200, 210, '" + messageType.ToString + "');" 
ScriptManager.RegisterStartupScript(Me, Me.[GetType](), "radalert", scriptstring, True) 

And the error messages I get when trying to run the sample project are as follows:
Error 2 Could not load type 'RadWindow1.Window_DynamicTemplate._Default'. C:\Documents and Settings\walkem\Desktop\057032_Window_DynamicTemplate\Window_DynamicTemplate\Default.aspx 2 

Error 3 Could not load type 'RadWindow1.Window_DynamicTemplate.AlertTemplate1'. C:\Documents and Settings\walkem\Desktop\057032_Window_DynamicTemplate\Window_DynamicTemplate\AlertTemplate.ascx 1 

And 1 warning:
Warning 4 Attribute 'Codebehind' in the @ Page directive is no longer supported. Convert this page to the new code-behind model by opening the Web site (project) containing the page in Visual Web Developer. C:\Documents and Settings\walkem\Desktop\057032_Window_DynamicTemplate\Window_DynamicTemplate\Default.aspx 2 24 C:\...\Window_DynamicTemplate\
Georgi Tunev
Telerik team
 answered on 03 Jun 2008
1 answer
75 views
I've got a Textbox within a Radtoolbar for a search functon... almost exactly the same as this example here:

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Toolbar/Examples/Functionality/FirstLook/DefaultVB.aspx

Now, if you type in say:

'ggoogle', then decide you have one too many 'g's there.... just press the left arrow and watch what happens....!!

Atanas Korchev
Telerik team
 answered on 03 Jun 2008
1 answer
147 views
How can I disable resize editor from client, in order to user cannot resize editor?
Rumen
Telerik team
 answered on 03 Jun 2008
4 answers
145 views
Strong reprodusing of crash during submiting data
If I removing RadAjaxManager - everything goes ok. when it using  - application crashing.

RadControls for ASPNET AJAX Q1 2008


           <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="rgEditGrid">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="rgEditGrid" />
                            <telerik:AjaxUpdatedControl ControlID="phError" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>

<

telerik:RadGrid ID="rgEditGrid" ........ </telerik:RadGrid>

<

asp:PlaceHolder ID="phError" runat="server"></asp:PlaceHolder>


Error description:
 

Server Error in '/' Application.

Value cannot be null.
Parameter name: key

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: key

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentNullException: Value cannot be null.
Parameter name: key]
   System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) +41
   System.Collections.Generic.Dictionary`2.FindEntry(TKey key) +2667593
   System.Collections.Generic.Dictionary`2.ContainsKey(TKey key) +4
   Telerik.Web.UI.RadAjaxControl.CreateUpdatePanel(Control initiator, String eventName, Control updated) +582
   Telerik.Web.UI.RadAjaxControl.OnPagePreRender(Object sender, EventArgs e) +1478
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Control.OnPreRender(EventArgs e) +2117788
   System.Web.UI.Control.PreRenderRecursiveInternal() +86
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

Sergey
Top achievements
Rank 1
 answered on 03 Jun 2008
2 answers
322 views

Hi everyone,

I have a problem with ServerSideCallback. I want to modify some properties of the node which fired the NodeExpand event in the same one.

        protected void RadTreeView1_NodeExpand(object sender, RadTreeNodeEventArgs e)  
        {  
            IList<EntityTypeDataContract> list = GetList(e);  
 
            if (list.Count > 0)  
            {  
                foreach (EntityTypeDataContract type in list)  
                {  
                    RadTreeNode treeNode = new RadTreeNode(type.DisplayName, type.Value);  
                    treeNode.Expanded = false;  
                    treeNode.ExpandMode = TreeNodeExpandMode.ServerSideCallBack;  
                    e.Node.Nodes.Add(treeNode);  
                }  
            }  
            else  
            {                  
                e.Node.Expanded = false;  
                e.Node.ExpandMode = TreeNodeExpandMode.ClientSide;  
            }  
        } 

The problem is until there will be a postback on the page, the state of the triggering node is not change (Expanded = true and ExpandMode = ServerSideCallback). It seems there is no refresh of the already created node during the callback ?

This sample of code works well with ServerSide expand mode but I really need the ServerSideCallBack mode.

Thanks for helping me to solve this problem.

Regards,
Sebastien
VANDENBERGHE
Top achievements
Rank 1
 answered on 03 Jun 2008
1 answer
120 views
When i preview the code in the editor i can see that the code is XHTML compliant eg: <br /> However when i look in SQL Server the code is as it used to be preinstallation of the editor, non-XHTML compliant eg: <br>.

Has anyone experienced this or have any ideas as to how i can ensure that the code i see in the editor is stored what will be written to the Sharepoint database. Are there any settings i may need to set up.

Setup : MOSS 2007, SQL Server, editing on an Announcement List
George
Telerik team
 answered on 03 Jun 2008
1 answer
62 views
When i preview the code in the editor i can see that the code is XHTML compliant eg: <br /> However when i look in SQL Server the code is as it used to be preinstallation of the editor, non-XHTML compliant eg: <br>.

Has anyone experienced this or have any ideas as to how i can ensure that the code i see in the editor is stored what will be written to the Sharepoint database. Are there any settings i may need to set up.

Setup : MOSS 2007, SQL Server, editing on an Announcement List
George
Telerik team
 answered on 03 Jun 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?