Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
53 views
Using PagerStyle NextPrevAndNumeric, when there is only one page of data displayed, the page information shows something like
"3 items in 1 pages".  Since there is only one page, the text should read "3 items in 1 page".  Nit-picking point, but our users would
like this to display correctly.  I didn't see a way to modify this using the PagerTextFormat property - is there any way to fix this without
writing a custom pager?

Thanks.
Doug
Top achievements
Rank 1
 answered on 24 Jul 2009
1 answer
153 views
Hi

I would like to have a page where the user fills in a form which populates the grid with data. One of the options on the form would be 'show details' If this option is not ticked i would then chose not to populate the details table and not to show the expand/collapse column.

I am thinking i might be able to achieve this by programmatically removing the parent table relations from the grid in the page load event when the page is posted back but I don't know how to do this.

thanks
Iana Tsolova
Telerik team
 answered on 24 Jul 2009
1 answer
226 views
Hi,

I am using a RadGrid in which I have a date column. At the moment when I sort by the column in ascending order the empty records appear at the top and then the rest of the dates are shown in ascending order.

However what I need to do is to apply a sorting algorithm so that the empty columns always appear at the bottom whether the user selects to sort in desc or asc order.

Is this possible? If so please advise the best approach in your opinion.

Thanks
Sebastian
Telerik team
 answered on 24 Jul 2009
1 answer
207 views
I have a simple RadGrid (Q2 2009) instance that does its databinding on the client side using a web service. My problem is with the amount of viewstate that the grid generates.

My grid has 8 columns. Of those, 5 are data bound columns, 2 button columns and 1 is a template column. I have tried removing these columns in various combinations but to no avail.

The grid looks to be creating about 40-50KB of viewstate on page load (before the grid calls the web service to get its data). I do not need to persist viewstate data in my current scenario.

I have tried to disable viewstate with EnableViewState=false on 1) the page 2) the user control 3) the radgrid itself. None of these seem to impact the volume of viewstate that the control generates.
Iana Tsolova
Telerik team
 answered on 24 Jul 2009
1 answer
130 views
Hey.  I'm having an issue with a grid which uses a hierarchical structure along with aggregates on a column.  The front end code looks like this:
<MasterTableView> 
   <DetailTables> 
      <telerik:GridTableView ShowFooter="true"
         <ParentTableRelation>etc...</ParentTableRelation> 
            <Columns> 
               <telerik:GridBoundColumn HeaderText="Affiliate" DataField="affiliate"/> 
               <telerik:GridBoundColumn HeaderText="Records Received" DataField = "RecordCount" Aggregate="Sum" UniqueName="RecordCount" DataFormatString="{0:N0}"/> 
            </Columns> 
            <DetailTables> 
               <telerik:GridTableView ShowFooter="true" GridLines="None" runat="server" Name="Data" FooterStyle-ForeColor="White"
                       <ParentTableRelation>etc...</ParentTableRelation
                  <Columns> 
                    <telerik:GridBoundColumn DataField="SubID" HeaderText="SubID" UniqueName="SubID" /> 
                     <telerik:GridBoundColumn HeaderText="Record Count" DataField="Record Count" ="Record Count" DataFormatString="{0:N0}" /> 
                  </Columns> 
                </telerik:GridTableView> 
              </DetailTables> 
          </telerik:GridTableView>                         
        </DetailTables> 
       <Columns> 
          etc... 
       </Columns>  
</MasterTableView> 

The data is related properly between the nested tables.  I am attempting to aggregate the Topmost "recordcount" column such that each child table displays the total count for that child in the footer.  The problem is that... the footer is displaying the total count for the entire table.  For example, the first child table might have 1000 records, the second 2000, and the third 3000.  Each footer displays "6000" instead of 1000, 2000, and 3000.  Am I doing something wrong?
Peter
Top achievements
Rank 1
 answered on 24 Jul 2009
4 answers
133 views

I have a form I'm working on where I would like to update 2 RadComboboxes when 1 is changed. 

What I'm finding is when I call requestItems() that it does it for the first child box, but not the second.

Has anyone figured out a way to do this?

Sample code is below:

<%@ Page Language="VB" Trace="false" %> 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/tr/xhtml11/DTD/xhtml11.dtd"> 
 
<script runat="server">  
 
       
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)  
      
        Dim cmbo As New RadComboBox  
        cmbo.ID = "RadComboBox1" 
        cmbo.EnableLoadOnDemand = True 
        cmbo.Filter = RadComboBoxFilter.StartsWith  
        cmbo.AllowCustomText = False 
        cmbo.MarkFirstMatch = True 
        cmbo.EmptyMessage = "Data not found" 
        cmbo.Width = 186 
        cmbo.OnClientSelectedIndexChanging = "goLoadCountries" 
        cmbo.OnClientItemsRequesting = "buildForm" 
        AddHandler cmbo.ItemsRequested, AddressOf RadComboBox1_ItemsRequested  
 
        Dim l As New Label  
        l.ID = "Label1" 
        l.AssociatedControlID = cmbo.ID  
        l.Text = "Continent: " 
 
        divPrompts.Controls.Add(l)  
        divPrompts.Controls.Add(cmbo)  
                 
          
        ' build more combox, done after the above code so the items requested fires for #1  
        cmbo = New RadComboBox  
        cmbo.ID = "RadComboBox2" 
        cmbo.EnableLoadOnDemand = False ' this needs to be set to false to not allow the user from inputting their own values  
        'cmbo.Filter = RadComboBoxFilter.StartsWith  
        cmbo.AllowCustomText = False 
        cmbo.MarkFirstMatch = True 
        cmbo.EmptyMessage = "Data not found" 
        cmbo.Width = 186 
        cmbo.OnClientSelectedIndexChanging = "goLoadCountries" 
        cmbo.OnClientItemsRequesting = "buildForm" 
        cmbo.OnClientItemsRequested = "ItemsLoaded" 
        cmbo.Attributes.Add("parent", "RadComboBox1")  
        AddHandler cmbo.ItemsRequested, AddressOf RadComboBox1_ItemsRequested  
 
        l = New Label  
        l.ID = "Label2" 
        l.AssociatedControlID = cmbo.ID  
        l.Text = "Country: " 
 
        divPrompts.Controls.Add(l)  
        divPrompts.Controls.Add(cmbo)  
                 
          
        cmbo = New RadComboBox  
        cmbo.ID = "RadComboBox3" 
        cmbo.EnableLoadOnDemand = False 'True  
        'cmbo.Filter = RadComboBoxFilter.StartsWith  
        cmbo.AllowCustomText = False 
        cmbo.MarkFirstMatch = True 
        cmbo.EmptyMessage = "Data not found" 
        cmbo.Width = 186 
        cmbo.OnClientSelectedIndexChanging = "goLoadCountries" 
        cmbo.OnClientItemsRequesting = "buildForm" 
        cmbo.OnClientItemsRequested = "ItemsLoaded" 
        cmbo.Attributes.Add("parent", "RadComboBox1")  
        AddHandler cmbo.ItemsRequested, AddressOf RadComboBox1_ItemsRequested  
 
        l = New Label  
        l.ID = "Label3" 
        l.AssociatedControlID = cmbo.ID  
        l.Text = "City: " 
 
        divPrompts.Controls.Add(l)  
        divPrompts.Controls.Add(cmbo)  
          
          
        If Not Page.IsPostBack Then  
            'fill the continents combo  
            RadComboBox1_ItemsRequested(divPrompts.FindControl("RadComboBox1"), New RadComboBoxItemsRequestedEventArgs)  
        End If  
 
          
    End Sub  
 
    Protected Sub RadComboBox1_ItemsRequested(ByVal o As Object, ByVal e As RadComboBoxItemsRequestedEventArgs)  
        Dim cmbo As RadComboBox = DirectCast(o, RadComboBox)  
        cmbo.Items.Clear()  
 
        Select Case cmbo.ID  
            Case "RadComboBox1"  
                For y As Integer = 0 To 10  
                    cmbo.Items.Add(New RadComboBoxItem(y, y))  
                Next  
            Case Else  
                cmbo.Items.Add(New RadComboBoxItem("Box 1 value: " & e.Context("RadComboBox1").ToString(), e.Context("RadComboBox1").ToString()))  
        End Select  
   
 
    End Sub  
      
</script> 
 
<html xmlns="http://www.w3.org/1999/xhtml" style="height:100%;">  
    <head id="Head1" runat="server" > 
    <title></title>  
    </head> 
    <body style="height:100%;margin:0px;" scroll="no" > 
    <form id="form1" method="post" runat="server" style="height:100%;margin:0px;">  
       <telerik:radscriptmanager ID="RadScriptManager1" runat="server">  
        </telerik:radscriptmanager> 
       
            <div id="divPrompts" runat="server" > 
              
            </div> 
 
        <script type="text/javascript">  
 
function goLoadCountries(combo, eventArqs)  
{  
    var item = eventArqs.get_item();  
    var prompt;  
 
    combo.tempVal = item.get_value();  
 
 
    for (i = 0; i < Telerik.Web.UI.RadComboBox.ComboBoxes.length; i++) {  
        prompt = Telerik.Web.UI.RadComboBox.ComboBoxes[i];  
 
        if (prompt.get_attributes().getAttribute("parent") == combo.get_id()) {  
            prompt.set_text("Loading...");  
            prompt.requestItems(item.get_value(), false);  
 
        }  
    }  
}  
 
 
function ItemsLoaded(combo, eventArgs) {  
    if (combo.get_items().get_count() > 0)  
    {  
        combo.get_inputDomElement().className = "rcbInput";  
        var item = combo.get_items().getItem(0);  
        item.select();  
    }  
}  
 
 
function buildForm(sender, eventArgs){  
    var context = eventArgs.get_context();  
    for (i=0; i<Telerik.Web.UI.RadComboBox.ComboBoxes.length; i++){  
        context[Telerik.Web.UI.RadComboBox.ComboBoxes[i].get_id()] = Telerik.Web.UI.RadComboBox.ComboBoxes[i].tempVal;  
    }  
}  
        </script> 
 
        </form> 
    </body> 
</html> 
 
Simon
Telerik team
 answered on 24 Jul 2009
1 answer
58 views
Hi,

I am using telerik window to perform some business logic. I want to close the window when a server side button is clicked. i am using the below code to do the same which is working on firefox and safari but not on IE 7.

could you please let me know the issue???

code:

string strClientScript = string.Format(@"
            <script type='text/javascript'>
                var oWindow = null;
                if (window.radWindow)
                    oWindow = window.radWindow;
                else if(window.frameElement.radWindow)
                    oWindow = window.frameElement.radWindow;
                var currentWindow = oWindow;
                currentWindow.Close('{0}');
            </script>", jsonText);
            lblCloseWindow.Text = strClientScript;


Thanks,
Mahesh
Svetlina Anati
Telerik team
 answered on 24 Jul 2009
1 answer
132 views
I have 2 grids on 1 page and I am trying to change the page of each grid in one client side event.  What is happening is the last call is the only one that is performed.  I have tried multiple ways of changing the page. And still get the same result.  Is this a known issue and is there a workaround.
TableView1 = $find("<%= TableView1.ClientID %>").get_masterTableView();  
TableView2 = $find("<%= TableView2.ClientID %>").get_masterTableView();  
 
function ChangePages(argument) {  
//Method 1  
TableView1.page(argument);  
TableView2.page(argument);  
//Method 2  
TableView1.set_currentPageIndex(page);  
TableView2.set_currentPageIndex(page);  

Thanks
Georgi Krustev
Telerik team
 answered on 24 Jul 2009
6 answers
391 views
Hi,

I am using Prometheus v2007.3.1314.35, and have come across this error when using the RadAjaxManager and text from our ASP.NET App_GlobalResources\Resource.resx file.

Within the Resource.resx file I have a key btnSubmit with text value "Submit".
The text is displayed within the submit button correctly, & within the UpdatePanel, but if I try to use any Resource text on the page before or after the RadAjaxManager an error is thrown.

Here is the code to replicate the error.

For the page to work remove:
(Some Text outside asp:UpdatePanel "<%= Resources.Resource.btnSubmit %>")

<

asp:ScriptManager ID=ScriptManager1 runat=server />

<p />

Some Text outside asp:UpdatePanel "<%= Resources.Resource.btnSubmit %>"

<p />

 

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

<AjaxSettings>

<telerik:AjaxSetting AjaxControlID="updPanel1">

<UpdatedControls>

<telerik:AjaxUpdatedControl ControlID="updPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />

</UpdatedControls>

</telerik:AjaxSetting>

</AjaxSettings>

</telerik:RadAjaxManager>

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Transparency="30" BackColor="#E0E0E0" InitialDelayTime="500">

<asp:Image ID="Image1" runat="server" ImageUrl="~/images/icons/loading.gif" BorderWidth="0px" AlternateText="Loading" ></asp:Image>

</telerik:RadAjaxLoadingPanel>

<asp:UpdatePanel ID="updPanel1" runat="server" UpdateMode=Conditional ChildrenAsTriggers=true >

<ContentTemplate>

<p />

<asp:Label ID=Label1 runat=server Text="Button Clicked at " />

<p />

<asp:Button ID=Button1 runat=server OnClick="Button1_Click" Text="<%$ Resources:Resource,btnSubmit %>" />

<p />

Same Text within asp:UpdatePanel "<%= Resources.Resource.btnSubmit %>"

</ContentTemplate>

</asp:UpdatePanel>

Any Ideas?
Thanks

rtk
Top achievements
Rank 1
 answered on 24 Jul 2009
1 answer
50 views
Chrome is adding extra space below nodes when loading on demand via WCF. This issue can be seen on your own demo:


Your other demos do not cause this issue, but I can't pinpoint what is causing this issue on my own version of the tree on my site using 2009.2.713.35.
Alex Gyoshev
Telerik team
 answered on 24 Jul 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?