Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
178 views
Hello,
I'm having a problem with a RadSplitter displaying properly in firefox ( I'm testing in version 3.6).  In IE it displays to the full height of 100%. In Firefox it displays to about 50% of the page.  Funny thing is if I set the RadSplitter to a fixed height of say 700px instead of 85% it looks fine.  We prefer  not to set the height to a fixed value and use percentages instead.
Code below:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<style type="text/css">
        .StdFont {FONT-SIZE: 11px; FONT-FAMILY: Arial; vertical-align: top;}        
        .BoldFont {FONT-WEIGHT: bold; FONT-SIZE: 11px; FONT-FAMILY: Arial; vertical-align: top; padding-right:5px}
        .TableBase { width: 100%;}
        .Textfont{FONT-FAMILY:Arial;FONT-SIZE:11px;}
        .ReqFont{FONT-SIZE: 0.9em; FONT-FAMILY: Arial; FONT-WEIGHT:Bold;}
        .AjaxLoadingPanelBackground { height: 100%; background:#fff; } 
        .AjaxLoadingPanel { margin-top: 25px; } 
</style>
<html xmlns="http://www.w3.org/1999/xhtml" style="height:100%; margin=0px;">
<head runat="server">
    <title>My Maintenance</title>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> 
</head>
<body style="margin:0px;height:100%;overflow:hidden; cursor:default;"  >
    <form id="form1" runat="server">
 <script language="javascript" type="text/javascript">
      
    function checkallList(source)
    {      
        var lbl = source.nextSibling;
        var chkBoxlist = <%=lblBranchSelection.ClientID %>;
        var chkBoxCount = chkBoxlist.getElementsByTagName("input");
        var i;
        for(i = 0; i < chkBoxCount.length; i++)
        {
            if (source.checked)
            {
                lbl.innerHTML = 'Deselect All'
                chkBoxCount[i].checked = true;
            
            else 
            {
                lbl.innerHTML = 'Select All'
                chkBoxCount[i].checked = false;
            }
       }
    
</script>
<rad:RadScriptManager runat="server" ID="radSM" AsyncPostBackTimeout="3600"></rad:RadScriptManager>
    <cc1:header id="Header1" title="My Maintenance" runat="server"></cc1:header>
    <asp:Panel ID="pnlMain" runat="server">
    <div>        
    <rad:RadSplitter runat="server" id="RadSplitter1"  Orientation="Vertical" width="98%" height="85%" LiveResize="True" HeightOffset="10" VisibleDuringInit="false" >
         <rad:RadPane runat="server" id="LeftPane" width="2%"  Collapsed="false">            
            <rad:RadSlidingZone ID="RadSlidingZone2" runat="server"  ExpandedPaneId="RadSlidingPane1" DockedPaneId="RadSlidingPane1">            
            <rad:RadSlidingPane ID="RadSlidingPane1" runat="server"  EnableDock="true"  MinWidth="355"
                CollapseMode="Both" Title="Filter" TabView="TextOnly" Width="380px" >
            <asp:Panel ID="pnlHolder" runat="server">
            <vpw:MyLink ID="lnkMy" runat="server"  Type="MyPage" />            
            <br />
                <asp:Panel id="pnlSelection" Width="95%" HorizontalAlign="Center" Runat="server" GroupingText="Filter Criteria" CssClass="BoldFont">
                <br />
                    <table cellspacing="0" cellpadding="0" width="100%">
                        <tr>
                            <td valign="top" width="20%" align="left"></td>
                            <td ></td>
                        </tr>
                        <tr>
                            <td valign="top" width="20%" align="left">
                                <asp:Label id="lblDepts" Runat="server" CssClass="BoldFont">Department:</asp:Label></td>
                            <td valign="top" align="left">
                                <asp:dropdownlist ID="ddlDepts" runat="server" CssClass="StdFont">
                                </asp:dropdownlist></td>
                        </tr>                                   
                        <tr>
                            <td valign="top" align="left">
                                <asp:Label id="lblBranch" Runat="server" CssClass="BoldFont" > Branch:</asp:Label></td>
                            <td valign="top" align="left">
                                <asp:Panel ID="pnlBranchList" runat="server"  Width="95%" Height="150px" ScrollBars="Auto">
                                    <asp:CheckBoxList ID="lblBranchSelection" runat="server"                                       
                                        Width="93%"  BorderWidth="1" BorderStyle="Solid" CssClass="StdFont" Font-Bold="false" >                             
                                    </asp:CheckBoxList>
                                     <asp:CheckBox ID="chkSelectAllList" runat="server" onclick="javascript:checkallList(this)" Text="Select All" />                                   
                                </asp:Panel>
                            </td>
                        </tr>              
                        <tr>
                            <td valign="top" align="left"
                                 </td>
                            <td valign="top" align="left"
                                </td>
                        </tr>                  
                   </table>
                </asp:Panel
                <br />
                <asp:Panel ID="pnlFilter" Runat="server" Width="90%" HorizontalAlign="Center"  GroupingText="Additional Filter Criteria" CssClass="BoldFont">
                    <br />
                    <table cellspacing="0" cellpadding="0" width="100%">                               
                        <tr>
                            <td valign="top" align="right" >
                                <asp:Label id="Label1" Runat="server" CssClass="BoldFont">Status: </asp:Label></td>
                            <td valign="top" align="left">                                  
                                    <asp:CheckBoxList ID="chklstStatus" runat="server"                                         
                                        Width="93%"  BorderWidth="2" BorderStyle="Inset"
                                        CssClass="StdFont" Font-Bold="false">                               
                                    </asp:CheckBoxList>
                                <%--</asp:Panel>--%>                           
                            </td>                                           
                        </tr>                      
                        </table>                    
                </asp:Panel
                <asp:Panel ID="pnlButton" runat="server">
                    <table>
                        <tr>                           
                            <td valign="top" align="left">                      
                                <asp:Button ID="btnRefreshGrid" runat="server" Text="Refresh Grid"  OnClick="btnRefreshGrid_Click"  >
                                </asp:Button >                              
                                </td>
                        </tr>
                                        </table>
                </asp:Panel>
            </asp:Panel
            </rad:RadSlidingPane>
            </rad:RadSlidingZone>
         </rad:RadPane>
         <rad:RadSplitBar runat="server" id="RadSplitBar1" />
         <rad:RadPane runat="server" id="RightPane"  Width="100%">
           <rad:RadSplitter runat="server" id="InnerSplitter" Orientation="Horizontal" LiveResize="true" >
             <rad:RadPane runat="server" id="TopPane" Height="30%" Width="98%">
             <asp:Panel id="pnlGrid" Width="98%" HorizontalAlign="Center" Runat="server" borderwidth="0px" Height="98%">            
                <rad:RadGrid id="RadGrid1"                                                                                                                                 
                        ShowStatusBar="false" 
                        runat="server" 
                        AllowPaging="True" 
                        AllowSorting="True"
                        AllowMultiRowSelection="False" 
                        AutoGenerateColumns="false"                                                                                                                                                 
                        EnableViewState="true" 
                        OnNeedDataSource="RadGrid1_NeedDataSource" 
                        OnItemCommand="RadGrid1_ItemCommand"                                                                                             
                        Width="100%"   Height="100%"  Skin="Windows7" AllowFilteringByColumn="true"  EnableLinqExpressions="false">
                        <MasterTableView  Width="98%" TableLayout="Fixed"  EnableViewState="true"  CommandItemDisplay="None"  >
                            <Columns>    
                                <rad:GridTemplateColumn UniqueName="CheckBoxTemplateColumn" 
                                    HeaderStyle-Width="3%" 
                                    AllowFiltering="false"
                                    Resizable="false">                                    
                                    <ItemTemplate>
                                        <asp:CheckBox id="CheckBox1" OnCheckedChanged="ToggleRowSelection" AutoPostBack="True" runat="server"></asp:CheckBox>
                                    </ItemTemplate>
                                </rad:GridTemplateColumn
                                <rad:GridButtonColumn UniqueName="GridNewList" 
                                    ButtonType="ImageButton" 
                                    CommandName="NewList"
                                    HeaderStyle-Width="5%"  
                                    HeaderText="Add Rule"                                   
                                    Resizable="false" 
                                    ImageUrl="Images\Plus.png" >                                
                                </rad:GridButtonColumn>
                                <rad:GridBoundColumn                                     
                                    DataField="PublicKey" 
                                    DataType="System.String" 
                                    HeaderText="ID"    
                                    Visible="True"                                                   
                                    UniqueName="PublicKey"
                                    HeaderStyle-Width="55px"
                                    AllowFiltering="true" 
                                    Resizable="true" 
                                    HeaderStyle-HorizontalAlign="Center" 
                                    ItemStyle-HorizontalAlign="Center" >
                                    <ItemStyle />
                                </rad:GridBoundColumn
                                <rad:GridBoundColumn                                     
                                    DataField="Key" 
                                    DataType="System.Int32" 
                                    HeaderText=" ID Key"    
                                    Visible="False"                                                   
                                    UniqueName="Key"
                                    HeaderStyle-Width="30px"
                                    AllowFiltering="false" 
                                    Resizable="false">
                                    <ItemStyle />
                                </rad:GridBoundColumn>                                                                                  
                                <rad:GridBoundColumn 
                                    DataField="Name" 
                                    DataType="System.String" 
                                    HeaderText="Name"                                                       
                                    UniqueName="Name"     
                                    HeaderStyle-HorizontalAlign="Center" 
                                    ItemStyle-HorizontalAlign="Center" 
                                    HeaderStyle-Width="15%" 
                                    AllowFiltering="true">
                                    <ItemStyle />
                                </rad:GridBoundColumn
                                <rad:GridBoundColumn 
                                    DataField="Status" 
                                    DataType="System.String" 
                                    HeaderText=" Status"                                                       
                                    UniqueName="Status" 
                                    HeaderStyle-HorizontalAlign="Center" 
                                    ItemStyle-HorizontalAlign="Left" 
                                    HeaderStyle-Width="40px" 
                                    AllowFiltering="false"
                                    Visible="true"
                                    Resizable="false">
                                    <ItemStyle />
                                </rad:GridBoundColumn>                                                                                              
                            </Columns>                           
                        </MasterTableView>
                        <ClientSettings EnableRowHoverStyle="true" 
                                        Resizing-AllowColumnResize="true"
                                        Resizing-AllowRowResize="false"  
                                        Resizing-EnableRealTimeResize ="false"                                                     
                                        Resizing-ClipCellContentOnResize ="false"                                         
                                        AllowColumnsReorder="true"
                                        EnablePostBackOnRowClick="true" >                                                    
                            <Scrolling AllowScroll ="true" UseStaticHeaders="true"  />                                                                 
                        </ClientSettings>
                        <PagerStyle   Mode="NextPrevAndNumeric" Height="10px"  VerticalAlign="Bottom" Position="Bottom"></PagerStyle>
                    </rad:RadGrid>        
                </asp:Panel>        
             </rad:RadPane>
             <rad:RadSplitBar runat="server" id="RadSplitBar2" EnableResize="true"  Height="100%"/>
             <rad:RadPane runat="server" id="BottomPane" Width="98%" >
                <iframe id="frm1" runat="server" width="100%" height="100%" frameborder="0"></iframe>
             </rad:RadPane>
           </rad:RadSplitter>
         </rad:RadPane>         
        </rad:RadSplitter>         
     </div>
    </asp:Panel>
    <cc1:footer id="Footer1" runat="server" Height="11px" ></cc1:footer>       
    </form>    
</body>
</html>

Please advise on what I'm missing. thanks.
Dobromir
Telerik team
 answered on 29 Aug 2011
6 answers
178 views
I am using RabTabStrip.Net2.dll v3.6.6.  I would like the tab to be bottom to top, why following code shows the same orientation as I use TopToBottom?

<

radts:radtabstrip id="tab" Orientation="HorizontalBottomToTop" Runat="server" AutoPostBack="True" SelectedIndex="0" Skin="WebBlue">

<Tabs>

<radts:Tab Text="Tab1" ID="Tab1" Width="100"></radts:Tab>

<radts:Tab Text="Tab2" ID="Tab2" Width="100"></radts:Tab>

<radts:Tab Text="Tab3" ID="Tab3" Width="100"></radts:Tab>

<radts:Tab Text="Tab4" ID="Tab4" Width="100"></radts:Tab>

</Tabs>

</

radts:radtabstrip>

Dhiyanes
Top achievements
Rank 1
 answered on 29 Aug 2011
1 answer
137 views
Hi, 
I've been trying out the  telerik control and  realized that the ClientDataString method is  not  available any more in the RadComboBoxItemsRequestedEventArgs class. 

I am working on a migration project from old telerik control to newer one, I am using version 2011.2.712.35, what is the  alternate method that I should use. 

Cheers 

       
Shinu
Top achievements
Rank 2
 answered on 29 Aug 2011
2 answers
155 views
Hi,

I have several boundcolumn, numeric column, and datetime columns. I need make these columns a required field during inplace editing.

please send directions.

thanks,
Minh Bui
Minh
Top achievements
Rank 1
 answered on 29 Aug 2011
1 answer
140 views
<telerik:RadGrid ID="RadGrid1" runat="server" 
    OnNeedDataSource="RadGrid1_NeedDataSource" Skin="Default">
    <MasterTableView AutoGenerateColumns="true">
    </MasterTableView>
</telerik:RadGrid>
Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs)
     Dim dt As DataTable
     If Session("dt") Is Nothing Then
         dt = New DataTable()
         dt.Columns.Add("money")
         For i As Integer = 1 To 10
             dt.Rows.Add(i)
         Next
         Session("dt") = dt
     Else
         dt = TryCast(Session("dt"), DataTable)
     End If
     RadGrid1.DataSource = dt
 End Sub

How do I format the money column to US currency or any of other formats available in radgrid?  Thanks

Princy
Top achievements
Rank 2
 answered on 29 Aug 2011
1 answer
63 views
How can i make a row select on checking the checkbox?
Princy
Top achievements
Rank 2
 answered on 29 Aug 2011
1 answer
69 views
I have a radgrid in which i have set allowfilteringbycolumn as true.How can i set focus in the filterbox after filtering
Shinu
Top achievements
Rank 2
 answered on 29 Aug 2011
2 answers
119 views
Hi Telerik,

I'm using RadGrid Q2 2011, now I want to add more PagerSize in RadGrid,
Default is {10, 20, 50}, I want add more like {10, 20, 50, 100, 150, ...}
Please show me the way to do this.
Thanks
VnDevil
Top achievements
Rank 2
 answered on 29 Aug 2011
4 answers
683 views

I have a child grid on a page.

In it's declaration I have added a call to the event handler "OnItemDataBound".
OnItemDataBound="rgContacts_ItemDataBound"

Back in the code behind I have this..

protected void rgContacts_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridDataItem && e.Item.OwnerTableView.DataSourceID == "dsContacts")
    {
        Literal ltPrimaryContact = e.Item.FindControl("ltPrimaryContact") as Literal;
 
 
    }
}

If there are 2 rows in the Contacts grid, then this method gets called twice as you would expect.

Furthermore, the IF condition is true in both cases.

However if I put a break point on the line within the IF condition, and in the watch window examine the value of...
e.Item.OwnerTableView.Items[e.Item.ItemIndex]

I get this error...

'e.Item.OwnerTableView.Items[e.Item.ItemIndex]' threw an exception of type 'System.ArgumentOutOfRangeException'    Telerik.Web.UI.GridDataItem {System.ArgumentOutOfRangeException}

Needless to say, if I try this...

e.Item.OwnerTableView.Items[e.Item.ItemIndex]["con_Phone"].Text

Where 'con_Phone' is one of the values from the grid, I get the same error.

I am unable to extract any of the values in the current row.

I am using the code on this Telerik page. Alas it does not work.

http://www.telerik.com/help/aspnet-ajax/grid-extract-primary-key-for-parent-item-in-hierarchy-on-update-insert.html

What am I missing here?

Thanks.

Brad












Brad
Top achievements
Rank 1
 answered on 29 Aug 2011
6 answers
658 views
Hello,

I read a couple of articles and forum threads about applying a dropdownlist (combobox) as a filter option in RadFilter.

The samples uses a DataSource in the page though, while I want to use the OnNeedDataSource for the grid and the FilterContainerID for the RadFilter to automatically show filter field.

Here is what I got to far, so I don't get any errors:

<telerik:RadGrid ID="rgTasks" runat="server" OnNeedDataSource="rgTasks_OnNeedDataSource"
    EnableViewState="false" AutoGenerateColumns="false" Skin="WebBlue" PageSize="10"
    EnableLinqExpressions="true" AllowPaging="true" AllowSorting="true" AllowFilteringByColumn="true"
    ShowStatusBar="true">
    <PagerStyle AlwaysVisible="true" Position="Top" Width="100%" />
    <MasterTableView DataKeyNames="OID" ClientDataKeyNames="OID" IsFilterItemExpanded="false">
        <SortExpressions>
            <telerik:GridSortExpression FieldName="Startdatum" SortOrder="Ascending" />
        </SortExpressions>
        <Columns>
            <telerik:GridBoundColumn DataField="OID" HeaderText="OID" Visible="false" AllowFiltering="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Volgnummer" HeaderText="Volgnummer" Visible="false"
                UniqueName="Volgnummer" AllowFiltering="true">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Taak" HeaderText="Dossier" DataType="System.String"
                UniqueName="Taak" AllowFiltering="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Status" HeaderText="Status" DataType="System.String"
                UniqueName="Status">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Startdatum" HeaderText="Startdatum" HeaderStyle-Width="110px"
                DataFormatString="<nobr>{0:dd/MM/yyyy}</nobr>" UniqueName="Startdatum" AllowFiltering="true">
            </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
    <ClientSettings EnableRowHoverStyle="true">
        <ClientEvents OnRowClick="rowClick" />
        <Resizing AllowColumnResize="true" />
        <Selecting AllowRowSelect="true" />
        <DataBinding EnableCaching="true">
        </DataBinding>
    </ClientSettings>
</telerik:RadGrid>
<p>
    Filter toepassen:</p>
<br />
<telerik:RadFilter ID="radFilter" runat="server" ExpressionPreviewPosition="Bottom"
    OnFieldEditorCreating="RadFilter1_FieldEditorCreating" OnApplyExpressions="RadFilter1_ApplyExpressions"
    Localization-FilterFunctionBetween="Tussen" Localization-FilterFunctionContains="Bevat"
    Localization-FilterFunctionDoesNotContain="Bevat Niet" Localization-FilterFunctionEndsWith="Eindigt op"
    Localization-FilterFunctionEqualTo="Gelijk aan" Localization-FilterFunctionGreaterThan="Groter dan"
    Localization-FilterFunctionGreaterThanOrEqualTo="Groter dan of gelijk aan" Localization-FilterFunctionIsEmpty="Is Leeg"
    Localization-FilterFunctionIsNull="Ongedefinieerd" Localization-FilterFunctionLessThan="Kleiner dan"
    Localization-FilterFunctionLessThanOrEqualTo="Kleiner dan of gelijk aan" Localization-FilterFunctionNotBetween="Niet tussen"
    Localization-FilterFunctionNotEqualTo="Niet gelijk aan" Localization-FilterFunctionNotIsEmpty="Is niet leeg"
    Localization-FilterFunctionNotIsNull="Is niet ongedefinieerd" Localization-FilterFunctionStartsWith="Begint met"
    Localization-GroupOperationAnd="En" Localization-GroupOperationNotAnd="En niet"
    Localization-GroupOperationNotOr="Of niet" Localization-GroupOperationOr="Of"
    AddExpressionToolTip="Expressie toevoegen" AddGroupToolTip="Groepering toeveoegen"
    ApplyButtonText="Toepassen" BetweenDelimeterText="en" Culture="nl-NL" RemoveToolTip="Verwijderen"
    ShowLineImages="true" SettingsFormatter="BinaryFormatter">
    <FieldEditors>
        <custom:radfilterdropdowneditor datatextfield="Status" datavaluefield="Status" fieldname="Status"
            datatype="System.String" displayname="Status" />
    </FieldEditors>
</telerik:RadFilter>

Code behind:

protected void rgTasks_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        DataTable dt = new DataTable();
        dt.Columns.Add("OID", typeof(long));
        dt.Columns.Add("Taak", typeof(string));
        dt.Columns.Add("Startdatum", typeof(DateTime));
        dt.Columns.Add("Status", typeof(string));
        dt.Columns.Add("Volgnummer", typeof(int));
 
        StoredProcedure sp = new StoredProcedure("getAllAanvragen");
        sp.addParameter("@regOID", "7");
 
         
        DataSet ds = sp.executeDataSet();
        if (ds != null && ds.Tables.Count > 0)
        {
            foreach (DataRow row in ds.Tables[0].Rows)
            {
                DataRow newRow = dt.NewRow();
                newRow["OID"] = long.Parse(row["OID"].ToString());
                newRow["Taak"] = CommonFunctions.makeDossiernummer(row["Dossiernummer"].ToString(), row["Volgnummer"].ToString());
                newRow["Volgnummer"] = int.Parse(row["volgnummer"].ToString());
                newRow["Startdatum"] = DateTime.Parse(row["gestartOp"].ToString());
 
 
                newRow["Status"] = Hive.Util.HiveEnum.getDescription((CommonEnums.AanvraagStatus)row["status"]);
                 
 
                dt.Rows.Add(newRow);
 
            }
        }
 
        rgTasks.DataSource = dt;
         
    }
 
    protected void RadFilter1_ApplyExpressions(object sender, RadFilterApplyExpressionsEventArgs e)
    {
        RadFilterSqlQueryProvider provider = new RadFilterSqlQueryProvider();
        provider.ProcessGroup(e.ExpressionRoot);
         
    }
 
    protected void RadFilter1_FieldEditorCreating(object sender, RadFilterFieldEditorCreatingEventArgs e)
    {
        e.Editor = new RadFilterDropDownEditor();
    }


But like this of course the dropdown doesn't show any values and only the Status filter shows.

If I add FilterContainerID="rgTasks" to the filter of course I get all fields as I want. However when i select the Status field, I get an exception:

Failed to load viewstate.  The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.  For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.

This is kind of expected. the filter already is on the page, I add new one. Viewstate gets broken. Dont know the exact detail, but seems logical to me.

My question is, is it possible to achieve what I want? So override the Status filter which is automatically generated from the FilterContainerID="rgTasks" with a custom filter (combobox containing the available values for the Status colum)

Thanks in advance 

/yeroon
Paul Taylor
Top achievements
Rank 1
 answered on 28 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
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
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?