Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
116 views
Hello,

i have to access a multipage that was added dynamically on server-side on the client-side with javascript to make it visible and set the selected index.
For example, a multipage that was added at designtime i access like this:
function selectNews() {
                    var mV = $find("<%= radThumbs.ClientID %>");
                    mV.set_selectedIndex(1);
                }

This works very well. But now i have to access a dynamically added multipage. All my attempts are without luck.
In codebehind i set a unique id to each dynamic added multipage. In html-output that is generated the multipages are stored as div-tags with a id that is equal to that, that i set in codebehind on server-side.

so far i tried different ways to get the control on client side.

Attempt #1:
alert('item.children[i].innerHTML.replace(/\s/g, "")');
var test = $find(item.children[i].innerHTML.replace(/\s/g, ""));
 test.set_selectedIndex(1);
Attempt #2:
alert('item.children[i].innerHTML.replace(/\s/g, "")');
var test = document.getElementById(item.children[i].innerHTML.replace(/\s/g, ""));
test.set_selectedIndex(1);
 
 
In all attempts the alertbox shows the correct id.
But ever i try to set the selected index, a error occurs and tells me, that the element doesn't contain such a method and so on.

Thanks for your assistence...

Thorsten
Kate
Telerik team
 answered on 03 Feb 2012
4 answers
187 views

Hello, 

I have been working with the RadEditor for Sharepoint for a few months now. 

Very happy with the functionality and interaction with Sharepoint, but I think I've found a bug.

A form page that contains the editor as well as other asp controls has been put together,
and is working well for the most part.

However there is something strange happens in chrome, and firefox too, not on IE.  

I am using an update panel to avoid postbacks from some cascading dropdowns that show
or hide the instances of the radeditor. 

So would look something like this: 

  <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:PlaceHolder>
            <teleriksharepoint:spradeditor runat="server" id="description-txt" 
           dialoghandlerurl="~/Telerik.Web.UI.DialogHandler.axd">
	   </teleriksharepoint:spradeditor>
            </asp:PlaceHolder>
        <ContentTemplate>
  </asp:UpdatePanel>
the problem is: - after a postback the editor froze and the floating menu does not appear anymore. Other controls still work but the editor breaks, and content is lost. This problem does not happen all the time. I've noticed that it specifically happens when there is text pasted in from some other source (i dunno if this makes any difference or not). It also happens after typing the text too. I found a tentative solution here for my problem. I tried it but it didnt work for me in my page inside sharepoint. I am wondering if this is happening only to me or everybody. What could be the steps to address this kind of issue? There seems to be no javascript error, nor server side one. I am stuck on how to address this. Thanks for any of your help, -Daniel




Rumen
Telerik team
 answered on 03 Feb 2012
2 answers
109 views
Hi Telerik,

When I disable radcombobox with javascript, it is still possible to change items.

Here are some steps to reproduce this behavior.

http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multiplecomboboxes/defaultcs.aspx
On the above link, when I execute the following javascript (with firebug):
$find("RadComboBox1").set_enabled(false)
The combo is disabled, but when i focus the input element and start to type, the items change.

Is this a bug or is there another function which should be called?

I got firefox 9.0.1
DvdBrink
Top achievements
Rank 1
 answered on 03 Feb 2012
3 answers
201 views
Hi,

               Now  I am using sharepoint 2010 for my project. I want to configure a web application for using telerik controls. What are the steps i have to follow to configure the web application.

Thanks.
Velkumar
Rumen
Telerik team
 answered on 03 Feb 2012
5 answers
199 views
Hi,

I am using nested radgrid in which I have at the top is Quotations then Groups and then Items. I want to calculate the total cost of Items in each group but the problem is that whenever I rebind a radgrid after adding a new Item it's giving me the following the exception. The purpose of rebinding is that I want to display a total in lblTotalCost in an itemdatabound event, and if I don't do rebind then it doesn't give me any exception.

Any help would be greatly appreciated.

Thanks.

Exception : DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'ItemName'.

<telerik:RadGrid ID="rgQuotation" runat="server" Width="95%" ShowStatusBar="true"
            Skin="Office2007" Font-Names="Verdana" AutoGenerateHierarchy="true" AutoGenerateColumns="False"
            AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="false" ShowFooter="True">
            <PagerStyle Mode="NumericPages"></PagerStyle>
            <MasterTableView Width="100%" DataKeyNames="ID" AllowMultiColumnSorting="True" CommandItemDisplay="Top"
                HierarchyDefaultExpanded="true" HierarchyLoadMode="ServerBind" Name="Quotation"
                CssClass="DetailTable_Default">
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"
                        ItemStyle-Width="30px" EditImageUrl="~/Portals/0/Images/Edit.gif">
                        <ItemStyle BackColor="GreenYellow" />
                    </telerik:GridEditCommandColumn>
                    <telerik:GridBoundColumn SortExpression="ID" HeaderText="ID" HeaderButtonType="TextButton"
                        DataField="ID" UniqueName="ID" ReadOnly="true" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="TariffName" HeaderText="Quotation Name"
                        HeaderButtonType="TextButton" DataField="TariffName" UniqueName="TariffName"
                        ReadOnly="true">
                        <ItemStyle BackColor="GreenYellow" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="RecordType" HeaderText="Rec Type" HeaderButtonType="TextButton"
                        DataField="RecordType" UniqueName="RecordType" ReadOnly="true" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="JobID" HeaderText="Job No" HeaderButtonType="TextButton"
                        DataField="JobID" UniqueName="JobID" ReadOnly="true" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn UniqueName="ShowTotal">
                        <ItemStyle Width="125px" HorizontalAlign="Left" BackColor="Yellow" />
                        <FooterTemplate>
                            <asp:Label ID="lblTotalCost" runat="server" Text="dffsafssdf" Font-Bold="true" ForeColor="White"
                                Font-Italic="true">
                            </asp:Label>
                            <asp:Label ID="lblTotalSelling" runat="server" Text="Total Selling" Font-Bold="true"
                                Visible="false">
                            </asp:Label>
                        </FooterTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
                <EditFormSettings EditFormType="Template" InsertCaption="New Tariff">
                    <FormTemplate>
                        <div>
                            <asp:Label ID="lblTariffName" runat="server" Text="Quotation Name" CssClass="fieldsetControlStyle">
                            </asp:Label>
                               
                            <asp:TextBox ID="txtTariffName" runat="server" Text='<%# Eval("TariffName") %>'>
                            </asp:TextBox>
                            <asp:LinkButton ID="lnkbtnUpdate" runat="server" CausesValidation="True" CommandName='<%# IIf( DataBinder.Eval(Container, "OwnerTableView.IsItemInserted"), "PerformInsert", "Update") %>'
                                CssClass="lnkButton" ToolTip="Update">
                                <asp:Image ID="imgUpdate" runat="server" ImageUrl="~/Portals/0/Images/Update.gif" />
                            </asp:LinkButton>
                             <asp:LinkButton ID="lnkbtnCancel" runat="server" CausesValidation="False" CommandName="Cancel"
                                CssClass="lnkButton" ToolTip="Cancel">
                                <asp:Image ID="imgCancel" runat="server" ImageUrl="~/Portals/0/Images/Cancel.gif" />
                            </asp:LinkButton>
                        </div>
                    </FormTemplate>
                </EditFormSettings>
                <DetailTables>
                    <telerik:GridTableView DataKeyNames="ID" HierarchyLoadMode="ServerBind" Width="100%"
                        HierarchyDefaultExpanded="true" CommandItemDisplay="Top" runat="server" Name="Groups"
                        CssClass="DetailTable_Default">
                        <Columns>
                            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"
                                ItemStyle-Width="40px" EditImageUrl="~/Portals/0/Images/Edit.gif">
                                <ItemStyle BackColor="Yellow" />
                            </telerik:GridEditCommandColumn>
                            <telerik:GridBoundColumn SortExpression="GroupID" HeaderText="GroupID" HeaderButtonType="TextButton"
                                DataField="GroupID" UniqueName="GroupID" ReadOnly="true" Visible="false">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="GroupName" HeaderText="Group Name" HeaderButtonType="TextButton"
                                DataField="GroupName" UniqueName="GroupName">
                                <ItemStyle Font-Bold="true" BackColor="Yellow" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="TariffID" HeaderText="TariffID" HeaderButtonType="TextButton"
                                DataField="TariffID" UniqueName="TariffID" ReadOnly="true" Visible="false">
                                <ItemStyle Width="0%" />
                            </telerik:GridBoundColumn>
                            <telerik:GridTemplateColumn UniqueName="ShowTotal">
                                <ItemStyle Width="125px" HorizontalAlign="Left" BackColor="Yellow" />
                                <FooterTemplate>
                                    <asp:Label ID="lblTotalCost" runat="server" Text="" Font-Bold="true" ForeColor="White"
                                        Visible="true" Font-Italic="true">
                                    </asp:Label>
                                    <asp:Label ID="lblTotalSelling" runat="server" Text="Total Selling" Font-Bold="true"
                                        Visible="false">
                                    </asp:Label>
                                </FooterTemplate>
                            </telerik:GridTemplateColumn>
                        </Columns>
                        <EditFormSettings EditFormType="Template" InsertCaption="New Group">
                            <FormTemplate>
                                <div>
                                    <asp:Label ID="lblGroupName" runat="server" Text="Group Name" CssClass="fieldsetControlStyle">
                                    </asp:Label>
                                       
                                    <asp:TextBox ID="txtGroupName" runat="server" Text='<%# Eval("groupname") %>'>
                                    </asp:TextBox>
                                    <br />
                                    <asp:LinkButton ID="lnkbtnUpdate" runat="server" CausesValidation="True" CommandName='<%# IIf( DataBinder.Eval(Container, "OwnerTableView.IsItemInserted"), "PerformInsert", "Update") %>'
                                        CssClass="lnkButton">
                                        <asp:Image ID="imgUpdate" runat="server" ImageUrl="~/Portals/0/Images/Update.gif" />
                                    </asp:LinkButton>
                                     <asp:LinkButton ID="lnkbtnCancel" runat="server" CausesValidation="False" CommandName="Cancel"
                                        CssClass="lnkButton" ToolTip="Cancel">
                                        <asp:Image ID="imgCancel" runat="server" ImageUrl="~/Portals/0/Images/Cancel.gif" />
                                    </asp:LinkButton>
                                </div>
                            </FormTemplate>
                        </EditFormSettings>
                        <CommandItemSettings AddNewRecordText="Add New Group" AddNewRecordImageUrl="~/Portals/0/Images/AddRecord.gif"
                            ShowRefreshButton="false" />
                        <DetailTables>
                            <telerik:GridTableView DataKeyNames="ID" Width="100%" Name="Items" CommandItemDisplay="Top"
                                AlternatingItemStyle-BackColor="SkyBlue" CssClass="DetailTable_Default!" EditMode="InPlace"
                                runat="server" HierarchyLoadMode="ServerBind">
                                <Columns>
                                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"
                                        UpdateImageUrl="~/Portals/0/Images/Update.gif" ItemStyle-Width="40px" EditImageUrl="~/Portals/0/Images/Edit.gif"
                                        CancelImageUrl="~/Portals/0/Images/Cancel.gif">
                                    </telerik:GridEditCommandColumn>
                                    <telerik:GridBoundColumn SortExpression="ID" HeaderText="ID" HeaderButtonType="TextButton"
                                        DataField="ID" UniqueName="ID" ReadOnly="true" Visible="false">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn SortExpression="ItemOrder" HeaderText="ItemOrder" HeaderButtonType="TextButton"
                                        DataField="ItemOrder" UniqueName="ItemOrder" ReadOnly="true" Visible="false">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridTemplateColumn HeaderText="Item Name">
                                        <ItemTemplate>
                                            <asp:Label ID="lblItemName" runat="server" Text='<%# Eval("ItemName") %>'></asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtItemName" runat="server" Text='<%# Eval("ItemName") %>' MaxLength="100">
                                            </asp:TextBox>
                                            <asp:RequiredFieldValidator ID="rfvtxtItemName" runat="server" ErrorMessage="!" Display="Dynamic"
                                                ControlToValidate="txtItemName">
                                            </asp:RequiredFieldValidator>
                                        </EditItemTemplate>
                                        <ItemStyle Width="30%" />
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Rate" UniqueName="Rate">
                                        <ItemTemplate>
                                            <asp:Label ID="lblUnits" runat="server" Text='<%# Eval("Units") %>'></asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <telerik:RadNumericTextBox ID="rntbRate" ShowSpinButtons="true" IncrementSettings-InterceptArrowKeys="true"
                                                IncrementSettings-InterceptMouseWheel="true" runat="server" Type="Number" Width="80px"
                                                DbValue='<%# Eval("Units") %>' NumberFormat-DecimalDigits="2" MinValue="1" IncrementSettings-Step="1"
                                                CssClass="fieldsetControlWidth fieldsetLine" />
                                        </EditItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Quantity" UniqueName="Quantity">
                                        <ItemTemplate>
                                            <asp:Label ID="lblQuantity" runat="server" Text='<%# Eval("Quantity") %>'></asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <telerik:RadNumericTextBox ID="rntbQuantity" ShowSpinButtons="true" IncrementSettings-InterceptArrowKeys="true"
                                                IncrementSettings-InterceptMouseWheel="true" runat="server" Type="Number" Width="80px"
                                                DbValue='<%# Eval("Quantity") %>' NumberFormat-DecimalDigits="0" MinValue="0"
                                                IncrementSettings-Step="1" CssClass="fieldsetControlWidth fieldsetLine">
                                                <ClientEvents OnBlur="Blur" OnFocus="Focus" />
                                            </telerik:RadNumericTextBox>
                                        </EditItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="C.P" UniqueName="CostPrice">
                                        <ItemTemplate>
                                            <asp:Label ID="lblCostPrice" runat="server" Text='<%# Format(DataBinder.Eval(Container.DataItem,"CostPrice"),"###,##0.00") %>'>
                                            </asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <telerik:RadNumericTextBox ID="rntbCostPrice" ShowSpinButtons="true" IncrementSettings-InterceptArrowKeys="true"
                                                IncrementSettings-InterceptMouseWheel="true" runat="server" Type="Number" Width="80px"
                                                DbValue='<%# Eval("CostPrice") %>' NumberFormat-DecimalDigits="2" MinValue="0"
                                                IncrementSettings-Step="1" CssClass="fieldsetControlWidth fieldsetLine" />
                                        </EditItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="S.P" Visible="false">
                                        <ItemTemplate>
                                            <asp:Label ID="lblSellingPrice" runat="server" Text='<%# Format(DataBinder.Eval(Container.DataItem,"SellingPrice"),"###,##0.00") %>'>
                                            </asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <telerik:RadNumericTextBox ID="rntbSellingPrice" ShowSpinButtons="true" IncrementSettings-InterceptArrowKeys="true"
                                                IncrementSettings-InterceptMouseWheel="true" runat="server" Type="Number" Width="80px"
                                                DbValue='<%# Eval("SellingPrice") %>' NumberFormat-DecimalDigits="2" MinValue="0"
                                                IncrementSettings-Step="1" CssClass="fieldsetControlWidth fieldsetLine" />
                                        </EditItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <%--                                    <telerik:GridCalculatedColumn HeaderText="C.P Total" DataType="System.Double" UniqueName="TotalCostPrice"
                                        FooterStyle-Font-Bold="true" FooterStyle-ForeColor="White" DataFields="CostPrice,Units,Quantity"
                                        Expression="{0}/{1}*{2}" Aggregate="Sum" DataFormatString="{0:###,##0.00}" FooterAggregateFormatString="{0:£###,##0.00}" />
                                    <telerik:GridCalculatedColumn HeaderText="S.P Total " UniqueName="TotalSellingPrice"
                                        FooterStyle-ForeColor="White" FooterStyle-Font-Bold="true" Visible="false" DataFields="SellingPrice,Units,Quantity"
                                        Expression="{0}/{1}*{2}" DataType="System.Double" FooterAggregateFormatString="{0:£###,##0.00}"
                                        FooterText="S.P Total : " Aggregate="Sum" DataFormatString="{0:###,##0.00}" />--%>
                                </Columns>
                                <CommandItemSettings AddNewRecordText="Add New Item" AddNewRecordImageUrl="~/Portals/0/Images/AddRecord.gif"
                                    ShowRefreshButton="false" />
                            </telerik:GridTableView>
                        </DetailTables>
                    </telerik:GridTableView>
                </DetailTables>
                <CommandItemSettings AddNewRecordText="Add new Quotation" AddNewRecordImageUrl="~/Portals/0/Images/AddRecord.gif"
                    ShowRefreshButton="false" ShowExportToPdfButton="true" />
            </MasterTableView>
            <ClientSettings AllowKeyboardNavigation="true" EnableRowHoverStyle="true">
                <ClientEvents OnRowContextMenu="RowContextMenu" OnRowDblClick="RowDblClick" />
                <Selecting AllowRowSelect="true" />
                <KeyboardNavigationSettings EnableKeyboardShortcuts="true" AllowSubmitOnEnter="true"
                    AllowActiveRowCycle="true" CollapseDetailTableKey="LeftArrow" ExpandDetailTableKey="RightArrow" />
            </ClientSettings>
        </telerik:RadGrid>
 
 
Protected Sub rgQuotation_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles rgQuotation.ItemCommand
 
        If e.CommandName = "PerformInsert" Then
 
            Insert(e)          
            rgQuotation.Rebind()
 
        ElseIf e.CommandName = "Update" Then
            Update(e)
            rgQuotation.Rebind()
        End If
 
    End Sub
 
  Protected Sub rgQuotation_DetailTableDataBind(ByVal source As Object, ByVal e As GridDetailTableDataBindEventArgs) Handles rgQuotation.DetailTableDataBind
 
        Dim sql As String
        Dim sb As New StringBuilder
        Dim dt As DataTable
 
        Select Case e.DetailTableView.Name
 
            Case "Groups"
 
                Dim nTariffId As String = e.DetailTableView.ParentItem.GetDataKeyValue("ID").ToString()
 
                sb.Append("select * from ff_Group where TariffID = " & nTariffId & " and IsDeleted = 0 order by grouporder")
                sql = sb.ToString
 
                dt = DNNDB.Query(sql)          
 
                e.DetailTableView.DataSource = dt
 
 
            Case "Items"
 
                Dim nGroupId As String = e.DetailTableView.ParentItem.GetDataKeyValue("ID").ToString()
 
                sb.Append("select * from FF_Item where FF_Item.GroupID = " & nGroupId & " and IsDeleted = 0 order By ItemOrder asc")
                sql = sb.ToString
 
                dt = DNNDB.Query(sql)
 
                e.DetailTableView.DataSource = dt
 
        End Select
 
    End Sub
 
Protected Sub rgQuotation_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles rgQuotation.NeedDataSource
 
        BindQuotation()
 
    End Sub

 Protected Sub BindQuotation()

        Dim sb As New StringBuilder
        sb.Append("select * from ff_tariff where JobID = " & pnJobID & " and Isdeleted = 0 and RecordType = '" & FF_GLOBALS.RECORD_TYPE_QUOTATION & "'")
        Dim sql As String = sb.ToString


        Dim dt As DataTable = DNNDB.Query(sql)
        rgQuotation.DataSource = dt  


    End Sub


Andrey
Telerik team
 answered on 03 Feb 2012
1 answer
139 views
In my page i have used 3 rad sliders and those are  placed in 3 rad tabs .when i placed RadAjaxPanel  in the page radsliders are not showing ,but when i remove that its working perfectly .
Code as follows
---------------------------
 <telerik:RadAjaxPanel ID="radAjaxPanelID" runat="server">
 <telerik:RadTabStrip ID="radTabStripPerformance" runat="server" SelectedIndex="0"
                    EnableEmbeddedSkins="False" MultiPageID="RadMultiPage1" BorderWidth="0px" BorderStyle="None"
                    OnTabClick="radTabStripPerformance_TabClick" Orientation="HorizontalBottom">
                    <Tabs>
                        <telerik:RadTab ImageUrl="~/Images/myperformance-whitebg.jpg"
                            SelectedImageUrl="~/Images/myperformance-graybg.jpg" Selected="True">
                        </telerik:RadTab>
                        <telerik:RadTab ImageUrl="~/Images/myteam-whitebg.jpg"
                            SelectedImageUrl="~/Images/myteam-graybg.jpg">
                        </telerik:RadTab>
                        <telerik:RadTab ImageUrl="~/Images/mychannel-whitebg.jpg" SelectedImageUrl="~/Images/mychannel-graybg.jpg">
                        </telerik:RadTab>
                    </Tabs>
                </telerik:RadTabStrip>
 <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" CssClass="multiPage">
                    <telerik:RadPageView ID="radPageViewMyPerfomance" runat="server" CssClass="pageViewEducation">
<telerik:RadSlider ID="radSliderMonth" runat="server" ItemType="item" Width="700px"
                            Visible="true" Height="70px" AnimationDuration="400" ThumbsInteractionMode="Free"
                            AutoPostBack="true" EnableDragRange="false"
                            OnValueChanged="radSliderMonth_ValueChanged" ></telerik:RadSlider>
</telerik:RadPageView>
                    <telerik:RadPageView ID="radPageViewMyTeamPer" runat="server" Visible="true"  CssClass="pageViewEducation">
                        <br />
                        <br />
                       
                                      <telerik:RadSlider ID="radSliderMonthForMyTeam" runat="server" ItemType="item" Width="800px"
                                        Height="70px" AnimationDuration="400" ThumbsInteractionMode="Free" AutoPostBack="True"
                                        Visible="true" EnableDragRange="True"
                                        OnValueChanged="radSliderMonthForMyTeam_ValueChanged">
                                    </telerik:RadSlider>
 </telerik:RadPageView>  <telerik:RadPageView ID="radPageViewMyChannel" runat="server">

  <telerik:RadSlider ID="radSliderMonthForChannel" runat="server" AnimationDuration="400"
                                        Width="800px" AutoPostBack="True" EnableDragRange="True" Height="70px"
                                        ItemType="Item" OnValueChanged="radSliderMonthForChannel_ValueChanged"
                                        DbValue="0" Length="800">
                                    </telerik:RadSlider>
                  </telerik:RadPageView>
                </telerik:RadMultiPage>
 </telerik:RadAjaxPanel>




can you please help me ?
Slav
Telerik team
 answered on 03 Feb 2012
5 answers
164 views
I have a page with an edit form on it and this has some RadTextBox and RadNumericTextBox controls. The page uses a master page that has a RadFormDecorator declared on it and is set to decorate Textbox controls. RadTextBox controls are set to a width of 300px.
The problem i have noticed is that when the page loads and i click a button to show me a edit form (the edit form is set to visible = true) all the RadTextBox controls have a width set to 294px but when i hover over a control its width is resets to 300px. All this makes the form look bad because every time the user hovers over any of the RadTextBox controls it changes its size and changes the look of the form.
All this only hapend if the page uses AJAX to update controls.

If i include an ASP Textbox control on the page an set its width in markup to 300px it renders as 294px when i open my form but it doesn't suffer from the same resizing on hover as the RadTextBox does.

If i change the RadFormDecorator not to decorate Textbox controls the problem goes away and all the TextBox controls are rendered with a width of 300px.
As said the problem appeared when upgrading to Q3 2011 release. If i go back to using Q2 2011 release the problem goes away.
Josep
Top achievements
Rank 1
 answered on 03 Feb 2012
3 answers
120 views
Hi,
How can I do a drag and drop from a cell in a radgrid to another cell of the same grid?
Thanks
Tsvetina
Telerik team
 answered on 03 Feb 2012
2 answers
106 views
amm getting dates as 01-01-2012  02-01-2012  03-01-2012  04-01-2012  . . .. . . ..dynamically as headers in grid from directly binding with sp

am getting data as

name type blck  01-01-2012  02-01-2012  03-01-2012  04-01-2012  .  ... HEADERS

I WANT

Name  type blck  01  02   03      04.  ... as    HEADERS



<telerik:RadGrid ID="grdBlock" runat="server" GridLines="None" AllowFilteringByColumn="False"
                               AllowPaging="False" AllowSorting="False" AutoGenerateColumns="true" PageSize="25"
                               OnNeedDataSource="grdBlock_NeedDataSource" Skin="Office2007" CellSpacing="1" 
                               Width="900px" EnableLinqExpressions="false"  >
                               <GroupingSettings CaseSensitive="false"  />
                               <ExportSettings HideStructureColumns="true" IgnorePaging="true" FileName="Block"
                                   ExportOnlyData="true" OpenInNewWindow="true">
                                   <Excel Format="ExcelML" />
                               </ExportSettings>
                               <MasterTableView CommandItemDisplay="Top" AllowMultiColumnSorting="true" FilterItemStyle-HorizontalAlign="Center">
                                   <CommandItemSettings ShowExportToExcelButton="true" ShowExportToWordButton="false"
                                       ShowExportToPdfButton="false" ShowAddNewRecordButton="false" ShowRefreshButton="false" >
                                   </CommandItemSettings>
                                   <Columns >
                                        
                                          
                                   </Columns>
                               </MasterTableView>
                               <ClientSettings>
                                   <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True">
                                   </Scrolling>
                               </ClientSettings>
                           </telerik:RadGrid>




my cs code is
 protected void grdBlock_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {

            DataSet result = new DataSet();
            BLEmployee bl_emp = new BLEmployee();
            PropertyEmployeeMaster prop_emp = new PropertyEmployeeMaster();
            try
            {

                prop_emp.Employee_Id = Convert.ToDecimal(ddlEmployeeName.SelectedItem.Value);

                DateTime selectedDate = RadMonthYearPicker1.SelectedDate.Value;
                DateTime startDate = selectedDate.AddDays((selectedDate.Day - 1) * -1);
                DateTime endDate = startDate.AddDays(DateTime.DaysInMonth(startDate.Year, startDate.Month) - 1);

             
                prop_emp.start_date = Convert.ToDateTime(startDate);
                prop_emp.end_date = Convert.ToDateTime(endDate);

              

                result = bl_emp.ReportMonthlyBlock(prop_emp);

                result = bl_emp.ReportMonthlyBlock(prop_emp);
               
}
Kshitiz
Top achievements
Rank 1
 answered on 03 Feb 2012
1 answer
167 views
I have 2 combo boxes with treeviews in them for a States drop down list and when I click a button, I would like the first combobox to copy the value and text to the second one as well as select the appropriate node and expand to it if needed. The combo box is a list of states and then the only parent is Territories which then shows the US territories. The code I have is as follows.

My markup is as follows...

function nodeClicking(sender, args) {
            var temp = sender._clientStateFieldID.split('_');
            if (temp.length >= 1) {
                var name = temp[0];
                var comboBox = $find(name);
 
                var node = args.get_node();
 
                comboBox.set_text(node.get_text());
 
                comboBox.trackChanges();
                comboBox.get_items().getItem(0).set_text(node.get_text());
                comboBox.get_items().getItem(0).set_value(node.get_value());
                comboBox.commitChanges();
 
                comboBox.hideDropDown();
            }
        }
 
<div style="width: 100%;">
            <tk:RadComboBox ID="rcbState" runat="server" Width="250px" ShowToggleImage="true" EmptyMessage="Choose a State"
                HighlightTemplatedItems="true" style="vertical-align: middle;" >
                <ItemTemplate>
                    <div id="div1">
                        <tk:RadTreeView ID="rtvState" runat="server" OnClientNodeClicking="nodeClicking">
                            <DataBindings>
                                <tk:RadTreeNodeBinding Expanded="false" />
                            </DataBindings>
                        </tk:RadTreeView>
                    </div>
                </ItemTemplate>
                <Items>
                    <telerik:RadComboBoxItem Text="" />
                </Items>
            </tk:RadComboBox>
            <asp:Label ID="lblTest" runat="server" />
        </div>
 
        <div>
            <tk:RadComboBox ID="rcbState2" runat="server" Width="250px" ShowToggleImage="true" EmptyMessage="Choose a State"
                HighlightTemplatedItems="true" style="vertical-align: middle;" >
                <ItemTemplate>
                    <div id="div1">
                        <tk:RadTreeView ID="rtvState2" runat="server" OnClientNodeClicking="nodeClicking">
                            <DataBindings>
                                <tk:RadTreeNodeBinding Expanded="false" />
                            </DataBindings>
                        </tk:RadTreeView>
                    </div>
                </ItemTemplate>
                <Items>
                    <telerik:RadComboBoxItem Text="" />
                </Items>
            </tk:RadComboBox>
            <asp:Label ID="lblTest2" runat="server" />
        </div>
 
        <div>
            <tk:RadButton ID="btnTest" runat="server" Text="Submit" OnClick="btnTest_Click" />
        </div>

Then code behind is...

protected void btnTest_Click(object sender, EventArgs e)
    {
        string text = rcbState.SelectedItem.Text;
        string value = rcbState.SelectedItem.Value;
 
        lblTest.Text = "Name = " + text + ", ID = " + value;
 
        rcbState2.Text = text;
 
        RadTreeView rtv2 = rcbState2.Items[0].FindControl("rtvState2") as RadTreeView;
 
        (rtv2.Nodes.FindNodeByValue(value)).Expanded = true;
 
        if (rcbState2.SelectedItem != null)
        {
            lblTest2.Text = rcbState2.SelectedItem.Text;
            lblTest2.Text = rcbState2.SelectedItem.Value;
        }
    }

I'm having 2 problems... 1 is when i click the button the first time it'll get the text and value from the combo box but on the second time around it's null. 2 is I can't get the second state combobox to set the text and value and the selected item value.
Princy
Top achievements
Rank 2
 answered on 03 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?