Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
136 views
Need som help.
I am using Telerik RAD Controls Q2 2007 in our AJAX enabled web application. In one of the user controls I am using the a RadToolbar, which contains some  RadToolbarTemplateButtons. These RadToolbarTemplateButtons wrapping around other web controls (asp:DropDownList, rad:RadDatePicker), but these web controls are not accessible from code behind. As I found out none of the web controls inside the RadToolbarTemplateButton are added to the designer.cs files in Visual Studio. The layout in teh markup looks as below:
<radTlb:RadToolbarTemplateButton ID="RadToolbarTemplateButton3" runat="server"> 
            <ButtonTemplate> 
                <radCln:RadDatePicker ID="dpDatePicker" runat="server" Width="105px" DateInput-ReadOnly="true" 
                    DateInput-Skin="None" Calendar-Skin="Web20" 
                    Calendar-SkinsPath="/" DateInput-SkinsPath="/"> 
                    <ClientEvents OnDateSelected="BroadcastDateChange" /> 
                </radCln:RadDatePicker> 
            </ButtonTemplate> 
        </radTlb:RadToolbarTemplateButton> 

As you can see all the necessary attributes are present (IDs and such), but none of the content in RadToolbarTemplateButton3 is present in the designer.cs file, thus making it impossible to use the user control and acess the RadToolbarTemplateButton  content.
I already reinstalled VS 2005 and added all the controls to the user controls page from scratch.
If I try to add any controls outside of the rad:RadToolbar they are fine and auto generated in designer.cs correctly. Frankly this is very very annoying as I am not able to use the user control.
thanks for any suggestion and help.
Benjamin
Top achievements
Rank 1
 answered on 27 Oct 2009
2 answers
253 views

Hello,

I have recently migrated our website to ASP.Net 3.5 with RadControls for ASP.Net AJAX Q1 2008 (the last release we had access to).  Our site also is integrated to Community Server.

In one portion of the site, there is an error in the interaction of the two packages, resulting in the error "Script controls may not be registered before PreRender".  The full trace follows at the end of this post.  The problem occurs when a radMenu is placed in a template as part of the community server skinning/templating system.

The reproduction shows that the error does not occur when the menu is used outside of the template, and also does not occur when a ScriptManager element is used in the template without a menu.  The error occurs when the menu is used within the template.

I have isolated the required Community Server components needed to reproduce the problem, and have created a small project that demonstrates the issue.  Please let me know where I can send the zip file of the solution.

Thank you,

Lisa Hakesley

------------------------

Script controls may not be registered before PreRender.
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.InvalidOperationException: Script controls may not be registered before PreRender.

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:

[InvalidOperationException: Script controls may not be registered before PreRender.]
   System.Web.UI.ScriptControlManager.RegisterScriptControl(TScriptControl scriptControl) +347825
   System.Web.UI.ScriptManager.RegisterScriptControl(TScriptControl scriptControl) +66
   Telerik.Web.UI.RadDataBoundControl.RegisterScriptControl() +29
   Telerik.Web.UI.RadDataBoundControl.OnPreRender(EventArgs e) +22
   System.Web.UI.Control.PreRenderRecursiveInternal() +80
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

 

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

 

 

Dharmendra Baghel
Top achievements
Rank 1
 answered on 27 Oct 2009
3 answers
86 views
I am handling appointment updates server-side with OnAppointmentUpdate.

I have run into a situation where I need to programatically handle the update differently whether the user drag and moved/extended the appointment vs updating it from the advanced form. Is there a mechnism in the control to tell where the update was initiated, possibly keying off of the button, etc...?

Thanks,

Jim
James Legan
Top achievements
Rank 1
 answered on 27 Oct 2009
1 answer
113 views
Hi,

I'm not sure why but I just don't seem to be getting grouping by Resource.

I want to have a Scheduler show Staff down the left hand side, time horizontally, and based on the examples this looks like grouping by Staff, but all the examples seem to use either a direct connection or session datasources.

I am populating my Scheduler by assigning a datasource in code (RadScheduler1.datasource = myDataSource) and all OK.

Do you have any help or examples that might show me how to do the same with my Resources as well, and then how to Group these, all within code rather than declaratively?

David Penny
Peter
Telerik team
 answered on 27 Oct 2009
5 answers
265 views


                I have an problem in Binding Image in the GridBinaryImageColumn . The image comes in form of byte[] fromWebservices then serialize the data and same data deserilaize in the Javascriptnad bind to grid . The normal Bound column is working fine Let me show you howits work

<head id="Head1" runat="server">

  

   <telerik:RadCodeBlock ID="RadCodeBlock1"runat="server">

       <script type="text/javascript">

          

           function pageLoad(sender, args) {

          

WebService.JsonRecord(updateGrid);

           }

          

           function updateGrid(result) {

               //alert(result);

               var test =Sys.Serialization.JavaScriptSerializer.deserialize(result);

               var gridObject=$find("<%=RadGrid1.ClientID %>");

               var tableView = gridObject.get_masterTableView();

tableView.set_dataSource(test);

tableView.dataBind();

             

           }

           function OnRowDataBound(sender, args) {

              

               //alert(args.get_item().get_cell("txtModel"));

               varspanControl = args.get_item().get_cell("test").getElementsByTagName('img ')[0];

              

           }

          

       </script>

   </telerik:RadCodeBlock>

</head>

<body >

   <form runat="server"id="mainForm"method="post"style="width:100%;">

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

           <Services>

               <asp:ServiceReference  Path="~/WebService.asmx" />

           </Services>

       </asp:ScriptManager>

      

       <telerik:RadGrid ID="RadGrid1"AutoGenerateColumns="false"runat="server"AllowPaging="true"PageSize="10">

           <MasterTableView>

               <Columns>

               

                    <telerik:GridBoundColumn   HeaderText="Model" DataField="txtModel">

                    </telerik:GridBoundColumn>  

                   

<telerik:GridBinaryImageColumnHeaderText="Images"DataField="binPicture"UniqueName ="test" ></telerik:GridBinaryImageColumn>

               

                    <telerik:GridBoundColumn   HeaderText="OEMPartNumber" DataField="txtOEMPartNumber">

                    </telerik:GridBoundColumn> 

                   

                

               </Columns>

           </MasterTableView>

           <ClientSettings>

               <ClientEvents OnCommand="function(){}"  />

            </ClientSettings>

       </telerik:RadGrid>

     

   </form>

  

</body>

This isa HTML and let me show you how its come from we services

  public objectJsonRecord()

    {

        JavaScriptSerializer javaSerializer = new JavaScriptSerializer();

       

        //List<string[]> lstEquipment = select();

        //List<string[]> lstEquipment = Test();

       

        List<Test>lstTest = foo();

       

        return javaSerializer.Serialize(lstTest);

   

    }

    [WebMethod]

    [ScriptMethod]

    public List<Test> foo()

    {

        List<Test>lstTest = new List<Test>();

        Test objTest = newTest();

lstTest=objTest.GetItems();

        return lstTest;

    }

Everytime I do thisits show the Error

“DataBinding: 'System.Data.DataRowView' does not containa property with the name 'binPicture'.”

Please any one Help me regarding this

Nikolay Rusev
Telerik team
 answered on 27 Oct 2009
3 answers
351 views
Hi,

I have made a custom skin by editing an existing skin. It all works fine except that I'm not able to register the custom skin through web.config. For now I have programmatically registered the proper css file for each control.

I'm sure the problem is that I don't give the proper value for the 'value' property of <appSettings> <add key="Telerik.Skin" value="..."/>, but I can't figure out what the proper value would be.
The path to the skin from the web application's root folder is 'Layout/Skins/MySkin'. In this folder all the css files like 'Grid.MySkin.css' reside and all the subfolders like 'Grid'. The structure of the folders and the files is correct because if I register the css file programatically for the RadGrid it works fine.

Can someone please tell me what I should use as value for the 'value' property in web.config to get things working without having to register the css file for each control I use?
It is probably very simple but it's very annoying I can't figure it out.

Regards,

Mink

Dimo
Telerik team
 answered on 27 Oct 2009
1 answer
249 views
Hello,

I have a RadDatePicker inside an html cell table, and I would like it to have a left alignment ir order to have aligned with some RadComboBox that are below. Please check the attached image, it is a screenshot of the website we are developing.

I have read another threads with possible solutions for similar issues, but I just could not make them work.

I will post the part of the code that is generating the first RadDatePicker:

<td class="style3"> 
 
Fecha Desde:&nbsp;</td> 
<td align="left" style="text-align: left" > 
                                                         
                                                                     <telerik:RadDatePicker ID="FechaDesde"  Skin="WebBlue" Runat="server" style="height: 23px"> 
                                                                        </telerik:RadDatePicker> 
</td> 
 

Please, if the solution you will suggest me is changing a CSS file or something like that, I would appretiatte to be very specific with the steps to follow, as I have almost none experience working with them (sorry for the incovenience)

Let me know if you have any questions.

Thank,
Christian

Dimo
Telerik team
 answered on 27 Oct 2009
11 answers
563 views
hi,
I have a radgrid with 2 level detail tables.
For the 1st detail table i applied CSS by giving styles in CSS

 

.DetailTable_Default Caption  
{  
 background-color:#b0c4de;  
}  
Caption  
{  
color:#233D3D; text-align:left; font-weight:bold; text-transform:uppercase;background-color:#b0c4de;  
} 
<DetailTables> 
        <telerik:GridTableView Name="TableViewAssociateDoc" CommandItemDisplay="Top" Width="100%" 
        Caption="TERMS AND SC DOCUMENTS" AllowPaging="false" PageSize="1" CssClass="DetailTable_Default"> 


i have another detail table insideTableViewAssociateDoc.
But i couldnt set a different style for that detail table caption .hw is it possible
plz help me...........
Thanks...
Dimo
Telerik team
 answered on 27 Oct 2009
2 answers
97 views
RadSpell Version: 2009.2.701.20

I use a simple function to determine if any misspellings exist:

        public bool MispellingsExist()  
        {  
            SpellChecker spell = new SpellChecker(Server.MapPath("~/App_Data/RadSpell"));  
            spell.Text = Editor.Text;  
            spell.WordIgnoreOptions = WordIgnoreOptions.WordsWithNumbers | WordIgnoreOptions.RepeatedWords | WordIgnoreOptions.UPPERCASE;  
            spell.CheckText();  
            SpellCheckErrors errors = spell.Errors;  
            return errors.Count > 0;  
        } 

Using the code snippet above, consider the scenario where Editor.Text is equal to "We can meet on the 10th" without the quotes.  In this case the Errors collection is not empty.  It considers the "10th" as a misspelling.  Shouldn't this word be ignored based on my WordIgnoreOptions?
Lini
Telerik team
 answered on 27 Oct 2009
1 answer
101 views

I have a Self-referencing Hierarchy grid and I want add Title (and some controls to that). I am using CommandItemTemplate inside MasterTableview for that. With this I am able to add title to the grid, but I am getting titles for nested row also.. How to avoid that?

I am using the code in the sample below,
http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/selfreferencing/defaultcs.aspx

Veli
Telerik team
 answered on 27 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?