Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
115 views
hi
i'm using a splitter as a way to edit web pages in a CMS.
in one pane, i have a treeview of the web site. in the other pane, as an example, i might have an external page loaded which allows the user to modify the properties of the web page, such as it's title. when they have modified the properties, i want to refresh the treeview. how can i do this? previously, i was using radwindow and the callback functionality there to tell the host page that something had changed. i'd like to be able to do the same thing now with splitter. 
i.e. i want the externally loaded page in the splitter pane to be able to tell the page which is hosting the splitter that something has changed.
cheers,
rob

Tsvetie
Telerik team
 answered on 24 Jun 2010
1 answer
112 views
We have 2 RadGrid control on same page.
when i perform sorting on column, generates an error as below:
sys.invalidoperationexception: type telerik.web.ui.orientation has already been registered

Please find my code as below where i have used scriptManager and two RadGrid as "radDataGrid" and "radgridDataComponent"

<

 

asp:ScriptManager ID="ScriptManager1" ScriptMode runat="server">

 

 

 

 

 

</asp:ScriptManager>

 

 

 

 

 

<telerik:RadAjaxManager runat="server" ID="RadAjaxManager2" DefaultLoadingPanelID="RadAjaxLoadingPanel1">

 

 

 

 

 

<AjaxSettings>

 

 

 

 

 

<telerik:AjaxSetting AjaxControlID="radDataGrid">

 

 

 

 

 

<UpdatedControls>

 

 

 

 

 

<telerik:AjaxUpdatedControl LoadingPanelID="RadAjaxLoadingPanel1" UpdatePanelRenderMode="Block" ControlID="radDataGrid" />

 

 

 

 

 

</UpdatedControls>

 

 

 

 

 

</telerik:AjaxSetting>

 

 

 

 

 

<telerik:AjaxSetting AjaxControlID="radgridDataComponent">

 

 

 

 

 

<UpdatedControls>

 

 

 

 

 

<telerik:AjaxUpdatedControl LoadingPanelID="RadAjaxLoadingPanel1" UpdatePanelRenderMode="Block" ControlID="radgridDataComponent" />

 

 

 

 

 

</UpdatedControls>

 

 

 

 

 

</telerik:AjaxSetting>

 

 

 

 

 

</AjaxSettings>

 

 

 

 

 

</telerik:RadAjaxManager>

 

 

 

 

 

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server" Skin="Default">

 

 

 

 

 

</telerik:RadAjaxLoadingPanel>

 

 

 

 

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

Same settings on both grids as given below:

<

 

telerik:RadGrid ID="RadGrid1" Width="100%" runat="server" Skin="MyDefault"EnableEmbeddedSkins="false" ShowStatusBar="true" AllowFilteringByColumn="false" AllowSorting="true" AllowPaging="true" AutoGenerateColumns="false" MasterTableView-HeaderStyle-CssClass="mycssGrid">

 

 

Please advice.

Kuldeep

 

 

 

Pavlina
Telerik team
 answered on 24 Jun 2010
1 answer
161 views
Hello,

I have the following Toolbar. Depending on conditions that are evaluated in the databound event of a formview named "fv_ProjectData", I want to enable/disable some buttons. The problem is, that the buttons aren´t updated. The databound event fires as expected and the visible properties of the toolbar buttons are set correctly. But the buttons are updated only when clicking for example another button. What settings in the Ajax Manager are necessary that the formview updates the buttons.
 
Any ideas ?
Robert

       <telerik:RadToolBar ID="rtb_DataButtons" runat="server"  OnClientButtonClicking="ClientButtonClicking" OnButtonClick="rtbDataButtons_ButtonClick" AutoPostBack="True">  
                        <Items> 
                            <telerik:RadToolBarButton runat="server" Value="New" Text="New" ImageUrl="~/img/AddRecord.gif" CommandName="New">  
                            </telerik:RadToolBarButton> 
                            <telerik:RadToolBarButton runat="server" Value="Save" Text="Save" ImageUrl="~/img/Update.gif" CommandName="Save" > 
                            </telerik:RadToolBarButton> 
                            <telerik:RadToolBarButton runat="server" Value="Edit" Text="Edit" ImageUrl="~/img/Edit.gif" CommandName="Edit">  
                            </telerik:RadToolBarButton> 
                            <telerik:RadToolBarButton runat="server" Value="Cancel" Text="Cancel" ImageUrl="~/img/Cancel.gif" CommandName="Cancel" CausesValidation="False">  
                            </telerik:RadToolBarButton> 
                            <telerik:RadToolBarButton runat="server" Value="Delete" Text="Delete" ImageUrl="~/img/Delete.gif" CommandName="Delete" CausesValidation="False">  
                            </telerik:RadToolBarButton> 
                            <telerik:RadToolBarButton runat="server" Value="Separator_1" IsSeparator="true">  
                            </telerik:RadToolBarButton> 
                            <telerik:RadToolBarButton runat="server" Value="Print" Text="Print" ImageUrl="~/img/Print.gif" CommandName="Print">  
                            </telerik:RadToolBarButton> 
                        </Items> 
                    </telerik:RadToolBar> 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest" > 
    <AjaxSettings > 
        <telerik:AjaxSetting AjaxControlID="fv_ProjectData">  
                <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="fv_ProjectData"></telerik:AjaxUpdatedControl> 
                        <telerik:AjaxUpdatedControl ControlID="rtb_DataButtons"></telerik:AjaxUpdatedControl> 
                    </UpdatedControls> 
             </telerik:AjaxSetting>   
    </AjaxSettings> 
</telerik:RadAjaxManager>        
 

    Protected Sub fvProject_Databound(ByVal sender As Object, ByVal e As EventArgs)  
       <.. some code ...> 
 
       SetControls(sender)  
 
    End Sub  
 
  Sub SetControls(ByVal aFormview As FormView)  
        If aFormview Is Nothing Then  
            ToolbarBtn_New.Visible = True 
            ToolbarBtn_Edit.Visible = False 
            ToolbarBtn_Save.Visible = False 
            ToolbarBtn_Cancel.Visible = False 
            ToolbarBtn_Delete.Visible = False 
            ToolbarBtn_Separator1.Visible = False 
            ToolbarBtn_Print.Visible = False 
        Else  
            With aFormview  
        ToolbarBtn_New.Visible = (.CurrentMode = FormViewMode.ReadOnly)  
            ToolbarBtn_Edit.Visible = (.CurrentMode = FormViewMode.ReadOnly)  
        ToolbarBtn_Save.Visible = ((.CurrentMode = FormViewMode.Edit) Or (.CurrentMode = FormViewMode.Insert))  
end with  
end if  
 
 

Rosen
Telerik team
 answered on 24 Jun 2010
1 answer
273 views
Hi,
I'm trying to implement virtual scrolling, and it's working great, except that the currentpageindex doesn't update immediately..  I open the page, and it loads page 0.  Then I scroll down, the loading symbol shows, it displays data - same data as page 0.  If I hit 'refresh', it then loads the correct data.  Or, if I scroll down another page (so now the pager says I'm on page 2) it updates and shows me the page 1 data - it's one page behind.  Did I miss a rebind call?  I'm using NeedDataSource, though, and so I don't need to put that in there, right?

Here's my radgrid tag:

<telerik:RadGrid 
    id="RadGrid1" 
    runat="server" 
    ShowGroupPanel="True" 
    GridLines="None" 
    PageSize="20" 
    AllowPaging="True" 
    AllowCustomPaging="True" 
    AllowSorting="True" 
    GroupingEnabled="True" 
    Height="625px" 
    EnableViewState="True" 
    > 
    <PagerStyle Mode="NumericPages" /> 
    <MasterTableView 
        DataKeyNames="id_col" 
        AllowMultiColumnSorting="True" 
        AutoGenerateColumns="False" 
        CommandItemDisplay="Top" 
        ShowHeadersWhenNoRecords="True" 
        ShowFooter="true" 
        > 
        <CommandItemSettings ShowAddNewRecordButton="False"></CommandItemSettings> 
        <Columns> 
            <telerik:GridBoundColumn Visible="False" DataField="name" HeaderText="Name" UniqueName="name"></telerik:GridBoundColumn> 
            <telerik:GridBoundColumn Visible="False" DataField="classname" HeaderText="Class Name" UniqueName="classname"></telerik:GridBoundColumn> 
            <telerik:GridBoundColumn Visible="False" DataField="identifier" HeaderText="Identifier" UniqueName="identifier"></telerik:GridBoundColumn> 
        </Columns> 
    </MasterTableView> 
    <GroupingSettings ShowUnGroupButton="True"></GroupingSettings> 
    <SortingSettings SortToolTip="name" /> 
    <ClientSettings AllowDragToGroup="true"> 
            <Scrolling 
                AllowScroll="True" 
                EnableVirtualScrollPaging="True" 
                UseStaticHeaders="True" 
                SaveScrollPosition="True" /> 
    </ClientSettings> 
</telerik:RadGrid> 
 

And my vb NeedDataSource function:
Protected Sub RadGrid1_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource 
    Dim sql As String 
    Dim cmd As OracleCommand 
    Dim row_count As Integer = 1 
     
    ' Open connection 
    conn.Open() 
 
    ' Set up sql command 
    sql = "db_search" 
    cmd = New OracleCommand(sql, conn) 
    cmd.CommandType = CommandType.StoredProcedure 
 
    ' Add parameters 
    cmd.Parameters.Add("row_start", OracleDbType.Decimal, RadGrid1.CurrentPageIndex * RadGrid1.PageSize, ParameterDirection.Input) 
    cmd.Parameters.Add("row_end", OracleDbType.Decimal, (RadGrid1.CurrentPageIndex + 1) * RadGrid1.PageSize, ParameterDirection.Input) 
    cmd.Parameters.Add("db_cur", OracleDbType.RefCursor, ParameterDirection.Output) 
     
    ' Get row count (cut out this part for brevity, it does update it though) 
    Me.RadGrid1.VirtualItemCount = row_count 
 
    ' Set as the datasource 
    Dim da As New OracleDataAdapter(cmd) 
    Dim ds As New DataSet() 
    da.Fill(ds) 
    Me.RadGrid1.DataSource = ds 
 
    ' Cleanup 
    da.Dispose() 
    ds.Dispose() 
    conn.Close() 
End Sub 

I looked at this thread but it did not fix my issue, as well as various documentation for paging and virtual scrolling, and haven't found a solution yet.  Thanks in advance for any advice!


Martin
Telerik team
 answered on 24 Jun 2010
1 answer
294 views
Hi,

I have a telerik RadTabStrip inside ajax UpdatePanel in my web page and when i navigate between the tabs, i get this wiered error "Invalid JSON primitive". Below is the stack trace of this error.


Type System.ArgumentException
Source System.Web.Extensions
Method DeserializePrimitiveObject
Message Invalid JSON primitive: .
Trace at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializePrimitiveObject()
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth)
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer)
at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit)
at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize[T](String input)
at Telerik.Web.UI.RadMultiPage.LoadClientState(String state)
at Telerik.Web.UI.RadMultiPage.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection)
at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Please kindly help to resolve this issue ASAP since its a production issue now.

Thanks,
Krishna Samaga B.
T. Tsonev
Telerik team
 answered on 24 Jun 2010
3 answers
176 views
hi i am using edit template to edit the grid. In the edit template i used timepicker to select the time with interval of 15 minutes. But i need to restrict the start and end time of that timeview. When i set in design source it will work but when i tried in databound event not working
Akhil Raj
Top achievements
Rank 1
 answered on 24 Jun 2010
1 answer
158 views
I have a basic time entry grid, with a RadComboBox and a set of RadNumericTextBoxes. I want to be able to tab from the Combo, through the textboxes, then to the 'Insert' and 'Cancel' links that are inherent when Inserting with RadGrid. I set the tab order in the ItemDataBound event.  How can I programatically access the 'Insert' and 'Cancel' links in order to set the TabIndex for those?
protected void detailsGrid_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) 
        { 
      
            if (e.Item is GridEditableItem && e.Item.IsInEditMode) 
            { 
             
                GridEditableItem item = e.Item as GridEditableItem; 
                RadComboBox list = item.FindControl("List1") as RadComboBox; 
 
                list.TabIndex = 10; 
                    RadNumericTextBox tb = (RadNumericTextBox)edititem["day1"].Controls[0]; 
                    tb.Width = Unit.Pixel(intSize); 
                    tb.TabIndex = 11; 
                    RadNumericTextBox tb1 = (RadNumericTextBox)edititem["day2"].Controls[0]; 
                    tb1.Width = Unit.Pixel(intSize); 
                    tb1.TabIndex = 12; 
                    RadNumericTextBox tb2 = (RadNumericTextBox)edititem["day3"].Controls[0]; 
                    tb2.Width = Unit.Pixel(intSize); 
                    tb2.TabIndex = 13; 
                    RadNumericTextBox tb3 = (RadNumericTextBox)edititem["day4"].Controls[0]; 
                    tb3.Width = Unit.Pixel(intSize); 
                    tb3.TabIndex = 14; 
                    RadNumericTextBox tb4 = (RadNumericTextBox)edititem["day5"].Controls[0]; 
                    tb4.Width = Unit.Pixel(intSize); 
                    tb4.TabIndex = 15; 
                    RadNumericTextBox tb5 = (RadNumericTextBox)edititem["day6"].Controls[0]; 
                    tb5.Width = Unit.Pixel(intSize); 
                    tb5.TabIndex = 16; 
                    RadNumericTextBox tb6 = (RadNumericTextBox)edititem["day7"].Controls[0]; 
                    tb6.Width = Unit.Pixel(intSize); 
                    tb6.TabIndex = 17;
}
                    <telerik:RadGrid runat="server" Visible="true" ID="detailsGrid" MasterTableView-EditMode="EditForms"  
                        onneeddatasource="detailsGrid_NeedDataSource" Width="100%"  AllowSorting="true" 
                        MasterTableView-CommandItemDisplay="Bottom" ShowHeader="true" AutoGenerateColumns="False" 
                         OnItemDataBound="detailsGrid_ItemDataBound" EnableLinqExpressions="false" onupdatecommand="detailsGrid_UpdateCommand" 
                         oninsertcommand="detailsGrid_InsertCommand" onitemcommand="detailsGrid_ItemCommand"> 
                        <MasterTableView DataKeyNames="taskName,taskID,projectid" editmode="InPlace" width="100%" > 
                         <Columns>  
                             <telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Task" SortExpression="taskName"  
                                                         EditFormHeaderTextFormat="Task:<FONT COLOR=RED >  * </FONT>"  > 
                                <ItemTemplate> 
                                    <asp:Label id="Label1" runat="server" ToolTip=<%# DataBinder.Eval(Container.DataItem, "description") %>> 
                                    <%# DataBinder.Eval(Container.DataItem, "taskName") %> 
                                    </asp:Label> 
                               </ItemTemplate> 
                               <EditItemTemplate > 
                                   <telerik:RadComboBox id="List1" runat="server" AutoPostBack="true" OnSelectedIndexChanged="List1_SelectedIndexChanged"  /> 
                               </EditItemTemplate> 
                             </telerik:GridTemplateColumn> 
                             <telerik:GridNumericColumn DataField="day1" DataType="System.Decimal"  /> 
                             <telerik:GridNumericColumn DataField="day2" DataType="System.Decimal" /> 
                             <telerik:GridNumericColumn DataField="day3" DataType="System.Decimal" /> 
                             <telerik:GridNumericColumn DataField="day4" DataType="System.Decimal" /> 
                             <telerik:GridNumericColumn DataField="day5" DataType="System.Decimal" /> 
                             <telerik:GridNumericColumn DataField="day6" DataType="System.Decimal" /> 
                             <telerik:GridNumericColumn DataField="day7" DataType="System.Decimal" /> 
                              
                         </Columns>     
                    </MasterTableView> 
                    </telerik:RadGrid> 

Princy
Top achievements
Rank 2
 answered on 24 Jun 2010
4 answers
132 views
I've inherited some stylesheets from a client and apparently something in their css files is causing the effect that when you click on the PageSizeComboBox to expand it, it expands about 400 pixels to the right of where it should.  Is there any easy css fix I can use for this?  I'd rather not dig through their voluminous stylesheets if at all possible.

Thanks.

Laurie
Iana Tsolova
Telerik team
 answered on 24 Jun 2010
5 answers
807 views
I'm having issues with the placement of the LoadingPanel. For some reason, I am unable to get it to start in the top left corner of the screen. Instead, by default it loads up exactly where the updated control (the control specified in the controlid of the ajaxupdatedcontrol, in the RadAjaxManagerProxy) is.

I can get it to the top right corner by placing a div inside the LoadingPanel, and specifying its top and left css properties, however, when I do this (and also specify the opacity and filter properties too), the modal is transparent but the controls behind it disapear until the modal closes.

If I set the transparency property of the LoadingPanel, I can see the controls, but the modal is positioned where the updatedcontrol is

I also should mention that I'm using the RadAjaxManagerProxy and the modal in a custom Sitefinity module (I figure this is more of a LoadingPanel question than a Sitefinity question).

The panel that is being updated (the ajaxupdatedcontrol) wraps the content of the Module's Control Panel, and the Loading Panel by default is displayed in the top left corner of the Control Panel, to the right of the Command Panel, and under the navigation bar.

Here are two screenshots of my dilemma
http://www.carlj.ca/images/modal1.gif
This is what happens when I specify the transparency property of the RadAjaxLoadingPanel.

http://www.carlj.ca/images/modal2.gif
This is what happens when I don't use the transparency property. Notice that the controls in the middle dispapear?

Below is the code that I'm using. For screenshot #1, use as is. For screenshot #2, remove the transparency from the LoadingPanel

    <telerik:radajaxloadingpanel id="LoadingPanel1" transparency="25" runat="server"> 
        <div style="position: fixed; top: 0px; left: 0px; z-index: 98; height: 100%; width: 100%; background-color: black; opacity: 0.4; filter: alpha(opacity=40)"> 
         
        </div> 
        <div style="position: absolute; top: 0px; left: 0px; z-index: 99;height: 100%; width: 100%; "> 
            <div style="position: absolute;"> 
                <div style="position: absolute; z-index: 100; background-color: White;"> 
                    <asp:Label id="Label2" runat="server" ForeColor="Red">Loading... </asp:Label> 
                    <asp:Image id="Image1" runat="server" Width="224px" Height="48px" ImageUrl="Loading.gif"></asp:Image>     
                </div> 
            </div>   
        </div> 
    </telerik:radajaxloadingpanel> 

Thanks,
Carl J

http://www.carlj.ca/images/modal1.gif

Iana Tsolova
Telerik team
 answered on 24 Jun 2010
4 answers
133 views
Does anyone know of a way to reproduce the ConfirmText functionality that's available on GridButtonColumn controls for RadMenuItem controls?  I have a menu item that the user will click in order to delete something, but before proceeding with the delete operation I would like to ask the user to confirm in case they clicked the button by accident.  This is basic stuff, and I could use another means of doing this, but the menu item I want to use is the most convenient at this time.

Any ideas?

Thanks,
jeff
liu qingshui
Top achievements
Rank 1
 answered on 24 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?