Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
347 views
I am disabling my grid (so that the users cannot edit the contents), but noticed that pagination also gets disabled. Is there anyway to enable pagination alone when the grid is disabled ?
Mr. Plinko
Top achievements
Rank 1
 answered on 23 Sep 2009
2 answers
175 views
Is it a known limitation that the CSV export doesn't export the contents of the detail tables?  I've got a single method to handle the export and when i export to either Word, Excel or PDF the detail table is included.  But when i choose CSV only the parent table is included in the results.  The code is very simple and was pulled mostly from some other posts i saw on here about other peoples export problems.

        void lbtnExport_Click(object sender, EventArgs e)
        {
            rgComparativeReport.ExportSettings.FileName = "Comparative Report Export";
            rgComparativeReport.ExportSettings.ExportOnlyData = true;
            rgComparativeReport.ExportSettings.IgnorePaging = true;
            rgComparativeReport.ExportSettings.OpenInNewWindow = false;
            rgComparativeReport.MasterTableView.HierarchyDefaultExpanded = true;
            
            for (int i = 0; i < rgComparativeReport.MasterTableView.DetailTables.Count; i++)
            {
                rgComparativeReport.MasterTableView.DetailTables[i].HierarchyDefaultExpanded = true;
            }
            
            rgComparativeReport.Rebind();
        
            if (ddlExport.SelectedValue == "Excel")
            {
                rgComparativeReport.MasterTableView.ExportToExcel(); //this works fine
            }
            else if (ddlExport.SelectedValue == "Text")
            {
                rgComparativeReport.MasterTableView.ExportToCSV();  //This only exports the parent table
            }
            else if (ddlExport.SelectedValue == "Word")
            {
                rgComparativeReport.MasterTableView.ExportToWord(); //this works fine
            }
            else if (ddlExport.SelectedValue == "PDF")
            {
                rgComparativeReport.MasterTableView.ExportToPdf();//this works fine
            }
}

Thanks!
Mark


Mark Kucera
Top achievements
Rank 1
 answered on 23 Sep 2009
2 answers
91 views
I've been using Fasthosts for several years and like most hosting companies they have the ups and downs. I've got dozzens of sites using the ASP.Net Telerik components prior to the Ajax versions and no real problems. However my initial ventures using the newer ASP.Net Ajax components have resulted in security and memory problems. The sites work for a while and then simply cease to work, and the hosting company goes away and fixes it again and again.

Therefore can anyone recommend a UK Hosting company that they know to work with the Telerik ASP.Net components reliably.
Andy Hudson
Top achievements
Rank 2
 answered on 23 Sep 2009
2 answers
256 views
I am using the AdvancedForm user control, pretty successfully.  I am able to add my own controls, both textboxes and dropdowns.  Moving forward, my requirement is basically to have two different sets of input based on a selection of one of the dropdown Resource Controls.  If the selection is A, show inputs 1, 2, and 3, and if they select B, show input controls 4, 5 and 6, or something like that.  I'd like to know what you guys think the best course of action should be.

Thanks
Shawn
Shawn Tracy
Top achievements
Rank 1
 answered on 23 Sep 2009
1 answer
155 views
I have a RadCalendar initialized as follows:

<telerik:RadCalendar ID="radCalendar" runat="server" AutoPostBack="true"
            Skin="Special" EnableEmbeddedSkins="false"
            EnableMonthYearFastNavigation="false" NavigationNextToolTip="Next Month" NavigationPrevToolTip="Last Month"             
            DayNameFormat="Short" ShowRowHeaders="false" ShowOtherMonthsDays="false"
            OnDefaultViewChanged="RadCalendar1_DefaultViewChanged" OnDayRender="RadCalendar1_DayRender" >

My code behind handles calling a web service and populating the correct events into each day. What I want to be able to achieve is limiting the user from jumping ahead more than three months into the future. I know you can achieve this by the following line of code:

radCalendar.RangeMaxDate = now.AddMonths(3);

However, when the user clicks on next month to progress to say the 4th month the calendar is popping up a Javascript alert informing the user of an invalid date? Is there a way to turn that off or better, is there a way to either customize the message or to have the calendar navigation controls hide (per direction hopefully) when you hit the Min/Max Date for the calendar?

What I would like is for the user to never be able to look at a month in the past and only be able to view months within a 3 month window but without the default Javascript alert that pops up.

Any thoughts?

Thanks,
Derek







Schlurk
Top achievements
Rank 2
 answered on 23 Sep 2009
2 answers
173 views
Hi All,
I am using Rad grid control inorder to disply some data.
The amount of data is very large therefore I am using virtual scrolling (slider type).
This data need to be refresh every 5 secounds, that's mean that the table itself is refreshed (give it a new data source).
Due to this high (but required) refresh rate, it is almost impossible to work with the table itself, can not scroll (the refresh is cancelling my scroll), can not filter or sort (each refresh clear the tables fileters) and the all table flicker and it is not smooth.
If any one have an idea, what is the best way to overcome those issues I will be gald to hear.
Thanks,
    Hagay.
Mr. Plinko
Top achievements
Rank 1
 answered on 23 Sep 2009
3 answers
146 views
Hi There,

Im trying to get a RadSplitter going where if the user mouse overs a sliding zone tab I want a panel to slide out and cover some content with the sliding pane content however it doesn't seem to allow the sliding pane to go over the content area and doesn't go past the sliding bar as in the example on http://demos.telerik.com/aspnet-ajax/Splitter/Examples/SP_FirstLook/DefaultCS.aspx

The code I have is:
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %> 
 
<%@ Register Assembly="RadSplitter.Net2" Namespace="Telerik.WebControls" TagPrefix="telerik" %> 
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 
    Namespace="System.Web.UI" TagPrefix="asp" %> 
 
<html > 
<head id="Head1" runat="server">  
   
</head> 
<body class="BODY">  
    <form id="Form1" method="post" runat="server">  
        <asp:ScriptManager ID="ScriptManager" runat="server" /> 
        <br /> 
        <telerik:RadSplitter ID="RadSplitter1" runat="server" Width="700" Height="500">  
            <telerik:RadPane ID="LeftPane" runat="server" Width="22" Scrolling="none" Locked="true">  
                <telerik:RadSlidingZone ID="SlidingZone1" runat="server" Width="22">  
                    <telerik:RadSlidingPane ID="RadSlidingPane1" Title="Pane1" runat="server" Width="150">  
                        Pane 1 Content  
                    </telerik:RadSlidingPane> 
                </telerik:RadSlidingZone> 
            </telerik:RadPane> 
            <telerik:RadSplitBar ID="Radsplitbar1" runat="server"></telerik:RadSplitBar> 
            <telerik:RadPane ID="MiddlePane1" runat="server" Scrolling="None">  
               Main Content  
            </telerik:RadPane> 
        </telerik:RadSplitter> 
        <br /> 
    </form> 
</body> 
</html> 
 

As a test I then copied the code from http://demos.telerik.com/aspnet-ajax/Splitter/Examples/SP_FirstLook/DefaultCS.aspx and pasted into a blank VS2005 web site solution and none of the sliding zones slide out over the content as in the demo either.  I'm using IE 7.  Am i missing something here?
Svetlina Anati
Telerik team
 answered on 23 Sep 2009
1 answer
99 views
I'm having a bit of a cow with 2009 R2 of asp.net controls. The problem seems to be specific to IE8 (developer mode set to IE8 Standards). Changing it to IE7 the problem goes away!

To throw the error i have to select a comboxbox twice and then click into one of the filter fields...number (id) or dob, strangely forenames and surname is fine! Anyway, I get the following error...

Line: 465
Error: Unknown runtime error

If i debug the telerik JS it fails on this line

465: this._textBoxElement.select();

Please review the following code, this is mostly taken from the online demos!

the code behind uses a simple datatable as the datasource which I bound using RadGrid1_NeedDataSource (again as in demo)

<

 

form id="form1" runat="server">

 

 

 

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

 

 

 

<script type="text/javascript">

 

 

<!--

 

function RowSelected(sender, args) {

 

document.getElementById(

 

"<%= Label1.ClientID %>").innerHTML = "<b>ID: </b>" + args.getDataKeyValue("number");

 

}

-->

 

 

</script>

 

</telerik:RadCodeBlock>

 

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

 

</asp:ScriptManager>

 

<!-- content start -->

 

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

 

<AjaxSettings>

 

<telerik:AjaxSetting AjaxControlID="RadGrid1">

 

<UpdatedControls>

 

<telerik:AjaxUpdatedControl ControlID="RadGrid1" />

 

</UpdatedControls>

 

</telerik:AjaxSetting>

 

</AjaxSettings>

 

</telerik:RadAjaxManager>

 

 

<telerik:RadCodeBlock runat="server" ID="radCodeBlock">

 

<script type="text/javascript">

 

function showFilterItem(){

$find(

 

'<%=RadGrid1.ClientID %>').get_masterTableView().showFilterItem();

}

 

 

function hideFilterItem(){

$find(

 

'<%=RadGrid1.ClientID %>').get_masterTableView().hideFilterItem();

}

 

 

</script>

 

</telerik:RadCodeBlock>

 

<div>

 

 

Show filtering item

<input id="Radio1" type="radio" runat="server" name="showHideGroup" checked="true" onclick="showFilterItem()" /><label for="Radio1">Yes</label>

 

 

<input id="Radio2" type="radio" runat="server" name="showHideGroup" onclick="hideFilterItem()"/><label for="Radio2" >No</label>

 

</div>

 

<br/>

 

<telerik:RadGrid AutoGenerateColumns="false" ID="RadGrid1"

 

Width="760px" AllowFilteringByColumn="True" AllowSorting="True"

 

PageSize="15" ShowStatusBar="true" ShowFooter="True" AllowPaging="True" runat="server"

 

GridLines="None" EnableLinqExpressions="false" OnNeedDataSource="RadGrid1_NeedDataSource">

 

<PagerStyle Mode="NextPrevAndNumeric" />

 

<ClientSettings EnableRowHoverStyle="true">

 

<Selecting AllowRowSelect="True" />

 

<ClientEvents OnRowSelected="RowSelected" />

 

</ClientSettings>

 

<GroupingSettings CaseSensitive="false" />

 

<MasterTableView AutoGenerateColumns="false" EditMode="InPlace" AllowFilteringByColumn="True"

 

ShowFooter="True" TableLayout="Auto" AllowMultiColumnSorting="true" ClientDataKeyNames="number">

 

<Columns>

 

<telerik:GridNumericColumn DataField="number" AutoPostBackOnFilter="true" HeaderText="id" SortExpression="number"

 

UniqueName="number" FilterControlWidth="40px" CurrentFilterFunction="equalto" ShowFilterIcon="true">

 

</telerik:GridNumericColumn>

 

<telerik:GridBoundColumn FilterControlWidth="50px" DataField="title" HeaderText="title" SortExpression="title"

 

UniqueName="title" CurrentFilterFunction="Contains">

 

<FilterTemplate>

 

<telerik:RadComboBox ID="RadComboBoxTitle" DataTextFormatString="" DataTextField="title"

 

DataValueField="title" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("title").CurrentFilterValue %>'

 

runat="server" OnClientSelectedIndexChanged="TitleIndexChanged">

 

<Items>

 

<telerik:RadComboBoxItem Text="All" />

 

<telerik:RadComboBoxItem Text="Mr" Value="Mr" />

 

<telerik:RadComboBoxItem Text="Mrs" Value="Mrs" />

 

<telerik:RadComboBoxItem Text="Ms" Value="Ms" />

 

<telerik:RadComboBoxItem Text="Miss" Value="Miss" />

 

<telerik:RadComboBoxItem Text="Dr" Value="Dr" />

 

</Items>

 

</telerik:RadComboBox>

 

 

<telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">

 

 

<script type="text/javascript">

 

 

function TitleIndexChanged(sender, args) {

 

 

var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");

 

tableView.filter(

 

"title", args.get_item().get_value(), "EqualTo");

 

}

 

 

</script>

 

 

</telerik:RadScriptBlock>

 

</FilterTemplate>

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn FilterControlWidth="50px" DataField="forenames" HeaderText="forenames" SortExpression="forenames"

 

 

 

UniqueName="forenames">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn FilterControlWidth="120px" DataField="surname" HeaderText="surname" SortExpression="surname"

 

 

 

UniqueName="surname">

 

 

 

<HeaderStyle Width="160px" />

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridDateTimeColumn FilterControlWidth="100px" DataField="dob" HeaderText="dob" SortExpression="dob"

 

 

 

UniqueName="dob" PickerType="DatePicker" DataFormatString="{0:D}" DataType="System.DateTime">

 

 

 

</telerik:GridDateTimeColumn>

 

 

 

<telerik:GridBoundColumn FilterControlWidth="50px" DataField="sex" HeaderText="sex" SortExpression="sex"

 

 

 

UniqueName="sex" CurrentFilterFunction="Contains">

 

 

 

<FilterTemplate>

 

 

 

<telerik:RadComboBox ID="RadComboBoxSex" DataTextFormatString="" DataTextField="sex"

 

 

 

DataValueField="sex" Width="75px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("sex").CurrentFilterValue %>'

 

 

 

 

runat="server" OnClientSelectedIndexChanged="SexIndexChanged">

 

<Items>

 

<telerik:RadComboBoxItem Text="All" />

 

<telerik:RadComboBoxItem Text="Male" Value="Male" />

 

<telerik:RadComboBoxItem Text="Female" Value="Female" />

 

</Items>

 

</telerik:RadComboBox>

 

<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">

 

<script type="text/javascript">

 

function SexIndexChanged(sender, args) {

 

 

var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");

 

tableView.filter(

 

"sex", args.get_item().get_value(), "EqualTo");

}

 

</script>

 

</telerik:RadScriptBlock>

 

</FilterTemplate>

 

</telerik:GridBoundColumn>

 

</Columns>

 

</MasterTableView>

 

<ClientSettings>

 

<Scrolling AllowScroll="false" />

 

</ClientSettings>

 

</telerik:RadGrid>

 

<br />

 

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

 

<asp:Button Text="PostBack" runat="server" ID="Button1" CssClass="button" style="margin:0 20px 0;" />

 

Click "PostBack" to see the state of the grid is preserved.

</form>

 

 

Rosen
Telerik team
 answered on 23 Sep 2009
1 answer
204 views
I have  following radtreeview  defined

 <telerik:RadTreeView ID="tvGroups"  runat="server" TriStateCheckBoxes="true" CheckBoxes="true" OnClientNodeChecked="nodeChecked" >
        </telerik:RadTreeView>


On the server I have the following code.
 foreach (RadTreeNode node in tvGroups.CheckedNodes)
            {
                Trace.Warn("Value: " + node.Value + ":: Text: " + node.Text +" :: Checked: " + node.Checked.ToString() + ":: CheckedState: " + node.CheckState.ToString());
                if (node.CheckState == TreeNodeCheckState.Checked)
                {
                      //Do something only if the Checkbox is checked.
                      //Ignore if its indeteminate.
                }
            }

The problem is that the CheckState is always Unchecked. I am not sure what I am doing wrong.

THanks



Mohan
Top achievements
Rank 1
 answered on 23 Sep 2009
7 answers
450 views
I have a grid that has a datetime field in it.  The field shows the date and the corresponding time and is a valid date.  I now want to group on this field, however, my grouping i want to be at the "Date" portion of the date, not the "Date and Time."  Can this be done? 

If so, how would this work and where would i put the corresponding format expression.
Veli
Telerik team
 answered on 23 Sep 2009
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?