Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
129 views
On the bottom right hand side of the pager is the text that says, for example, "100 records in 4 pages". What I would like to do is changes this to say 75 records in 3 pages even if there are 100 records. The reason I want to do such an odd thing is that in some instances, there are 100 records, but 75 of them are parents, and 25 are children. I only want the parent records to be displayed in the "X records in Y pages" string. Is this possible?

I've tried the code in http://www.telerik.com/help/aspnet-ajax/grid-accessing-default-pager-buttons.html:

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridPagerItem)
    {
        GridPagerItem item = e.Item as GridPagerItem;
        Label pageOfLabel = e.Item.FindControl("PageOfLabel") as Label;
        pageOfLabel.Text = "OF " + item.Paging.PageCount.ToString();
    }
}

When I run through the code, I get an exception - "Object reference not set to an instance of an object." - at the "pageOfLabel.Text..." line.

Thank you,
Scott
Jayesh Goyani
Top achievements
Rank 2
 answered on 24 Nov 2011
1 answer
84 views

I am using rad grid in my application .some of Data I have showed in rad grid .we have used 5 column in rad grid, like Name,  age, address, sex and date of birth .

We have given Search option for Filter column in rad gird. Filter Column are Rad combo box .in Age Filter combo box is not filtering (in rad grid Age Data type is integer)

function AgeIndexChanged(sender, args) {

        var Ageobj = $find("<%=rgResults.ClientID%>").get_masterTableView()

        Ageobj.filter("Age", args.get_item().get_value(), "Contains");

 

 

    }

 

 

Inside the Rad grid Column is like (Rad grid Id is rgResults)

 

 

  <telerik:GridBoundColumn DataField="Age" HeaderText="Age" SortExpression="Age" UniqueName="Age"

                            FilterControlWidth="50px" ItemStyle-Width="50px" AllowFiltering="true">

                            <FilterTemplate>

                                <telerik:RadComboBox ID="RadComboBoxAge" DataSourceID="AgeSqlDataSource" DataTextField="Age"

                                    DataValueField="Age" Width="50px" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Age").CurrentFilterValue %>'

                                    Height="200px" AppendDataBoundItems="true" runat="server" OnClientSelectedIndexChanged="AgeIndexChanged">

                                    <Items>

                                        <telerik:RadComboBoxItem Text="All" />

                                    </Items>

                                </telerik:RadComboBox>

                            </FilterTemplate>

                        </telerik:GridBoundColumn>

 

 

Can you please give the Correct Solution?

 

 

Shinu
Top achievements
Rank 2
 answered on 24 Nov 2011
1 answer
97 views
Hi,

Textchanged event on a RadTextBox  opens up a Radwindow,  how can I post back to the server without opening RadWindow.
This bug is seen only on Chrome, in firefox it works smoothly.

Thanks,
Prava
Princy
Top achievements
Rank 2
 answered on 24 Nov 2011
1 answer
50 views
Hi,

I have defined a RadLoadingPanel, in my master page ...
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel_LOS" runat="server" Skin="">
    <div style="height: 100%; width: 100%">
        <asp:Image ID="imgLoading" runat="server" ImageUrl="~/Images/Misc/loading2.gif" AlternateText="loading" />
    </div>
</telerik:RadAjaxLoadingPanel>

When it is displayed in a user control, which is a RadGrid, it is only appearing on top of the control... I've tried specifcying the Height to the hieght of the grid but it didnt work... is there something I am missing?
I 'd l ike it to appear in the center...

<telerik:AjaxSetting AjaxControlID="tsCRMPPSA">
    <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="mpCRMPPSA" UpdatePanelHeight="400px" />
    </UpdatedControls>
</telerik:AjaxSetting>
Shinu
Top achievements
Rank 2
 answered on 24 Nov 2011
1 answer
272 views
Hi,

In our application we need to set radgrid column headerstyle-width by javascript.. For this we are using below code but nothing happened.

grid.get_masterTableView().getColumnByUniqueName("uniqueName").get_element().width = "1000px";
//grid.get_masterTableView().getColumnByUniqueName("UniqueName").get_element().clientWidth = "1000px";
grid.repaint();

Please help us.

Princy
Top achievements
Rank 2
 answered on 24 Nov 2011
4 answers
122 views
I have a grid that I'm just binding to a table in a database. Is there a way to put one more row on the end of that from the server? Essentially, I want to get the totals from that table and put in on the end of the grid as totals. so it would look something like this

Customer1 1 1 4 3
Customer2 1 2 3 5
Totals Here 2 3 7 8

Where Customer1 and Customer2 came from the table, and then totals here was added in the code behind. Is this possible?
Princy
Top achievements
Rank 2
 answered on 24 Nov 2011
1 answer
101 views
Hello,

i am getting the following error when trying to filter a GridDateTimeColumn:

Neither of the types 'String' and 'Nullable`1' converts to the other

this is the markup i have:

<telerik:RadGrid ID="ProcessesRadGrid" runat="server" Width="97%"  OnItemCommand="ProcessesRadGridItemCommand"
AllowPaging="true" PageSize="10" OnPageIndexChanged="ProcessesRadGrid_PageIndexChanged" OnNeedDataSource="ProcessesRadGrid_NeedDataSource" OnSortCommand="ProcessesRadGrid_SortCommand" AllowSorting="True">
        <MasterTableView AutoGenerateColumns="false" DataKeyNames="AcProcesses.Acprocessid" ClientDataKeyNames="AcProcesses.Acprocessid"
            Width="100%" CommandItemDisplay="Top" AllowFilteringByColumn="true">
                <CommandItemSettings ShowAddNewRecordButton="false" />
                <Columns>
                    <telerik:GridBoundColumn HeaderText="Organization" DataField="AcProcesses.Organization.Organizationname"></telerik:GridBoundColumn>
                    <telerik:GridDateTimeColumn  HeaderText="Start Date" DataField="AcProcesses.StartDate" SortExpression="AcProcesses.StartDate" DataType="System.DateTime" PickerType="DatePicker" DataFormatString="{0:dd/MM/yyyy}"  FilterControlWidth="100px">
                    </telerik:GridDateTimeColumn>
                    ........

Not sure what I'm missing... the weird thing is that i have another grid on the same page with filtering working on dates... i also noticed that on that second grid the filter button has less options (ex: it doesn't have 'contains')

Princy
Top achievements
Rank 2
 answered on 24 Nov 2011
1 answer
79 views
Hi,

I want  an ID of parent Table and the datakey value of recently expanded column on child grid's need data source event.  My code returns null value for currentGrid.NamingContainer .

  void childRadGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            try
            {
                RadGrid currentGrid = sender as RadGrid;
                
        GridDataItem  parentItem =  (currentGrid.NamingContainer as  GridNestedViewItem ).ParentItem as GridDataItem;
..
..
..
}

Any idea?
Thanks
Prava
Shinu
Top achievements
Rank 2
 answered on 24 Nov 2011
4 answers
90 views
I need to center align the date number in monthview. Also need to change the default font of the number. How can this be done? I have a picky customer.

Thanks,
Dan
Dan
Top achievements
Rank 1
 answered on 23 Nov 2011
3 answers
76 views
I am new to telerik.  I have just converted an web application to a telerik enabled web app.
I have a basic page (1 button, 1 label) and on button click label text changes.

Prior to converting this worked fine
Once coverted and if I run in debug it works fine (label updated)
Once published to localhost it not longer works (label not updated).  I can view the site properly just no label update on button click.

Just wondering if you could point me in the right direction here.

Thanks
Michael
Top achievements
Rank 1
 answered on 23 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?