Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
92 views
I have a page with a RadSplitter that works perfectly in Internet Explorer. However in Firefox, the RadSplitter will not load. If I set the VisibleDuringInit="False" the page won't show the splitter. If I set this property to true, it shows the splitter but its not sized properly and appears as if it is not fully initializing. However If the page does a postback the control fully renders. Any ideas would be very helpful, thanks. I believe it has something to do with my upgrade to 2009 Q3, as it was working well in both browsers prior to my upgrade.

Thanks
Bryan Strader
Top achievements
Rank 2
 answered on 15 Jan 2010
1 answer
167 views

I've got a problem with the Telerik controls not rendering controls.
The error I get is:
Could not load file or assembly 'Telerik.Web.UI, Version=209.3.1208.35, Culture=neutral, PublicKeyToken=121fae78165ba3dy' or one of its dependencies. The system cannot find the file specified.

I've gone through the telerik knowledge base, including the troubleshoot guide, and still have resolved the issue.

I've removed Telerik, restarted computer. I deleted the telerik directory in Program Files. Re-opened visual studio and there's no vestiage of telerik in the system. I close VS and re-run the telerik instalation. I then restart VS and Create A New Website using the 'RadControls CSharp WebSite.' I then open the generated Default.aspx and switch to design view. There are three telerik controls: RadAjaxManager1, RadAjaxManager1 and RadSkinManager1.

The following is the web.config file:

 

<?

 

xml version="1.0"?>

 

<!--

 

 

Note: As an alternative to hand editing this file you can use the

web admin tool to configure settings for your application. Use

the Website->Asp.Net Configuration option in Visual Studio.

A full list of settings and comments can be found in

machine.config.comments usually located in

\Windows\Microsoft.Net\Framework\v2.x\Config

 

 

 

-->

<

 

configuration>

 

<

 

configSections>

 

<

 

sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

 

<

 

sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

 

<

 

section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>

 

<

 

sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

 

<

 

section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />

 

<

 

section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />

 

<

 

section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />

 

<

 

section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />

 

</

 

sectionGroup>

 

</

 

sectionGroup>

 

</

 

sectionGroup>

 

</

 

configSections>

 

<

 

appSettings>

 

<

 

add key="Telerik.Skin" value="Sunset" />

 

<

 

add key="Telerik.ScriptManager.TelerikCdn" value="Disabled" />

 

<

 

add key="Telerik.StyleSheetManager.TelerikCdn" value="Disabled" />

 

</

 

appSettings>

 

<

 

connectionStrings/>

 

<

 

system.web>

 

<!--

 

 

Set compilation debug="true" to insert debugging

symbols into the compiled page. Because this

affects performance, set this value to true only

during development.

 

 

-->

 

<

 

compilation debug="false" >

 

<

 

assemblies>

 

<

 

add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

 

<

 

add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

 

<

 

add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

 

<

 

add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

 

</

 

assemblies>

 

</

 

compilation>

 

<

 

pages>

 

<

 

controls>

 

<

 

add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

 

<

 

add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

 

<

 

add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />

 

</

 

controls>

 

</

 

pages>

 

<!--

 

 

 

The <authentication> section enables configuration

of the security authentication mode used by

ASP.NET to identify an incoming user.

 

 

-->

 

<

 

authentication mode="Windows" />

 

<!--

 

 

 

The <customErrors> section enables configuration

of what to do if/when an unhandled error occurs

during the execution of a request. Specifically,

it enables developers to configure html error pages

to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">

<error statusCode="403" redirect="NoAccess.htm" />

<error statusCode="404" redirect="FileNotFound.htm" />

</customErrors>

 

 

-->

 

<

 

httpHandlers>

 

<

 

remove verb="*" path="*.asmx"/>

 

<

 

add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

 

<

 

add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

 

<

 

add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>

 

<

 

add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />

 

<

 

add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />

 

<

 

add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />

 

<

 

add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" />

 

<

 

add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />

 

</

 

httpHandlers>

 

<

 

httpModules>

 

<

 

add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

 

<

 

add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule"/>

 

<

 

add name="RadCompression" type="Telerik.Web.UI.RadCompression"/>

 

</

 

httpModules>

 

</

 

system.web>

 

<

 

system.codedom>

 

<

 

compilers>

 

<

 

compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

 

<

 

providerOption name="CompilerVersion" value="v3.5"/>

 

<

 

providerOption name="WarnAsError" value="false"/>

 

</

 

compiler>

 

<

 

compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

 

<

 

providerOption name="CompilerVersion" value="v3.5"/>

 

<

 

providerOption name="OptionInfer" value="true"/>

 

<

 

providerOption name="WarnAsError" value="false"/>

 

</

 

compiler>

 

</

 

compilers>

 

</

 

system.codedom>

 

 

<!--

 

 

The system.webServer section is required for running ASP.NET AJAX under Internet

Information Services 7.0. It is not necessary for previous version of IIS.

 

 

-->

 

<

 

system.webServer>

 

<

 

validation validateIntegratedModeConfiguration="false"/>

 

<

 

modules>

 

<

 

remove name="ScriptModule" />

 

<

 

add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

 

<

 

add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" preCondition="integratedMode,runtimeVersionv2.0"/>

 

<

 

add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode,runtimeVersionv2.0"/>

 

</

 

modules>

 

<

 

handlers>

 

<

 

remove name="WebServiceHandlerFactory-Integrated"/>

 

<

 

remove name="ScriptHandlerFactory" />

 

<

 

remove name="ScriptHandlerFactoryAppServices" />

 

<

 

remove name="ScriptResource" />

 

<

 

add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

 

<

 

add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

 

<

 

add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

<

 

add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0" />

 

<

 

add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0" />

 

<

 

add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0" />

 

<

 

add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0" />

 

<

 

add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode,runtimeVersionv2.0" />

 

</

 

handlers>

 

</

 

system.webServer>

 

<

 

runtime>

 

<

 

assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

 

<

 

dependentAssembly>

 

<

 

assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>

 

<

 

bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>

 

</

 

dependentAssembly>

 

<

 

dependentAssembly>

 

<

 

assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>

 

<

 

bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>

 

</

 

dependentAssembly>

 

</

 

assemblyBinding>

 

</

 

runtime>

 

</

 

configuration>

 

Schlurk
Top achievements
Rank 2
 answered on 15 Jan 2010
3 answers
606 views
I am using RadGrid in an ASP.NET AJAX control in VS2008, including it on a page with other controls.

I am binding to an IList which is populated by a business object, using Linq. There is no direct access to the tables, only to the collection. The Update, Insert, and Delete operations are all handled by events, not through Linq directly. The Insert and Delete operations both work as intended. I click the add new record button, enter information, and the grid updates properly, displaying the data after the AJAX call. Delete works also, dropping the row after the AJAX call.  The database is updated, also.

However, with Update, the fields turn to edit boxes, you enter your changes, and those are visible. After Update is called, the fields change back to the original values (before typing the changes). The database is changed to the values that were typed in (new values), but those aren't reflected in the grid. Only after a refresh is the current data displayed.

CodeBehind:
    private void BindWebDataGrid()  
    {  
        TelerikCSGConsultantRadGrid.DataSource = null;  
        csgAgreementEfcoUserXRefs = _csgAgreementEfcoUserXrefBL.GetByCsgAgreementId(Agreement.Id);  
        TelerikCSGConsultantRadGrid.DataSource = csgAgreementEfcoUserXRefs;  
        TelerikCSGConsultantRadGrid.DataBind();  
    }  
  
  
    protected void TelerikCSGConsultantRadGrid_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)  
    {  
        TelerikCSGConsultantRadGrid.DataSource = null;  
        csgAgreementEfcoUserXRefs = _csgAgreementEfcoUserXrefBL.GetByCsgAgreementId(Agreement.Id);  
        TelerikCSGConsultantRadGrid.DataSource = csgAgreementEfcoUserXRefs;  
    }  
  
    protected void TelerikCSGConsultantRadGrid_UpdateCommand(object source, GridCommandEventArgs e)  
    {  
        Efco.Business.Data.CsgAgreementEfcoUserXRef csgAgreementEfcoUserXRef = new CsgAgreementEfcoUserXRef(CurrentUser);  
        GridEditableItem item = e.Item as GridEditableItem;  
        try  
        {  
            csgAgreementEfcoUserXRef.AgreementId = Agreement.Id;  
            csgAgreementEfcoUserXRef.EfcoUserId = Convert.ToInt32((item["EfcoUserId"].Controls[0] as TextBox).Text);  
            csgAgreementEfcoUserXRef.CommissionPercentage = Convert.ToDecimal((item["CommissionPercentage"].Controls[0] as TextBox).Text);  
            csgAgreementEfcoUserXRef.Sequence = Convert.ToInt16((item["Sequence"].Controls[0] as TextBox).Text);  
  
            _csgAgreementEfcoUserXrefBL.Save(csgAgreementEfcoUserXRef);  
        }  
        catch (Exception ex)  
        {  
            TelerikCSGConsultantRadGrid.Controls.Add(new LiteralControl("Unable to update CSG Consultant. Reason: " + ex.Message));  
        }  
    }  
  
    protected void TelerikCSGConsultantRadGrid_InsertCommand(object source, GridCommandEventArgs e)  
    {  
        Efco.Business.Data.CsgAgreementEfcoUserXRef csgAgreementEfcoUserXRef = new CsgAgreementEfcoUserXRef(CurrentUser);  
        GridEditableItem item = e.Item as GridEditableItem;  
        try  
        {  
  
            csgAgreementEfcoUserXRef.AgreementId = Agreement.Id;   
            csgAgreementEfcoUserXRef.EfcoUserId = Convert.ToInt32((item["EfcoUserId"].Controls[0] as TextBox).Text);  
            csgAgreementEfcoUserXRef.CommissionPercentage = Convert.ToDecimal((item["CommissionPercentage"].Controls[0] as TextBox).Text);  
            csgAgreementEfcoUserXRef.Sequence = Convert.ToInt16((item["Sequence"].Controls[0] as TextBox).Text);  
            csgAgreementEfcoUserXRef.RecordCreatedDate = DateTime.Now;  
            csgAgreementEfcoUserXRef.RecordCreatedEfcoUserId = CurrentUser.Id;  
            csgAgreementEfcoUserXRef.RecordUpdateDate = DateTime.Now;  
            csgAgreementEfcoUserXRef.RecordUpdatedEfcoUserId = CurrentUser.Id;  
  
            _csgAgreementEfcoUserXrefBL.Save(csgAgreementEfcoUserXRef);  
        }  
        catch (Exception ex)  
        {  
            TelerikCSGConsultantRadGrid.Controls.Add(new LiteralControl("Unable to insert CSG Consultant. Reason: " + ex.Message));  
        }  
    }  
  
    protected void TelerikCSGConsultantRadGrid_DeleteCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)  
    {  
        Efco.Business.Data.CsgAgreementEfcoUserXRef csgAgreementEfcoUserXRef = new CsgAgreementEfcoUserXRef(CurrentUser);  
        GridDataItem item = e.Item as GridDataItem;  
        try  
        {  
Convert.ToInt32(item.OwnerTableView.DataKeyValues[item.ItemIndex]["EfcoUserId"]);  
  
            csgAgreementEfcoUserXRef = _csgAgreementEfcoUserXrefBL.GetById(Agreement.Id,  
                                                                           Convert.ToInt32(item["EfcoUserId"].Text));  
            _csgAgreementEfcoUserXrefBL.Delete(csgAgreementEfcoUserXRef);  
        }  
        catch (Exception ex)  
        {  
            TelerikCSGConsultantRadGrid.Controls.Add(new LiteralControl("Unable to delete CSG Consultant. Reason: " + ex.Message));  
        }  
    }  

ASP Page:
<Easi:EasiDataPanel ID="TelerikCSGConsultantDataPanel" runat="server">  
    <telerik:RadGrid ID="TelerikCSGConsultantRadGrid" runat="server"   
        AutoGenerateColumns="False" GridLines="None"   
        ondeletecommand="TelerikCSGConsultantRadGrid_DeleteCommand"   
        oninsertcommand="TelerikCSGConsultantRadGrid_InsertCommand"   
        onneeddatasource="TelerikCSGConsultantRadGrid_NeedDataSource"   
        onupdatecommand="TelerikCSGConsultantRadGrid_UpdateCommand"   
        ShowStatusBar="True" >  
        <MasterTableView CommandItemDisplay="Top" EditMode="InPlace" >  
            <RowIndicatorColumn>  
                <HeaderStyle Width="20px" />  
            </RowIndicatorColumn>  
            <ExpandCollapseColumn>  
                <HeaderStyle Width="20px" />  
            </ExpandCollapseColumn>  
            <Columns>  
                <telerik:GridBoundColumn DataField="AgreementId" HeaderText="Agreement ID" DefaultInsertValue="" UniqueName="AgreementNumber"   
                    Visible="False">  
                </telerik:GridBoundColumn>  
                <telerik:GridBoundColumn DataField="EfcoUserId" HeaderText="Efco User ID" DefaultInsertValue="" UniqueName="EfcoUserId">  
                </telerik:GridBoundColumn>  
                <telerik:GridBoundColumn DataField="CommissionPercentage" HeaderText="Commission Percentage" DefaultInsertValue=""   
                    UniqueName="CommissionPercentage">  
                </telerik:GridBoundColumn>  
                <telerik:GridBoundColumn DataField="Sequence" HeaderText="Sequence" DefaultInsertValue="" UniqueName="Sequence">  
                </telerik:GridBoundColumn>  
                <telerik:GridButtonColumn CommandName="Select" Text="Select"   
                    UniqueName="column1">  
                </telerik:GridButtonColumn>  
                <telerik:GridEditCommandColumn>  
                </telerik:GridEditCommandColumn>  
                <telerik:GridButtonColumn CommandName="Delete" Text="Delete"   
                    UniqueName="column">  
                </telerik:GridButtonColumn>  
            </Columns>  
            <EditFormSettings>  
                <EditColumn UniqueName="EditCommandColumn1">  
                </EditColumn>  
            </EditFormSettings>  
        </MasterTableView>  
    </telerik:RadGrid>  
</Easi:EasiDataPanel>  
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"   
    EnablePageHeadUpdate="False">  
    <AjaxSettings>  
        <telerik:AjaxSetting AjaxControlID="TelerikCSGConsultantRadGrid">  
            <UpdatedControls>  
                <telerik:AjaxUpdatedControl ControlID="TelerikCSGConsultantRadGrid" LoadingPanelID="TelerikCSGConsultantDataPanel" />  
            </UpdatedControls>  
        </telerik:AjaxSetting>  
    </AjaxSettings>  
</telerik:RadAjaxManager>  







Jay Anderson
Top achievements
Rank 1
 answered on 15 Jan 2010
9 answers
1.7K+ views
This code is loosely based on several of the demos. The main issue I'm having right now is that when I save data through my external form and call e.Item.OwnerTableView.Rebind() the RadGrid does not get updated. The only way to get the RadGrid to update is by paging or clicking the "Refresh" button.

I'm calling e.Item.OwnerTableView.Rebind() and e.Item.Selected = true within the RadGrid_ItemCommand method.

I have paste all code below incase I'm doing something stupid that's screwing everything up. I'm guessing it's a timing issue.

Thanks for any help.

ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="XmlHttpPanel3.aspx.cs" Inherits="XmlHttpPanel3" %> 
 
<!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></title
    <telerik:radcodeblock id="RadCodeBlock" runat="server"
        <script type="text/javascript"
            //<![CDATA[
            function radGrid_RowSelected(sender, args) {
                var key = args.getDataKeyValue("ContentId");
                var panel = $find("<%=RadXmlHttpPanel.ClientID %>");
                panel.set_value(key);
            }
            //]]> 
        </script> 
    </telerik:radcodeblock> 
</head> 
<body> 
    <form id="form1" runat="server"
        <div> 
            <asp:scriptmanager id="ScriptManager" runat="server" /> 
            <telerik:radcombobox id="RadComboBox" runat="server" skin="Telerik" datasourceid="ContentGroupDataSource" datatextfield="ContentGroupName" datavaluefield="ContentGroupId" autopostback="true" appenddatabounditems="true" onselectedindexchanged="RadComboBox_SelectedIndexChanged"
                <items> 
                    <telerik:radcomboboxitem text="All" value="0" selected="true" /> 
                </items> 
            </telerik:radcombobox> 
            <br /> 
            <style type="text/css"
                .RadGrid_Telerik .rgFilterRow td { 
                    padding-top: 8px; 
                } 
            </style> 
            <telerik:radgrid id="RadGrid" runat="server" skin="Telerik" width="250" allowpaging="true" allowfilteringbycolumn="true" autogeneratecolumns="false" oninit="RadGrid_Init" onneeddatasource="RadGrid_NeedDataSource" onitemcommand="RadGrid_ItemCommand"
                <mastertableview commanditemdisplay="Top" editmode="EditForms" datakeynames="ContentId" clientdatakeynames="ContentId"
                    <columns> 
                        <telerik:gridboundcolumn uniquename="ContentName" datafield="ContentName" headertext="Name" filtercontrolwidth="200px" currentfilterfunction="Contains" autopostbackonfilter="true"></telerik:gridboundcolumn> 
                    </columns> 
                    <commanditemsettings addnewrecordtext="Add new content" /> 
                    <editformsettings editformtype="Template"
                        <formtemplate> 
                            <div style="background:#9DDF6C;padding-top:5px;"
                                <table width="100%"
                                    <tr> 
                                        <td> 
                                            Name: 
                                        </td> 
                                        <td style="padding-left:2px;"
                                            <asp:textbox id="ContentName" runat="server" width="187px"></asp:textbox> 
                                        </td> 
                                    </tr> 
                                    <tr> 
                                        <td colspan="2" align="right" style="padding-right:10px;"
                                            <asp:linkbutton id="Insert" runat="server" commandname="PerformInsert" text="Insert"></asp:linkbutton> 
                                            &nbsp; 
                                            <asp:linkbutton id="Cancel" runat="server" commandname="Cancel" text="Cancel" causesvalidation="false" onclientclick="<%Eval(this.ClientFireCommandFunction(Telerik.Web.UI.RadGrid.CancelCommandName, String.Empty)) %>"></asp:linkbutton> 
                                        </td> 
                                    </tr> 
                                </table> 
                            </div> 
                        </formtemplate> 
                    </editformsettings> 
                </mastertableview> 
                <clientsettings enablerowhoverstyle="true"
                    <selecting allowrowselect="true" /> 
                    <clientevents onrowselected="radGrid_RowSelected" /> 
                </clientsettings> 
                <groupingsettings casesensitive="false" /> 
                <pagerstyle mode="NumericPages" showpagertext="false" pagebuttoncount="5" /> 
            </telerik:radgrid> 
             
            <telerik:radxmlhttppanel id="RadXmlHttpPanel" runat="server" skin="Telerik" onservicerequest="RadXmlHttpPanel_ServiceRequest" loadingpanelid="RadAjaxLoadingPanel" enableclientscriptevaluation="true"
                <asp:multiview id="MultiView" runat="server"
                    <asp:view id="SelectView" runat="server"
                        Select Content                     
                    </asp:view> 
                    <asp:view id="EditView" runat="server"
                        <asp:label id="ContentId" runat="server"></asp:label> 
                        <br /> 
                        <asp:textbox id="ContentName" runat="server"></asp:textbox> 
                        <br /> 
                        <telerik:radcombobox id="ContentGroup" runat="server" skin="Telerik" datatextfield="ContentGroupName" datavaluefield="ContentGroupId"></telerik:radcombobox> 
                        <br /> 
                        <asp:linkbutton id="SaveContent" runat="server" text="Save" onclick="SaveContent_Click"></asp:linkbutton> 
                    </asp:view> 
                </asp:multiview>                 
            </telerik:radxmlhttppanel> 
             
            <telerik:radajaxmanager id="RadAjaxManager" runat="server"
                <ajaxsettings> 
                    <telerik:ajaxsetting ajaxcontrolid="RadComboBox"
                        <updatedcontrols> 
                            <telerik:ajaxupdatedcontrol controlid="RadComboBox" /> 
                            <telerik:ajaxupdatedcontrol controlid="RadGrid" loadingpanelid="RadAjaxLoadingPanel" /> 
                            <telerik:ajaxupdatedcontrol controlid="RadXmlHttpPanel" /> 
                        </updatedcontrols> 
                    </telerik:ajaxsetting> 
                    <telerik:ajaxsetting ajaxcontrolid="RadGrid"
                        <updatedcontrols> 
                            <telerik:ajaxupdatedcontrol controlid="RadComboBox" /> 
                            <telerik:ajaxupdatedcontrol controlid="RadGrid" loadingpanelid="RadAjaxLoadingPanel" /> 
                            <telerik:ajaxupdatedcontrol controlid="RadXmlHttpPanel" />                             
                        </updatedcontrols> 
                    </telerik:ajaxsetting> 
                </ajaxsettings> 
            </telerik:radajaxmanager> 
            <telerik:radajaxloadingpanel id="RadAjaxLoadingPanel" runat="server"></telerik:radajaxloadingpanel> 
            <asp:objectdatasource id="ContentGroupDataSource" runat="server" typename="Abc.WD.InternationalStore.DataAccess.DataTableAdapters.ContentGroupInfoTableAdapter" selectmethod="GetDataByStoreId"
                <selectparameters> 
                    <asp:parameter type="String" name="StoreId" defaultvalue="49D4B1F4-236B-DE11-870E-001A6465230E" /> 
                    <asp:parameter type="Int32" name="CultureId" defaultvalue="1033" /> 
                </selectparameters> 
            </asp:objectdatasource> 
        </div> 
    </form> 
</body> 
</html> 
 


CS
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Web; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using Abc.WD.InternationalStore.DataAccess.DataTableAdapters; 
using Abc.WD.InternationalStore.DataAccess; 
using Telerik.Web.UI; 
 
public partial class XmlHttpPanel3 : System.Web.UI.Page 
    protected void Page_Load(Object sender, EventArgs e) 
    {         
    } 
 
    protected void SaveContent_Click(Object sender, EventArgs e) 
    { 
        (RadGrid.Items[0] as GridDataItem).FireCommandEvent(RadGrid.UpdateCommandName, String.Empty); 
    } 
 
    protected void RadGrid_Init(Object sender, EventArgs e) 
    { 
        GridFilterMenu menu = RadGrid.FilterMenu; 
        Int32 i = 0; 
        while (i < menu.Items.Count) 
        { 
            if (menu.Items[i].Text == "NoFilter" || menu.Items[i].Text == "Contains"
            { 
                i++; 
            } 
            else 
            { 
                menu.Items.RemoveAt(i); 
            } 
        } 
    } 
 
    protected void RadGrid_ItemCreated(Object sender, GridItemEventArgs e) 
    { 
        if(e.Item is GridEditableItem && e.Item.IsInEditMode) 
        { 
            GridEditableItem item = e.Item as GridEditableItem; 
             
            LinkButton insert = item.FindControl("Insert"as LinkButton; 
            insert.OnClientClick = String.Format("if(!$find('{0}').fireCommand('PerformInsert', '')) return false;", e.Item.OwnerID); 
 
            LinkButton cancel = item.FindControl("Cancel"as LinkButton; 
            cancel.OnClientClick = String.Format("if(!$find('{0}').fireCommand('CancelInsert','')) return false;", e.Item.OwnerID); 
        } 
    } 
 
    protected void RadGrid_ItemCommand(Object source, Telerik.Web.UI.GridCommandEventArgs e) 
    { 
        switch (e.CommandName) 
        { 
            case RadGrid.PageCommandName: 
                { 
                    MultiView.ActiveViewIndex = 0; 
                } 
                break
            case RadGrid.InitInsertCommandName: 
                { 
                    RadComboBox.Text = "All"
                    RadComboBox.Items[0].Selected = true
                    RadComboBox.Enabled = false
 
                    RadGrid.MasterTableView.FilterExpression = String.Empty; 
                     
                    foreach (GridColumn column in RadGrid.Columns) 
                    { 
                        column.CurrentFilterFunction = GridKnownFunction.Contains; 
                        column.CurrentFilterValue = String.Empty; 
                    } 
 
                    RadXmlHttpPanel.Value = String.Empty; 
                } 
                break
            case RadGrid.PerformInsertCommandName: 
                { 
                    GridEditFormInsertItem item = e.Item as GridEditFormInsertItem; 
 
                    String contentName = ((TextBox)item.FindControl("ContentName")).Text; 
                    //String contentGroupId = ((RadComboBox)item.FindControl("ContentGroup")).SelectedValue; 
                    String contentGroupId = RadComboBox.FindItemByText("General").Value; 
 
                    ContentInfoTableAdapter adpater = new ContentInfoTableAdapter(); 
                    adpater.GetDataByInsert("49D4B1F4-236B-DE11-870E-001A6465230E", contentGroupId, contentName, String.Empty, 1033); 
 
                    RadComboBox.Enabled = true
 
                    RadGrid.AllowFilteringByColumn = true
 
                    if (RadGrid.Items.Count == RadGrid.PageSize) 
                    { 
                        RadGrid.CurrentPageIndex++; 
                    } 
                } 
                break
            case RadGrid.CancelCommandName: 
                { 
                    RadComboBox.Enabled = true
                    RadGrid.CurrentPageIndex = 0; 
                    RadGrid.AllowFilteringByColumn = true
                } 
                break
            case RadGrid.UpdateCommandName: 
                { 
                    String contentId = (RadGrid.SelectedItems[0] as GridDataItem).GetDataKeyValue("ContentId").ToString(); 
 
                    ContentInfoTableAdapter adapter = new ContentInfoTableAdapter(); 
                    Data.ContentInfoDataTable table = adapter.GetDataByUpdate(contentId, ContentName.Text, String.Empty, 1033, ContentGroup.SelectedValue); 
                    Data.ContentInfoRow content = table[0]; 
 
                    SetEditView(content); 
 
                    MultiView.ActiveViewIndex = 1; 
 
                    e.Item.OwnerTableView.Rebind(); 
                    e.Item.Selected = true
                } 
                break
        } 
    } 
 
    protected void RadComboBox_SelectedIndexChanged(Object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e) 
    { 
        MultiView.ActiveViewIndex = 0; 
        RadGrid.CurrentPageIndex = 0; 
        RadGrid.Rebind(); 
    } 
 
    protected void RadGrid_NeedDataSource(Object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) 
    { 
        ContentInfoTableAdapter adapter = new ContentInfoTableAdapter(); 
         
        if (RadComboBox.SelectedIndex == 0) 
        { 
            RadGrid.DataSource = adapter.GetDataByStoreId("49D4B1F4-236B-DE11-870E-001A6465230E", 1033); 
        } 
        else 
        { 
            RadGrid.DataSource = adapter.GetDataByContentGroupId(RadComboBox.SelectedValue, 1033); 
        } 
         
    } 
 
    protected void RadXmlHttpPanel_ServiceRequest(Object sender, RadXmlHttpPanelEventArgs e) 
    { 
        ContentInfoTableAdapter adapter = new ContentInfoTableAdapter(); 
        Data.ContentInfoDataTable table = adapter.GetDataByContentId(e.Value, 1033); 
        Data.ContentInfoRow content = table[0]; 
 
        SetEditView(content); 
        MultiView.ActiveViewIndex = 1; 
    } 
 
    void SetEditView(Data.ContentInfoRow content) 
    { 
        ContentId.Text = content.ContentId.ToString(); 
        ContentName.Text = content.ContentName; 
 
        ContentGroup.DataSource = ContentGroupDataSource; 
        ContentGroup.DataBind(); 
 
        RadComboBoxItem selectedContentGroup = ContentGroup.FindItemByValue(content.ContentGroupId.ToString()); 
        selectedContentGroup.Selected = true
        ContentGroup.Text = selectedContentGroup.Text; 
    } 
 

Jay Anderson
Top achievements
Rank 1
 answered on 15 Jan 2010
1 answer
229 views
So I've just spent the last few hours trying to read posts and documentation, but I'm a bit lost. Here is my scenario:

- Materpage is setup with empty RadAjaxManager
- it contains a usercontrol (we will just call it uc1) which contains another usercontrol (uc2) which i want to update
- there is a content placeholder, which  at this time would contain an ascx
- in this ascx I have a radtextbox which allows updating of an items name
- this update occurs via ajax to this same ascx (using radajaxmanagerproxy)
- I need this update to then force my uc2 to update via ajax

So my question is pretty broad... where do i even start? I can only assume I somehow have to in my ascx page add a ajaxsetting programatically which is attached to that embedded uc2? But maybe it's easier that that? or harder?

On these same lines, what if within that ascx the rename was done through another usercontrol... would the process be the same to force the uc2 to update?

thanks.

Pavlina
Telerik team
 answered on 15 Jan 2010
1 answer
130 views
Hello,

I have a requirement to allow users to enter HTMl tags in a field.

Right now if I try to add a row which has a field edited with HTML tags the grid gives me an error.
I am using I am using GridTemplateRows.

How can I implement this requirement?
Daniel
Telerik team
 answered on 15 Jan 2010
1 answer
118 views
Hi,

Please see attachment.

As you can see the datatable column header text got cut off, how to increase the datatable column width to make more space for the text?

Regards,
Matt
Schlurk
Top achievements
Rank 2
 answered on 15 Jan 2010
1 answer
255 views

When I am in the rad editor I hit enter to place a line space between a table and an image.
When I postback to the server the
Me.RadEditor.Content
removes the <BR> tag.

Here is what I start off with:

<TABLE>
<TR><TD>&nbsp;</TD></TR></TABLE>
<P align=center><BR><IMG style="WIDTH: 393px; HEIGHT: 236px" src="http://www.domain.com/client_images/11/8ball.gif" width=381 height=279></P>

 

 

 

Here is what I end up with when i post back.

<TABLE>
<TR><TD>&nbsp;</TD></TR></TABLE>
<P align=center><IMG style="WIDTH: 393px; HEIGHT: 236px" src="http://www.domain.com/client_images/11/8ball.gif" width=381 height=279></P>

The rad editor also removes this tage when i switch from source view to design view.

Please advise.

Trevor

Rumen
Telerik team
 answered on 15 Jan 2010
1 answer
110 views
Hay all,

I want to disable post back when item Dropped.

I Call a Wcf Service from the client that manipulate data on the server to get better performance in the OnDropped event.

when I set the cancel property to true , OnDropped event not fires and I Cant use my logic to handle the situation.

thanks,

Nadav
 

Radoslav
Telerik team
 answered on 15 Jan 2010
4 answers
264 views
Hi,

I am using the ASP.NET AJAX Spell checker with the Rad Textbox,
Scenario :
User types some text in the RAD textbox and click the spell control for spell checking, spell cheker is invoked and suitable suggestions are shown to the user, users select the best suggestion for the misspelt word. Spell checker shows the message "Spelling checking complete". Till here all is well, but the suggested word is not reflected in the source RAD textbox. The trick here is once you click the textbox, it will now show the suggested word in textbox.

The problem seems with this pair (Spell + RAD textbox) only, if we use the normal ASP.NET textbox, it work fine.

Please advice me the solution in this case. Any further info please revert.

Thanks,
Sushil Jinder
Rumen
Telerik team
 answered on 15 Jan 2010
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?