Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
75 views
Hello,
I have a website using telerik controls.
Now i have put my application in server2008, and also installed telerikcontrols in the server, and when browsing my website in the server, every radalert,radconfirm which is opened - actually Yes No buttons dont work.only the close button of its work.
(in my iis computer it works fix)

Anybody knows why? maybe there are more controls not working for me...

Thanks,
Gila
Georgi Tunev
Telerik team
 answered on 25 Nov 2010
1 answer
187 views
Hello I am using custsom paging, sorting and filtering inside NeedDataSource event. To retrieve data, I am using Entity Framework under the covers. Is there any way i can get the FilterExpression in hte form of esql. From what it appears, radgrid only returns esql where clause when you use entitydatasource. can u configure somewhere in radgrid to return the where clause in the form of esql so i can use hte builder methods. There are several reasons why i cant use linq in this case. here is what i what i have.

private string _filterExpression;
    protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
    {
        int startRowIndex = RadGrid1.CurrentPageIndex * RadGrid1.PageSize;
        int maximumRows = RadGrid1.PageSize;
        string sort = RadGrid1.MasterTableView.SortExpressions.GetSortString();
        _filterExpression = RadGrid1.MasterTableView.FilterExpression;
        //needed to bypass RadGrid's internal filtering
        RadGrid1.MasterTableView.FilterExpression = string.Empty;
        if (configuration == null)
        {
            configuration = new SystemSetupFieldConfiguration(TagPrefixList, startRowIndex, maximumRows, sort, _filterExpression);
        }
        var combinedfields = configuration.GetCombinedFields();
        var fieldcount = configuration.CombinedFieldsCount;
        RadGrid1.VirtualItemCount = fieldcount;
        RadGrid1.DataSource = combinedfields;
        
    }

internally i want to be able to apply the filter using builder methods in linq to entities instead of linq query.
db.Customers.Where(filter).OrderBy(orderby).Skip(startrow).Take(maxrows);

Please help!
Radoslav
Telerik team
 answered on 25 Nov 2010
3 answers
137 views
Hi There,

Just a quick question: is it possible to put a grid row in an update panel and set up triggers/server side event handler for the panel?

I would like the following feature: if postback is triggered by a grid row, i.e., a dropdown list with autopostback enabled, only elements in the grid row will be re-rendered and go to the client side (browser).

Thanks,
Y. Fan
Nikolay Rusev
Telerik team
 answered on 25 Nov 2010
2 answers
283 views
I've got a grid with data that can be sorted, paged and filtered by the end user. The grid data is tied to a declarative EntityDataSource and it works very well. I want to filter the data returned by the EntityDataSource so that the user only sees a subset of the records.

OK, so I can't use a declarative EDS and Filters on the grid at the same time as the Filters overwrite the 'Where' clause I put in the EDS. So I'm trying to move the EDS to code behind using the NeedDataSource event.

This is the problem I can see, it seems that the NeedDataSource event expects ALL data to be returned (already bound) which means I'll have lost all of my automatic paging and sorting on the server. I also can't see an example that uses the EDS like this (my code below encounters a NullException error).

My code:
protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    var Eds = new EntityDataSource();
 
    Eds.DefaultContainerName = "EntityDb";
    Eds.ConnectionString = "name=EntityDb";
    Eds.EntitySetName = "Meetings";
    Eds.EnableDelete = true;
    Eds.EnableInsert = true;
    Eds.EnableUpdate = true;
    Eds.AutoPage = true;
    Eds.Include = "Venue";
    Eds.OrderBy = "it.StartDate";
    RadGrid1.DataSource = Eds;
}

The code above does not work, the code below (from the demo) looks like paging and sorting are done in the grid, not passed to the datasource which means the benefit of the EDS is lost (only fetching the rows needed etc).

Example from demo:
protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
 OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + Server.MapPath("~/App_Data/Nwind.mdb"));
 OleDbDataAdapter adapter = new OleDbDataAdapter();
 adapter.SelectCommand = new OleDbCommand("SELECT * FROM Customers", conn);
 DataTable myDataTable = new DataTable();
 conn.Open();
 try
 {
    adapter.Fill(myDataTable);
 }
 finally
 {
    conn.Close();
 }
 RadGrid1.DataSource = myDataTable;
}

Questions;
1) Is there a good sample of using EDS in code behind?
2) Is there another way to accomplish this declaratively?
3) Will the EDS in the code behind always get all of the data and sort it in the grid or does it use the EDS properly?

Thanks in advance,

Ryan
Ryan O'Neill
Top achievements
Rank 1
 answered on 25 Nov 2010
3 answers
83 views
I have a sqldatasource databound radgrid i'm using for data entry.

date, start mileage, end mileage, personal miles

prior to update/insert , i need to check to ensure end mileage > start mileage, and personal miles is not > (endmileage - startmileage)

I've fudged around on the documentation site but cannot find any concrete examples I can adapt to accomplish this.

anyone have suggestions?
Radoslav
Telerik team
 answered on 25 Nov 2010
2 answers
98 views
Hello All,

I having a RadGrid with Filter enabled. when one search base on some filter and then wants to add record (inline edit) then a row is visible and when add record it will disapper due to filter is not cleared.

when nofilter is applied the filter condition is disappers and adding record is fine.

Is there any way to do when some one click on "Add Row", then filter condition is removed???

Please also check attached screen....

I tried below code, not works for me..

protected

 

void grdDelegation_ItemCommand(object source, GridCommandEventArgs e)

 

{

 

try

 

{

hdnDelegationCommandName.Value = e.CommandName;

 

switch (e.CommandName)

 

{

 

case RadGrid.EditCommandName:

 

hdnDelegationGridAddUpdate.Value =

"2";

 

 

if (grdDelegation.MasterTableView.IsItemInserted)

 

{

e.Canceled =

true;

 

}

 

break;

 

 

case RadGrid.InitInsertCommandName:

 

 

//Pair filterPair = (Pair)e.CommandArgument;

 

 

//TextBox filterBox = (e.Item as GridFilteringItem)[filterPair.Second.ToString()].Controls[0] as TextBox;

 

 

//filterBox.Text = "";

 



ajmal
Top achievements
Rank 1
 answered on 25 Nov 2010
1 answer
70 views
Hello,

My appointments in the scheduler have a 'Status' field. This value may be set by selecting a status from the AppointmentContextMenu.

I would like to be able to bold the text of the status menu item that matches the current status of the appointment, so that it's clear to the user what the current status of the appointment is.

How can I achieve this?

Regards,
Anthony
Veronica
Telerik team
 answered on 25 Nov 2010
3 answers
238 views
I would like to ask how I can add aggregations to group expressions so that the group headers in  RadGrid display aggregated values.
For example I want to display all count of grouped elements but not in group footer. In custom paging.
And how to display grouped elements on others page. beacuse now it shows grouped  elements per page not whole table.
All in custom paging :)
Nikolay Rusev
Telerik team
 answered on 25 Nov 2010
11 answers
95 views
When I put a HeaderTemplate on my RadListBox it triggers an "Error: '2.offsetHeight' is null or not an object".  The form still shows but the header is very tall.  I have defined a css to get the height set correctly.

<style type="text/css" >
    .RadListBox1 div.rlbHeader
    {
        height:25px;
    }
</style>

Below is the RadListBox definition

<asp:Panel runat="server" id="pnlCustomFieldListValues" CssClass="fieldPanel" Visible="false">
    <div style="float: left; width: 750px;">
        <asp:Label ID="Label2" runat="server"
                    AssociatedControlId="radCustomFieldListValues"
                    Text="List Values:" />
        <telerik:RadListBox runat="server" ID="radCustomFieldListValues"
                            Width="100%" Height="200px"
                            SelectionMode="Single"
                            AllowReorder="true" 
                            AllowDelete="true"
                            EnableDragAndDrop="true"
                            DataValueField="Id" 
                            ButtonSettings-ReorderButtons="All" 
                            ButtonSettings-ShowDelete="true" 
                            CssClass="RadListBox1"
                            >
        <HeaderTemplate>
            <asp:Label runat="server" Width="200" Text="Name" />
            <asp:Label runat="server" Width="200" Text="Value" />
        </HeaderTemplate>
            <ItemTemplate>
                <asp:Label 
                    runat="server" ID="lblListValueName" Width="200" 
                    Text='<%# DataBinder.Eval(Container.DataItem, "Name")%>' />
                <asp:Label 
                    runat="server" ID="lblListValue" Width="200" 
                    Text='<%# DataBinder.Eval(Container.DataItem, "Value")%>' />
            </ItemTemplate>
        </telerik:RadListBox>
    </div>
</asp:Panel>

Thanks for your help,
Dan
Yana
Telerik team
 answered on 25 Nov 2010
1 answer
395 views
Hi,

I would like to change the Telirk grid filter icon to be hilighted to know when the filter is applied on the specified column.

for ex:- i have attached one screen shot, in that ShipCountry=France is given, so once if the searching is done, then the filter icon(marked in the screen shot) should be hilighted/should change background  color

Dimo
Telerik team
 answered on 25 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?