Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
60 views
Hi all member
I want to change default font of RibbonBarApplicationMenuItem when skin of ribbon is WebBlue
please help to me
thanks
Princy
Top achievements
Rank 2
 answered on 12 Oct 2012
3 answers
226 views
HI  Telerik Support,

I am using RadGrid and filtering option is true on the columns.

Now let say I filter the one column by text. it filter data properly.

Now I want to clear the Filter persistence by clicking a button (which is outside the Grid).

Can somebody provide the solutions ASAP. I really need this.

Thanks
Nick

Shinu
Top achievements
Rank 2
 answered on 12 Oct 2012
0 answers
81 views
Hello, I have a RadTabStrip
This screen calls default.asp
It contains a button that calls the registration screen
This registration screen I have to put a message if the user clicks a tab, "you lost data"
I tried using the function OnClientTabSelecting
But I have to make sure that the User is in the registration screen, and not in default.aps
I tried to use session to store the value, but I noticed that javascript does not work
Would any idea to help me

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <link href="../css/SGTWebStyles.css" rel="stylesheet" type="text/css" />
    <telerik:RadCodeBlock ID="RadScriptBlock1" runat="server">
        <script type="text/javascript">
            var isTabClicked = "false";    


            function OnClientTabSelecting(sender, args) {
                isTabClicked = "false";
                var cadastre = '<%=Session("cadastre")%>';
                if (cadastre == true) {
                    if (isTabClicked == "false") {
                        //cancel the action 
                        args.set_cancel(true);
                        //get the tab which is clicked 
                        var tab = args.get_tab();


                        function CallBackFn(arg) {
                            if (arg) {
                                isTabClicked = "true";
                                tab.click();
                            }
                        }
                        //ask the user for confirmation                
                        radconfirm("Os dados informados serão perdidos, deseja continuar?", CallBackFn);
                    }
                }
            }
            function OnClientTabSelected() {
                //reset the isTabClicked variable
                isTabClicked = "false";
            }
          
        </script>
    </telerik:RadCodeBlock>
</head>
<body onload="window.history.forward();" class="BODY">
    <form runat="server" id="mainForm" method="post">   
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <telerik:RadWindowManager ID="RadWindowManager" runat="server" EnableShadow="true">
    </telerik:RadWindowManager>
    <asp:UpdatePanel ID="UpdatePanelProjeto" runat="server" RenderMode="Inline">
        <ContentTemplate>
            <div class="DivTab">
                <telerik:RadTabStrip ID="RadTabStripProjeto" runat="server" MultiPageID="RadMultiPageProjeto"
                    SelectedIndex="2" Align="Justify" ReorderTabsOnSelect="True" Width="600px" OnClientTabSelected="RadTabStripProjeto_TabSelected">
                    <Tabs>
                        <telerik:RadTab Text="Projetos Cadastrados" runat="server" Value="Cadastro">
                        </telerik:RadTab>
                        <telerik:RadTab Text="Função" Value="Função">
                        </telerik:RadTab>
                        <telerik:RadTab Text="Locais de Alocação" Value="Locais de Alocação" Selected="True">
                        </telerik:RadTab>
                        <telerik:RadTab Text="Equipe do Projeto" Value="Equipe do Projeto">
                        </telerik:RadTab>
                    </Tabs>
                </telerik:RadTabStrip>
                <telerik:RadMultiPage ID="RadMultiPageProjeto" runat="server" SelectedIndex="2" Height="100%"
                    CssClass="tabStrip">
                    <telerik:RadPageView ID="RadPageViewProjetosCadastrados" runat="server" Height="100%">
                    </telerik:RadPageView>
                    <telerik:RadPageView ID="RadPageViewFuncao" runat="server" Height="100%" Width="100%">
                    </telerik:RadPageView>
                    <telerik:RadPageView ID="RadPageViewLocaisAlocacao" runat="server" Height="100%">
                    </telerik:RadPageView>
                    <telerik:RadPageView ID="RadPageViewEquipeProjeto" runat="server" Height="100%">
                    </telerik:RadPageView>
                </telerik:RadMultiPage>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>


Code Behind
Imports Telerik.Web.UI
Partial Class projeto_Principal
    Inherits System.Web.UI.Page
    Dim cSinonimos As New ClassSGT.cSinonimos
    Dim vCadastro As String




#Region "Eventos "
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            Page.Title = "Dextera"
            If (Not IsNothing(Session("NOME"))) AndAlso (Session("NOME").ToString() <> String.Empty) Then
                ScriptManager.RegisterStartupScript(Me, Me.GetType(), "blockTabPaste", "if (top.location.pathname != '" & Request.ApplicationPath & "/Principal.aspx') {top.location = '" & Request.ApplicationPath & Application.Item("vDirecionaURLDireta") & "';}", True)
                cSinonimos.CarregaTelerik(RadTabStripProjeto)
                'RadTabStripProjeto.SelectedTab.PageView.ContentUrl = "../projeto/Default.aspx"


                If ClassSGT.cSession.aplicaPermissoesAbas("Projetos", RadTabStripProjeto, Session("NOME").ToString()) Then
                    RadTabStripProjeto_TabClick(RadTabStripProjeto, New RadTabStripEventArgs(RadTabStripProjeto.SelectedTab))
                Else
                    Response.Redirect("../AcessoNegado.aspx")
                End If
            Else
                ScriptManager.RegisterStartupScript(Me, Me.GetType(), "loggin", Application.Item("vDirecionaLogin"), True)
            End If
        End If
    End Sub
#End Region


    Protected Sub RadTabStripProjeto_TabClick(sender As Object, e As Telerik.Web.UI.RadTabStripEventArgs) Handles RadTabStripProjeto.TabClick
        If e.Tab.PageView.ID = "RadPageViewProjetosCadastrados" Then
            e.Tab.PageView.ContentUrl = "../projeto/Default.aspx"
        ElseIf e.Tab.PageView.ID = "RadPageViewFuncao" Then          
                 e.Tab.PageView.ContentUrl = "../projeto/Funcao.aspx"          
        ElseIf e.Tab.PageView.ID = "RadPageViewLocaisAlocacao" Then
            e.Tab.PageView.ContentUrl = "../projeto/LocalAlocacao.aspx"
        ElseIf e.Tab.PageView.ID = "RadPageViewEquipeProjeto" Then
            e.Tab.PageView.ContentUrl = "../projeto/EquipeProjeto.aspx"
        End If
    End Sub
End Class


Button in ../projeto/Default.aspx"
Protected Sub btnNovo_Click(sender As Object, e As System.EventArgs) Handles btnNovo.Click
        Try
            lblError.Text = ""
            Session("cadastre") = True
            Response.Redirect("..\projeto\DefaultCadastro.aspx?vComando=Novo")
        Catch ex As Exception
            lblError.Text = ex.Message
        End Try
    End Sub


Please help me, I'm desperate, excuse the English because I'm from Brazil and do not have much knowledge
Davi
Top achievements
Rank 1
 asked on 11 Oct 2012
0 answers
90 views
Is there a quick way to figure out if the fields under the tab changed either by mouse or via keyboard etc when I change the tab. Does Telerik provide a way to track if fields changed for that particular tab?

For ex;
If there are 3 tabs
First, Second and Third

If I change it to Second tab...is there a way to determine what changed on First tab?

Using Javascript I know that I can compare the values with default values

The no of fields can vary on the first tab...it can have about 4 or 18 fields on the First tab and 15 fields on the second tab...I want to track whenever something changed on a tab in order to determine whether to save the data or not.

Please reply asap

Thanks in advance!

Jinisha
Jinisha
Top achievements
Rank 1
 asked on 11 Oct 2012
13 answers
129 views
4 answers
101 views
Which is the client event fired when selecting TimeSlots? I tried with OnClientTimeSlotClick but it doesn't seem to fire.
Thanks!
Veena
Top achievements
Rank 1
 answered on 11 Oct 2012
1 answer
456 views
Is there a way to prohibit default RadGrid CSS classes from being output to the markup? For example I can set my
HeaderStyle
for a column as a CSS class, but then it gets appended with a default RadGrid class like rgHeader or rgGroupCol. I would like this to not happen because when exporting to Excel, when I apply my custom CSS to the RadGrid on the HTMLExporting event, any RadGrid cells that have multiple classes on the like - class="MyCustomCSSClass rgHeader" do not get their styles applied. If I set the CSS class of a cell on ItemDataBound this solves the problem and the default RadGrid classes are not output, but is there a way to make sure no RadGrid default CSS classes are added to any part of the grid?
Jayesh Goyani
Top achievements
Rank 2
 answered on 11 Oct 2012
1 answer
78 views
Hello

I have a radgrid that has drag to select enabled. There is a postback on clicking a row but not when i use drag to select rows. Is there a way to postback on drag select

Any help or other solutions will be appreciated
Jayesh Goyani
Top achievements
Rank 2
 answered on 11 Oct 2012
2 answers
85 views
I bound RadGrdid with objectdatasource control. While I filter the record, I found the total record is not correct. For example:
Before filter record, the total record is 32. After filter and bind grid again, the displayed total record is 10. In fact, the total record should be 17. I debug my code and found the GetTotalRecordCount also return 17 instead 10. The following is my code:

aspx:
<telerik:RadPageView ID="RadPageViewRule" runat="server">
                <div style="padding-left: 25px; padding-top: 30px">
                    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanelRule" runat="server" />
                    <telerik:RadGrid runat="server" ID="RadGridRule" AutoGenerateColumns="False" CellSpacing="0"
                        Width="850px" GridLines="None" DataSourceID="ObjectDataSourceRule" AllowPaging="true"
                        AllowFilteringByColumn="true" ShowStatusBar="false">
                        <ClientSettings EnableRowHoverStyle="true">
                            <Selecting AllowRowSelect="true" />
                        </ClientSettings>
                        <MasterTableView DataKeyNames="RuleId" CommandItemDisplay="Top">
                            <Columns>
                                <telerik:GridTemplateColumn ItemStyle-HorizontalAlign="Center" AllowFiltering="false"
                                    HeaderStyle-Width="20px" HeaderText="Action">
                                    <ItemTemplate>
                                        <asp:ImageButton runat="server" ImageUrl="~/Resource/Images/edit.png" ID="ImageButtonEdit" />
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn HeaderText="S/N" HeaderStyle-Width="20px" AllowFiltering="false"
                                    ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <%# Container.DataSetIndex+1 %>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn HeaderText="PV Type" HeaderStyle-Width="100px" DataField="RuleType"
                                    UniqueName="RuleType">
                                    <FilterTemplate>
                                        <telerik:RadComboBox runat="server" Width="100px" ID="RadComboBoxRuleTypeFilter"
                                            OnClientSelectedIndexChanged="FieldRuleTypeIndexChanged">
                                        </telerik:RadComboBox>
                                        <telerik:RadScriptBlock ID="RadScriptBlockRuleType" runat="server">
                                            <script type="text/javascript">
                                                function FieldRuleTypeIndexChanged(sender, args) {
                                                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                                    tableView.filter("RuleType", args.get_item().get_value(), "EqualTo");
                                                }
                                            </script>
                                        </telerik:RadScriptBlock>
                                    </FilterTemplate>
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn HeaderText="Function Name" DataField="FunctionId" UniqueName="FunctionId"
                                    HeaderStyle-Width="150px">
                                    <FilterTemplate>
                                        <telerik:RadComboBox runat="server" Width="150px" ID="RadComboBoxFunctionFilter"
                                            OnClientSelectedIndexChanged="FieldFunctionNameIndexChanged">
                                        </telerik:RadComboBox>
                                        <telerik:RadScriptBlock ID="RadScriptBlockFunctionName" runat="server">
                                            <script type="text/javascript">
                                                function FieldFunctionNameIndexChanged(sender, args) {
                                                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                                    tableView.filter("FunctionId", args.get_item().get_value(), "EqualTo");


                                                }
                                            </script>
                                        </telerik:RadScriptBlock>
                                    </FilterTemplate>
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="RuleExpression" HeaderStyle-Width="370px" AllowFiltering="false"
                                    HeaderText="Rule Expression" HtmlEncode="true">
                                </telerik:GridBoundColumn>
                                <telerik:GridButtonColumn ConfirmText="Do you confirm to delete the record?" ConfirmDialogType="RadWindow"
                                    ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" ConfirmDialogHeight="150px"
                                    HeaderText="Delete" ConfirmDialogWidth="320px" ItemStyle-Width="30px">
                                    <ItemStyle HorizontalAlign="Center" />
                                </telerik:GridButtonColumn>
                            </Columns>
                        </MasterTableView>
                        <ClientSettings>
                            <Selecting AllowRowSelect="true" />
                        </ClientSettings>
                        <PagerStyle AlwaysVisible="true" />
                    </telerik:RadGrid>
                    </telerik:RadAjaxLoadingPanel>
                    <asp:ObjectDataSource ID="ObjectDataSourceRule" runat="server" EnablePaging="true"
                        OnSelecting="ObjectDataSourceRule_Selecting" SelectCountMethod="GetTotalRecord"
                        SelectMethod="GetRuleData" TypeName="BTSIS.Business.MaintainRuleBC">
                        <SelectParameters>
                            <asp:Parameter Name="filterExpressions" Type="String" ConvertEmptyStringToNull="true" />
                        </SelectParameters>
                    </asp:ObjectDataSource>


CS code:
   protected void ObjectDataSourceRule_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
        {
            if (e.ExecutingSelectCount) return;
            
            string expression = RadGridRule.MasterTableView.FilterExpression;


            if (!expression.Contains("RuleType") && expression.Contains("FunctionId"))
            {
                expression = string.Empty;
            }


            RadGridRule.MasterTableView.FilterExpression = expression;
            e.InputParameters["filterExpressions"] = expression;


            if (e.Arguments.MaximumRows == int.MaxValue) e.Arguments.MaximumRows = this.RadGridRule.MasterTableView.PageSize;            
        }
Angel Petrov
Telerik team
 answered on 11 Oct 2012
1 answer
69 views

So far I've not seen this problem anywhere else, and all of the other developers who have a lot more experience with this than I have never seen it either.

I have a grid on a .aspx page, that has data associated with it.  When the page loads there is a VERY small area for the data grid lines(turns out it is 10px).  When I right-click and "refresh" the page, the grid is correctly showing (170px).  The area for the grid appears to be rendering fine, and actually the grid area itself appears to be the correct size, just the data lines (and a miniture scrollbar) show on the initial load, the page refresh shows it just fine. When I debug the page, the correct data is in the grid.

Here is the radWindow definition for the page: 

<rad:RadWindow ID="ctlEmailSubmittals" runat="server" ClientCallBackFunction="RadWindowCallBack"  

Height="700px" Left="" Modal="true" SkinsPath="~/RadControls/Window/Skins"  

Title="Submittal Generated" Top="" VisibleStatusbar="False" Width="1200px"  

Behavior="Close" /> 


And the html:

<form i

d="form1" runat="server"

 

<rad:RadAjaxManager ID="ctlAjaxMgr" runat="server">   

 

<AjaxSettings>  

 

<rad:AjaxSetting AjaxControlID="ctlAjaxMgr">  

 

<UpdatedControls>  

 

<rad:AjaxUpdatedControl ControlID="rgEmailAddresses" />  

 

</UpdatedControls>  

 

</rad:AjaxSetting>  

 

<rad:AjaxSetting AjaxControlID="rgEmailAddresses">  

 

<UpdatedControls>  

 

<rad:AjaxUpdatedControl ControlID="rgEmailAddresses" />  

 

</UpdatedControls>  

 

</rad:AjaxSetting>  

 

<rad:AjaxSetting AjaxControlID="ctlABLDirtyFlagLite" />  

 

</AjaxSettings> 

 

<ClientEvents OnRequestStart="DoRequestStartEvents();" OnResponseEnd="DoResponseEndEvents();" />  

 

</rad:RadAjaxManager>  


...some other html for other parts of the page:
then the grid definition: 

<tr>  

 

<td> 

 

<span>TO:</span>  

 

<rad:RadGrid ID="rgEmailAddresses" runat="server" AutoGenerateColumns="False" Skin="ABL_Std"  

 

DataSourceID="odsContacts" AllowMultiRowSelection="True" Height="170px">  

<MasterTableView CommandItemDisplay="Top" TableLayout="Fixed">  

 

<RowIndicatorColumn Visible="False">  

 

</RowIndicatorColumn>  

 

<Columns>  

 

<rad:GridTemplateColumn UniqueName="SELECT">  

 

<HeaderStyle Width="22px" />  

 

<HeaderTemplate>  

 

<asp:CheckBox ID="chkHeaderSelect" runat="server" onclick="SelectAllCheckedChanged();" />  

 

</HeaderTemplate>  

 

<ItemTemplate>  

 

<asp:CheckBox ID="chkSelect" runat="server" onclick="SingleCheckboxCheckedChanged();" /> 

 

</ItemTemplate>  

 

</rad:GridTemplateColumn>  

 

<rad:GridBoundColumn DataField="COMPANY_TYPE" DataType="System.String" HeaderText="Company Type"  

 

ReadOnly="True" SortExpression="COMPANY_TYPE" UniqueName="company_type">  

 

<HeaderStyle Width="142px" />  

 

</rad:GridBoundColumn>  

 

<rad:GridBoundColumn DataField="COMPANY" DataType="System.String" HeaderText="Company"  

 

ReadOnly="True" UniqueName="company">  

 

<HeaderStyle Width="170px" />  

 

</rad:GridBoundColumn>  

 

<rad:GridBoundColumn DataField="COMPANY_CONTACT_DATA" DataType="System.String" HeaderText="Contact"  

 

ReadOnly="True" UniqueName="company_contact_data">  

 

<HeaderStyle Width="145px" />  

 

</rad:GridBoundColumn>  

 

<rad:GridBoundColumn DataField="CONTACT_EMAIL_ADDRESS" DataType="System.String" HeaderText="Email Address"  

 

ReadOnly="True" UniqueName="contact_email_address"

 

<HeaderStyle Width="175px" />  

 

</rad:GridBoundColumn>  

 

</Columns>  

 

<CommandItemTemplate>  

 

<div>  

 

<a href="javascript:void(0);" onclick="AddSelectedEmails();">Add Emails</a>  

 

</div> 

 

</CommandItemTemplate>  

 

<NoRecordsTemplate>  

 

<asp:Label ID="label1" Text="No records to display." runat="server"></asp:Label>  

 

</NoRecordsTemplate>  

 

</MasterTableView>  

 

<ClientSettings> 

 

<Selecting AllowRowSelect="False" /> 

 

<Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="170px" />  

</ClientSettings>  

 

</rad:RadGrid>  

 

</td>  

 

</tr> 


Anyone have any idea of what may be going on?  Been fighting this one for a couple of days now.

Thanks.
Rich
Pavlina
Telerik team
 answered on 11 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?