Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
101 views
When we are  trying to split two cells, borders doesn't appear on radgrid as you can see on the attach file below?
Is it possible to help?
Maria Ilieva
Telerik team
 answered on 28 Jul 2010
1 answer
102 views
Hi, I have 4 radDatePicker in a form say start date from, start date to, end date from and end date to. the scenario is if i select something in start date from or start date to both end date from and end date to should be disabled viz. when i clear the values all four radDatePicker should be enabled..
any body have any suggestions how to do this??
Shinu
Top achievements
Rank 2
 answered on 28 Jul 2010
1 answer
65 views
Hi All,

I recently updated the radGrid Control from 2008.3.1314.34  to   2010.1.415.35. I am having a problem. When i expand the grid there is a blank column at the end of the Master grid. when i went on the apsx page i cannot find any blank column. I went in to the source code of the page and found that there is a blank column and the whold grid alignment is changed.
Also all the column are automatically resized to same width, i have to manually go in and change the width of each column  

Is there a way to remove or hide this column or this is a bug ?
Is there a way to automatically change the size of the column to the atleast the size of the header text?

Mahesh
Iana Tsolova
Telerik team
 answered on 28 Jul 2010
3 answers
485 views
Hi,
I am using a Map and a RadAjax Manager. My map's height and width is set to 100% of its container.On  using asp.net updatepanel  I can give a css style  and map renders perfectly. However, on using RadAjax manager map disappears.
The reason was RadAjax manager was wrapping my map with an update panel and unfortunately its width and height isnot set which caused map width and height = 0px.
How can I give a width and height  value of 100% to updatepanel created by RadAjax manager, Is it possible to know the client ID of Update panel generated  by RadAjax Manager that is wrapping the map, so that I can give a css style.

Any suggestion is appreciated.
Thanks
Prava
Tsvetina
Telerik team
 answered on 28 Jul 2010
11 answers
407 views

I am making a simple grid control using the radgrid which derives its structure(columns) from an xml and databind using client side web serivce. It works fine, render intially, paging/sorting work fine, I implement the client OnRowDataBound event and render hyperlinks also. When a postback happens from any other buttons on the page, the columns in the grid are duplicated.

Following is my simplified code:
aspx:

<asp:Button ID="btnPostBack" runat="server" Text="PostBack" /> 
        <telerik:RadGrid ID="grid" runat="server" GridLines="None" AllowFilteringByColumn="false" 
            AllowSorting="true" AllowPaging="true" PageSize="10" AutoGenerateColumns="false">  
            <ClientSettings> 
                <DataBinding SelectMethod="GetResults" /> 
                <ClientEvents /> 
            </ClientSettings> 
            <MasterTableView Width="100%" AutoGenerateColumns="false">  
            </MasterTableView> 
            <PagerStyle Mode="NextPrevAndNumeric" /> 
        </telerik:RadGrid> 

Code behind:
protected override void OnInit(EventArgs e)  
        {  
            base.OnInit(e);  
            FillColumns();  
        }  
        [Serializable]  
        public class Field  
        {  
            public String ColumnName { get; set; }  
            public String DisplayName { get; set; }  
        }  
        private void FillColumns()  
        {  
            List<Field> fields = new List<Field>  
            {  
                new Field { DisplayName = "ID", ColumnName = "ID" },  
                new Field { DisplayName = "Name", ColumnName = "Name" },  
                new Field { DisplayName = "Description", ColumnName = "Description" },  
                new Field { DisplayName = "Location", ColumnName = "Location" }  
            };  
            grid.MasterTableView.Columns.Clear();  
            foreach (var field in fields)  
            {  
                GridBoundColumn col = new GridBoundColumn();  
                grid.MasterTableView.Columns.Add(col);  
                col.DataField = field.ColumnName;  
                col.HeaderText = field.DisplayName;  
                if (field.ColumnName == "ID")  
                    col.DataType = Type.GetType("System.Int32");  
                  
            }  
        }  
        protected void Page_Load(object sender, EventArgs e)  
        {  
            grid.ClientSettings.DataBinding.Location = ResolveUrl("~/SearchService.asmx");  
        } 

ASMX:
[WebService(Namespace = "http://tempuri.org/")]  
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]  
    [System.ComponentModel.ToolboxItem(false)]  
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.   
    [System.Web.Script.Services.ScriptService]  
    public class SearchService : System.Web.Services.WebService  
    {  
        [WebMethod(EnableSession = true)]  
        public Dictionary<String, Object> GetResults(  
            int startRowIndex, int maximumRows,  
            List<GridSortExpression> sortExpression,  
            List<GridFilterExpression> filterExpression)  
        {  
            DataTable dt = new DataTable();  
            dt.Columns.Add("ID", Type.GetType("System.Int32"));  
            dt.Columns.Add("Name");  
            dt.Columns.Add("Description");  
            dt.Columns.Add("Location");  
 
            for (int i = 0; i < 35; i++)  
            {  
                System.Data.DataRow dr = dt.NewRow();  
                dr["ID"] = i;  
                dr["Name"] = "Name" + i;  
                dr["Description"] = "Description" + i;  
                dr["Location"] = "Location" + i;  
                dt.Rows.Add(dr);  
            }  
 
            return new Dictionary<String, Object>  
            {  
                { "Data", RowsToDictionary(dt, dt.Select(string.Format(" ID > {0} and ID < {1}", startRowIndex.ToString(), (startRowIndex + maximumRows).ToString()))) },  
                { "Count", dt.Rows.Count }  
            };  
        }  
        private static List<Dictionary<string, object>> RowsToDictionary(DataTable table, DataRow[] rows)  
        {  
            List<Dictionary<string, object>> objs =  
                new List<Dictionary<string, object>>();  
            foreach (DataRow dr in rows)  
            {  
                Dictionary<string, object> drow = new Dictionary<string, object>();  
                for (int i = 0; i < table.Columns.Count; i++)  
                {  
                    drow.Add(table.Columns[i].ColumnName, dr[i]);  
                }  
                objs.Add(drow);  
            }  
 
            return objs;  
        } 


Note, this is a simplified version and the control has more complicated things which are not relevant here.

Thank you,
Tilak
Iana Tsolova
Telerik team
 answered on 28 Jul 2010
3 answers
89 views
I'm trying to figure out how to create a minutes frequency option for the schedular. For a project we're doing, hourly is not in small enough intervals.

Peter
Telerik team
 answered on 28 Jul 2010
3 answers
215 views
Hi,

I always get a pop up window with the error for the ToolTip. I added a function like this, but it still pops up !

 
function OnClientResponseError(sender, args) { 
                args.set_cancelErrorAlert(true); 
            } 
 

 The error :
RadToolTipManager response error:
 Exception=Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.

Details: Error parsing near 'Telerik.Web.UI 2010.'.

How to solve such problem?
Petio Petkov
Telerik team
 answered on 28 Jul 2010
5 answers
156 views
Hi, my first issue is that I have an update link being generated even though there is no specified update image or text. How can I get rid of this?

Also, in its place I would like to have a custom button that is just a linked image to a new page.

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" EnableAJAX="true" LoadingPanelID="RadAjaxLoadingPanel1" ClientEvents-OnRequestStart="onRequestStart" >
        <telerik:RadGrid ID="gridUsers" DataSourceID="srcUsers" runat="server" AllowPaging="true" AllowSorting="true" AllowFilteringByColumn="true" PageSize="10" AutoGenerateColumns="false">
            <GroupingSettings CaseSensitive="false" />
            <HeaderStyle Font-Bold="true" />
            <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" Visible="true" EnableSEOPaging="true"/>
            <MasterTableView CommandItemDisplay="Top" AllowNaturalSort="false" DataKeyNames="distinguishedName">
                <CommandItemSettings RefreshImageUrl="~/images/refresh_button.gif" ShowExportToWordButton="false" ShowExportToExcelButton="false" ShowExportToCsvButton="true" ShowExportToPdfButton="false" ExportToWordText="" ExportToExcelText="" ExportToCsvtext="" ExportToPdfText="" ExportToWordImageUrl="~/images/export_to_doc.gif" ExportToExcelImageUrl="~/images/export_to_xls.gif" ExportToCsvImageUrl="~/images/export_to_csv.gif" ExportToPdfImageUrl="~/images/export_to_pdf.gif" />
                 
                <Columns>
                    <telerik:GridHyperLinkColumn HeaderText="Edit"  DataNavigateUrlFormatString="EditUser.aspx?user={0}" DataNavigateUrlFields="objectGUID" UniqueName="link" ShowFilterIcon="false"/>
                    <telerik:GridBoundColumn HeaderText="First Name" UniqueName="givenName" DataField="givenName" FilterListOptions="VaryByDataType" FilterImageUrl="~/images/filter_icon.gif" />
                    <telerik:GridBoundColumn HeaderText="Last Name" ItemStyle-Width="100%" HeaderStyle-Width="100%" UniqueName="sn" DataField="sn" FilterListOptions="VaryByDataType" FilterImageUrl="~/images/filter_icon.gif" />
                    <telerik:GridBoundColumn HeaderText="Created" ItemStyle-Wrap="false" UniqueName="whencreated" DataField="whencreated" FilterListOptions="VaryByDataType" FilterImageUrl="~/images/filter_icon.gif" />
                    <telerik:GridBoundColumn HeaderText="distinguishedName" UniqueName="distinguishedName" DataField="distinguishedName" Visible="false" FilterListOptions="VaryByDataType" FilterImageUrl="~/images/filter_icon.gif" />
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </telerik:RadAjaxPanel>


Help please!
Iana Tsolova
Telerik team
 answered on 28 Jul 2010
1 answer
212 views
I'm having a problem calculating my custom aggregate sum function for nested groups.

For example, I have a product group, a product, and then several rows pertaining to that product (so there are two groupings: the main product group > then the individual product and its data). Then, for each grouping I have a footer which calculates the sum of the column based on the value of another column in that row.

What I'd like to see is something like this assuming a product group with 2 products. It would calculate the footer total for each product in that column if the first column's value is say 'Row 3' or 'Row 4' and then for the top product grouping (for 'Product Group 1') would calculate the values from the other footers.

Product Group 1
    Product 1
        Row 1 | 1 | 1 | 1 | 1 |
        Row 2 | 1 | 1 | 1 | 1 |
        Row 3 | 2 | 2 | 2 | 1 |
        Row 4 | 2 | 2 | 1 | 1 |
   [Footer]   | 4 | 4 | 3 | 2 |
    Product 2
        Row 1 | 1 | 1 | 1 | 1 |
        Row 2 | 1 | 1 | 1 | 1 |
        Row 3 | 2 | 2 | 2 | 1 |
        Row 4 | 2 | 2 | 1 | 1 |
   [Footer]   | 4 | 4 | 3 | 2 |
[Footer]      | 8 | 8 | 6 | 4 |

I have it set up so each product's footer calculates the individual product's footer correctly, but not the top most group footer (the product grouping), it only calculates the last individual product's total as in the screenshot I attached. I'm not quite sure how to grab the totals from previous footers of the same grouping.

Here is my custom aggregate function as is now:
Protected Sub RadGrid1_CustomAggregate(ByVal sender As Object, ByVal e As GridCustomAggregateEventArgs) Handles RadGrid1.CustomAggregate
 
        If e.Column.UniqueName = "Row" Then
            e.Result = ""
        Else
            Dim length As Integer = RadGrid1.MasterTableView.GetItems(GridItemType.GroupHeader).Length
            For i As Integer = 0 To length - 1
 
                Dim total As Double = 0
 
                Dim groupHeader As GridGroupHeaderItem = DirectCast(RadGrid1.MasterTableView.GetItems(GridItemType.GroupHeader)(i), GridGroupHeaderItem)
                Dim children As GridItem() = groupHeader.GetChildItems()
 
                For Each child As GridItem In children
                    If TypeOf child Is GridDataItem Then
                        Dim childItem As GridDataItem = TryCast(child, GridDataItem)
 
                        Dim rowText As String = childItem.Item("Row").Text
 
                        If rowText = "Row3" OrElse rowText = "Row4" Then
                            total += childItem.Item("Value").Text
                        End If
                    End If
                Next
                e.Result = total
            Next
        End If
    End Sub

Sorry if this is a dumb question, but I'm a little stuck here.
Martin
Telerik team
 answered on 28 Jul 2010
1 answer
91 views
Hi,

actually I'm looking for a method for loading data in a control with  most minimal action on the server. (Means, when possible, only the control that needs to be refreshed should go through its lifecycle, not the rest of the pages controls).

I found some Information that it should be possible to handle this problem with RadXMLHttpPanel, but no exact information how to ensure that only the refreshed control goes through its lifecycle.

Any hints ?

As additional Information: We have a page that is build by WebParts encapsulating usercontrols. Our need ist to force single webparts/usercontrols to refresh by button/timer etc.

Pero
Telerik team
 answered on 28 Jul 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?