Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
306 views
Hello!

I am trying to create my own Page class which all my pages will inherit from instead of System.Web.UI.Page. This is so that can add different controllers and do various settings on all pages through many different projects (I know about Master pages and I use that as well, but this is used between various projects).

The problem is when I try to add the RadScriptManager via my own Page class, some of the RadAjaxPanels will not work and it is like the page is sometimes acting a bit strange. It seems that the panels that are added via codebehind/Control classes works like they should, but the ones added in ASPX pages does not work. I have tried adding the RadScriptManager in both Init and Load, both before and after base.methodName(). I have also tried both Add and AddAt(0) on this.Form.Controls.

Is there any solution to adding the RadScriptManager in a .cs class/codebehind or are the controls dependent of it beging added (on top) in the ASPX page?

I am using version 2009.1.422.20.

Thank you.
pev
Top achievements
Rank 1
 answered on 05 May 2009
3 answers
84 views
Hello,

I searched the forums, but it seems everyone is having the opposite problem of me.  I want to use the newer WebBlue skin in the older 2008 (2008.2.826.35) version.  I tried the usual steps for adding a custom skin, I took the WebBlue skin from the new version, and put it into my application directory, set EnableEmbeddedSkins=false, and then added the <link> line to the css.  However, this did not work.  Do I also need to change the name of the skin to be something other than WebBlue (since that is a built-in skin)?  I wouldn't think so.  So I looked through the css of the old and new skins, and they are quite different.  Is there a (relatively) easy way of using the new WebBlue look in the older release?  We really like the new look and it will become our default look for all of our dozen or so applications, however, we cannot upgrade to Q1 2009 for other reasons (not skin-related).  I searched the posts, but I couldn't find anyone who has attempted this already.

Thanks,
Brian
Ivo
Telerik team
 answered on 05 May 2009
2 answers
104 views
Hi,

I would like to add GridItem to RadGrid programmatically. Following is the scenario:

I have custom buttons on my web page like "Add", "Edit". On add button click I show a form which contains controls for entering the data for new item in grid. On update I extract the values from these controls and then want to create GridItem & add it to Grid's collection.

As per requirement we don't want to use the Add, Edit buttons of rad grid because they show editable fields either below the record or do inplace editing. Opening a new pop-up to edit the record is not an option.

Is there any work around to update/add grid items in the collections?

Thanks,
Angrez
Angrez
Top achievements
Rank 1
 answered on 05 May 2009
0 answers
80 views
Hi All,


          I am using a tree view and a scheduler. I use RadAjaxManager to use Loading Panel. I wanna do is while drag a node from treeview to scheduler the Loading panel should be visible.

         This is my code


        

 

<

telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

 

 

<AjaxSettings>

 

 

 

 

<telerik:AjaxSetting AjaxControlID="RadScheduler1">

 

 

 

 

<UpdatedControls>

 

 

 

 

<telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

 

 

</UpdatedControls>

 

 

 

 

</telerik:AjaxSetting>

 

 

 

 

<telerik:AjaxSetting AjaxControlID="RadTreeView1">

 

 

 

 

<UpdatedControls>

 

 

 

 

<telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

 

 

</UpdatedControls>

 

 

 

 

</telerik:AjaxSetting>

 

 

 

<%

--<telerik:AjaxSetting AjaxControlID="ContMenuAppointmentClick">

 

<UpdatedControls>

<telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" />

</UpdatedControls>

</telerik:AjaxSetting>--

%>

 

 

</AjaxSettings>

 

 

 

 

</telerik:RadAjaxManager>

 

 



By using this code i struck in Javascript Error. The error is below

First time i found
Microsoft JScript runtime error: Sys.InvalidOperationException: A control is already associated with the element.

Second Time i do the same action i found
Microsoft JScript runtime error: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'RadScheduler1Panel'. If it is being updated dynamically then it must be inside another UpdatePanel.


So kindly help me to overcome this.



Regards,
Leo.



         

 

Leo
Top achievements
Rank 1
 asked on 05 May 2009
6 answers
141 views
Dear Telerik,

I have a grid Q42008 with filters enabled, mutli row select enabled, and keyboard navigation enabled. Pressing the SpaceBar selects/unselects a row. But when entering a filter value, the SpaceBar selects/unselects the active row, and it does not insert a space in the filter text box instead. Note: All other characters work fine, and appear n the filter text box, except the space.

Any Ideas of how to solve this?

Regards,
Salah Malaeb
Yavor
Telerik team
 answered on 05 May 2009
3 answers
124 views
I'm having a problem on my grids where I use filtering and the AutoPostBackOnFilter property set to TRUE.  It seems that when I first load the grid I can filter just fine on any column.  However any other columns I try to filter on don't apply the value or even retain the value that I put into the filter textbox.  The page posts back, but it doesn't retain or apply any filtering for those subsequent attempts.

Am I missing something simple here?
Yavor
Telerik team
 answered on 05 May 2009
2 answers
75 views
Hi

i want to read some images from database and show them in a grid with 5 visible row for example!
it means 5 image must show in a time!
but i want by pressing manual "next button" the first image go out and the 6t image load from databae
i want to scroll to the next item by click
sadeghhp
Top achievements
Rank 1
 answered on 05 May 2009
1 answer
370 views
I would like to access the radgrid in my nestedviewtemplate to perform some client side validation but I can't figure out how to access a radgrid in a nestedviewtemplate in javascript.
The goal is to loop thru the main grid(rGrdBaseSchedule) rows and then into the sub grid(rGrdTasks) rows and do validation on the whole structure before saving it.

I provided our current grid asp for reference.

 


 

 

<telerik:RadGrid ID="rGrdBaseSchedule" runat="server" Skin="RequestQueue"

 

 

EnableEmbeddedSkins="false" AutoGenerateColumns="false" AllowMultiRowEdit="true"

 

 

 

 

 

OnItemDataBound="rGrdBaseSchedule_ItemDataBound" OnDataBinding="rGrdBaseSchedule_OnDataBinding"

 

 

OnPreRender="rGrdBaseSchedule_PreRender" ClientSettings-AllowExpandCollapse="true"

 

 

EnableOutsideScripts="true" >

 

 

 

 

 

<ClientSettings AllowExpandCollapse="true">

 

 

 

 

 

<ClientEvents OnGridCreated="GridCreated"/>

 

 

 

 

 

<Scrolling AllowScroll="true" ScrollHeight="225" UseStaticHeaders="true"/>

 

 

 

 

 

</ClientSettings>

 

 

 

 

 

<MasterTableView CellPadding="0" CellSpacing="0" EditMode="InPlace" HierarchyLoadMode="Client"

 

 

ExpandCollapseColumn-Visible="true" HierarchyDefaultExpanded="true"

 

 

 

 

 

ExpandCollapseColumn-ButtonType="ImageButton" ExpandCollapseColumn-CollapseImageUrl="images/minus.gif"

 

 

ExpandCollapseColumn-ExpandImageUrl="images/plus.gif" ExpandCollapseColumn-HeaderStyle-Width="1"

 

 

 

 

 

ShowFooter="false" TableLayout="fixed" EnableColumnsViewState="true" EnableViewState="true">

 

 

<FooterStyle CssClass="totalsbottom" />

 

 

 

 

 

<NestedViewTemplate>

 

 

 

 

 

<telerik:RadGrid ID="rGrdTasks" runat="server" Skin="RequestQueue" EnableEmbeddedSkins="false"

 

 

 

 

 

AutoGenerateColumns="false" AllowMultiRowEdit="true" OnItemDataBound="rGrdTasks_ItemDataBound"

 

 

 

 

 

EnableOutsideScripts="true">

 

 

 

 

 

<MasterTableView CommandItemDisplay="None" CellPadding="0" CellSpacing="0" EditMode="InPlace"

 

 

ShowFooter="true" TableLayout="fixed">

 

 

 

 

 

<FooterStyle CssClass="totalsbottom" />

 

 

 

 

 

<Columns>

 

 

 

 

 

<telerik:GridBoundColumn HeaderText="TaskId" DataField="TaskId" Display="false">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridTemplateColumn HeaderText="Type" HeaderStyle-Width="60px" ItemStyle-HorizontalAlign="Center"

 

 

 

 

 

UniqueName="StoryType">

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

<asp:Label ID="lblStoryType" runat="server"></asp:Label>

 

 

 

 

 

<img id="imgErr" src="images/icons/exclamation.gif" enableviewstate="false" style="display: none;"

 

 

 

 

 

alt="" />

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

 

<telerik:GridTemplateColumn HeaderStyle-Width="30%" ItemStyle-HorizontalAlign="Center"

 

 

 

 

 

HeaderText="Slug" UniqueName="Slug">

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

<asp:HyperLink ID="lnkSlug" runat="server"></asp:HyperLink>

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

 

<telerik:GridBoundColumn HeaderText="Date" DataField="StartDate" HeaderStyle-Width="40px"

 

 

 

 

 

ItemStyle-HorizontalAlign="Center" DataFormatString="{0:MM/dd/yyyy}" ReadOnly="true">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridTemplateColumn HeaderStyle-Width="50px" ItemStyle-HorizontalAlign="Center"

 

 

 

 

 

HeaderText="In Time" UniqueName="InTime">

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

<asp:TextBox ID="txtInTime" runat="server" CssClass="grdEdtTxt" onfocus="this.select();"></asp:TextBox>

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

 

<telerik:GridTemplateColumn DataField="OutTime" HeaderStyle-Width="50px" ItemStyle-HorizontalAlign="Center"

 

 

 

 

 

UniqueName="OutTime" HeaderText="Out Time">

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

<asp:TextBox ID="txtOutTime" runat="server" CssClass="grdEdtTxt" onfocus="this.select();"></asp:TextBox>

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

 

<telerik:GridTemplateColumn HeaderStyle-Width="100px" ItemStyle-HorizontalAlign="Center"

 

 

 

 

 

UniqueName="CostCenters" HeaderText="Cost Center(s)" FooterStyle-HorizontalAlign="right"

 

 

 

 

 

FooterStyle-Font-Bold="true">

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

<asp:Label ID="lblCostCenters" runat="server"></asp:Label>

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

<FooterTemplate>

 

 

 

 

 

<span><b>Total : </b></span>

 

 

 

 

 

</FooterTemplate>

 

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

 

<telerik:GridTemplateColumn HeaderStyle-Width="30px" ItemStyle-HorizontalAlign="Center"

 

 

 

 

 

FooterStyle-HorizontalAlign="Center" FooterStyle-Font-Bold="true" HeaderText="OT"

 

 

 

 

 

UniqueName="OT">

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

<asp:TextBox ID="txtOTHrs" runat="server" CssClass="grdEdtTxt" onfocus="this.select();"

 

 

 

 

 

MaxLength="5" />

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

<FooterTemplate>

 

 

 

 

 

<b><span id="spnOTTot" runat="server">&nbsp;</span></b>

 

 

 

 

 

</FooterTemplate>

 

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

 

<telerik:GridTemplateColumn HeaderStyle-Width="30px" ItemStyle-HorizontalAlign="Center"

 

 

 

 

 

FooterStyle-HorizontalAlign="Center" FooterStyle-Font-Bold="true" HeaderText="DT"

 

 

 

 

 

UniqueName="DT">

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

<asp:TextBox ID="txtDTHrs" runat="server" CssClass="grdEdtTxt" onfocus="this.select();"

 

 

 

 

 

MaxLength="5" />

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

<FooterTemplate>

 

 

 

 

 

<b><span id="spnDTTot" runat="server">&nbsp;</span></b>

 

 

 

 

 

</FooterTemplate>

 

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

 

<telerik:GridTemplateColumn HeaderStyle-Width="30px" ItemStyle-HorizontalAlign="Center"

 

 

 

 

 

FooterStyle-HorizontalAlign="Center" FooterStyle-Font-Bold="true" HeaderText="Hours"

 

 

 

 

 

UniqueName="Total">

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

<span id="spnHrs" runat="server"></span>

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

<FooterTemplate>

 

 

 

 

 

<b><span id="spnWkTot" runat="server">&nbsp;</span></b>

 

 

 

 

 

</FooterTemplate>

 

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

 

<telerik:GridBoundColumn HeaderText="End Date" DataField="EndDate" Display="false"

 

 

 

 

 

DataFormatString="{0:MM/dd/yyyy}">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn HeaderText="Estimated" DataField="Estimated" Display="false">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn HeaderText="Work Description" DataField="WorkDescription"

 

 

 

 

 

Display="false">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

</Columns>

 

 

 

 

 

</MasterTableView>

 

 

 

 

 

<ClientSettings>

 

 

 

 

 

<Selecting AllowRowSelect="true" />

 

 

 

 

 

<ClientEvents OnGridCreated="TaskGridCreated" />

 

 

 

 

 

</ClientSettings>

 

 

 

 

 

</telerik:RadGrid>

 

 

</NestedViewTemplate>

 

 

 

 

 

<ParentTableRelation>

 

 

 

 

 

<telerik:GridRelationFields MasterKeyField="Date" />

 

 

 

 

 

</ParentTableRelation>

 

 

 

 

 

<Columns>

 

 

 

 

 

<telerik:GridTemplateColumn HeaderStyle-Width="10px" ItemStyle-HorizontalAlign="Center"

 

 

 

 

 

HeaderText="Day" UniqueName="DayName">

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

<span id="spnDyNm" enableviewstate="false" runat="server" />

 

 

 

 

 

<img id="imgErr" src="images/icons/exclamation.gif" enableviewstate="false" style="display: none;"

 

 

 

 

 

alt="" />

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

 

<telerik:GridBoundColumn HeaderText="Date" DataField="Date" HeaderStyle-Width="40px"

 

 

 

 

 

ItemStyle-HorizontalAlign="Center" DataFormatString="{0:MM/dd/yyyy}" ReadOnly="true">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridTemplateColumn HeaderStyle-Width="50px" ItemStyle-HorizontalAlign="Center"

 

 

 

 

 

HeaderText="In" UniqueName="InTime">

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

<asp:Literal ID="ltlInTime" EnableViewState="false" runat="server" />

 

 

<asp:TextBox ID="txtInTime" Style="display: none;" runat="server" CssClass="grdEdtTxt"

 

 

 

 

 

onfocus="this.select();" ></asp:TextBox>

 

 

 

 

 

<span id="spnInOff" runat="server" style="display: none;">OFF</span>

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

 

<telerik:GridTemplateColumn DataField="OutTime" HeaderStyle-Width="50px" ItemStyle-HorizontalAlign="Center"

 

 

 

 

 

UniqueName="OutTime">

 

 

 

 

 

<HeaderTemplate>

 

 

 

 

 

<span>Out</span>

 

 

 

 

 

</HeaderTemplate>

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

<asp:Literal ID="ltlOutTime" EnableViewState="false" runat="server" />

 

 

 

 

 

<asp:TextBox ID="txtOutTime" Style="display: none;" runat="server" CssClass="grdEdtTxt"

 

 

 

 

 

onfocus="this.select();"></asp:TextBox>

 

 

 

 

 

<span id="spnOutOff" runat="server" style="display: none;" class="offText">OFF</span>

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

 

<telerik:GridTemplateColumn HeaderText="Day Type" DataField="DayType" HeaderStyle-Width="50px"

 

 

 

 

 

ItemStyle-HorizontalAlign="Center" UniqueName="DayType">

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

<asp:Literal ID="ltlDayType" runat="server"></asp:Literal>

 

 

 

 

 

<asp:DropDownList ID="ddlDayType" runat="server" CssClass="ddlEdt" onfocus="ddlFocus(this);">

 

 

 

 

 

</asp:DropDownList>

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

 

<telerik:GridTemplateColumn HeaderText="Cost Center(s)" HeaderStyle-Width="30%" ItemStyle-HorizontalAlign="Center"

 

 

 

 

 

FooterStyle-HorizontalAlign="Center" FooterStyle-Font-Italic="true" UniqueName="CostCenter">

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

<asp:Literal ID="ltlCC" runat="server" EnableViewState="true" Text="&nbsp;" />

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

 

<telerik:GridTemplateColumn HeaderStyle-Width="30px" ItemStyle-HorizontalAlign="Center"

 

 

 

 

 

FooterStyle-HorizontalAlign="Center" FooterStyle-Font-Bold="true" HeaderText="Hours"

 

 

 

 

 

UniqueName="Total">

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

<asp:Literal ID="ltlHrs" runat="server" />

 

 

 

 

 

<asp:TextBox ID="txtHrsEdt" runat="server" Style="display: none;" CssClass="grdEdtTxt"

 

 

 

 

 

onfocus="this.select();" MaxLength="5" />

 

 

 

 

 

<span id="spnHrs" runat="server" style="display: none;"></span>

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

 

</Columns>

 

 

 

 

 

</MasterTableView>

 

 

 

 

 

<ClientSettings>

 

 

 

 

 

<Selecting AllowRowSelect="true" />

 

 

 

 

 

<ClientEvents OnGridCreated="GridCreated" />

 

 

</ClientSettings>

 

 

 

 

 

</telerik:RadGrid>

 

 

 

Princy
Top achievements
Rank 2
 answered on 05 May 2009
1 answer
1.2K+ views
Hello,

how can I open RadWindow from code behind?

Is there an example?

Christian
Shinu
Top achievements
Rank 2
 answered on 05 May 2009
1 answer
617 views
Hello, i want to print the date in the dd.MM.yyyy Format with GridDateTimeColumn, i have tried the following:

<telerik:GridDateTimeColumn DataField="Expiration" DataType="System.DateTime" UniqueName="Expiration" CurrentFilterFunction="StartsWith"  DataFormatString='<%#Bind("Expiration", "0:dd.MM.yyyy") %>'  />

I get an error because a control with a bi-directional databind must have an ID

Can you help me!
               

Princy
Top achievements
Rank 2
 answered on 05 May 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
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
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?