Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
190 views
I have a grid with the following filter:
 <telerik:RadGrid runat="server" ID="RadGrid1" ShowStatusBar="true" AllowSorting="True" AllowPaging="True" AllowFilteringByColumn="True"  DataSourceID="odsUsers">
<
MasterTableView AutoGenerateColumns="false" DataKeyNames="Id" DataSourceID="odsUsers" UseAllDataFields="true">
<Columns>
.........
<
telerik:GridTemplateColumn UniqueName="DepartName" AllowFiltering="true">
<ItemTemplate><asp:Label runat="server" ID="Label2" Text='<%# Eval("DepartName") %>' /></ItemTemplate>
<FilterTemplate>

 

<telerik:RadComboBox ID="cmbDepartments" DataSourceID="odsDepartments" DataTextField="Name"  DataValueField="Id" AppendDataBoundItems="true" SelectedValue='<%# filterSelectedDepartment %>'  runat="server" OnSelectedIndexChanged="cmbDepartments_SelectedIndexChanged" AutoPostBack="true">

 

<Items><telerik:RadComboBoxItem Text="All" Value="0" /></Items>

 

</telerik:RadComboBox>
</FilterTemplate>
</telerik:GridTemplateColumn>
..........
</Columns>
</MasterTableView></telerik:RadGrid><asp:ObjectDataSource ID="odsUsers" runat="server" SelectMethod="GetUsersDataSet" TypeName="TA2009.BusinessLogic.UsersManager" OnSelecting="odsUsers_Selecting">

</asp:ObjectDataSource>
<
asp:ObjectDataSource ID="odsDepartments" runat="server"  SelectMethod="GetDepartmentsDataSet" TypeName="TA2009.BusinessLogic.DepartmentsManager" >

</asp:ObjectDataSource>

GetUsersDataSet methods returns a whole list of users. I want to filter them by Department.

 

protected void cmbDepartments_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)

{ 

 

 

RadComboBox cmbDepartments = o as RadComboBox;

filterSelectedDepartment = cmbDepartments.SelectedValue;
String filter = String.Empty;

if (filterSelectedDepartment != "0")
    
filter = "DepartId=" + filterSelectedDepartment;
RadGrid1.MasterTableView.FilterExpression = filter ;

 

RadGrid1.Rebind();

}

When filter is applied, only filtered rows remains in the grid, this is right.  But number of pages and records in the paging panel remains the same as it was.
For example,  let's assume that grid contains 7 records, 5 records are displaing on the page, i.e. there are 2 pages, 5 records on the first page and 2 on the second. Let's assume that only 2 records satisfy to filter criteria, 1 on the first page and 1 on the second.  In this case when filter is appplied, I will still get a grid with 2 pages,  1 record will  be displayed on the first page and one on the second.
I thought , that I should get a grid with 1 page and 2 records displaying on it.
Please advice. 

 

 

 

 

 

 

 

 

Iana Tsolova
Telerik team
 answered on 16 Dec 2009
1 answer
104 views
Hi,

Having a small issue here.
I have the Rotator control set up to run off a dynamically updated XML file - the screen refreshing every 3 minutes. The problem is that I have the scrolling going downwards (at the clients' request), and the new items on the list appear at the foot of the screen, vanishing off the bottom almost instantly.

Is there any way for the scrolling to begin with the first item maybe halfway up the page, so that it has the bottom half of the screen to scroll down before vanishing off the end?
Fiko
Telerik team
 answered on 16 Dec 2009
1 answer
170 views
Hi.  I am trying to use the upgrade wizard to install the latest release of the ASP.Net AJAX controls.  I log in, and the wizard starts to download the upgrade, then an error is thrown: "The remote server returned an error: (407) Proxy Authentication Required."

Is this a firewall issue?
Atanas
Telerik team
 answered on 16 Dec 2009
1 answer
163 views
In Spain (es-ES) decimal separator is "," [comma] and group separator is '.' [dot].

In page with Culture="es-ES", if you try filter by decimal value for example "0.05" [en-US]:
- If you try spanish notation culture "0,05" the filter fail (AJAX error, etc ...)
- If you try en-US notation cultrue "0.05" the filter no fail but filter value is "5". It's wrong the filter value must be "0.05" [en-US].

Thanks.


Pavlina
Telerik team
 answered on 16 Dec 2009
4 answers
107 views
Hi,

I've got a problem.
When I open RadWindow1 with for example 800x600 dimension and then open a second, bigger RadWindow2 with for example 950x640 dimension the parent window default.aspx (fullscreen with 1280x1024 screen resolution) gets scrollbars visible.
Is there a posibility to fix this problem? I've a little sample project to illustrate. But how can I attach this zip file to the forum?

Thanks, Tobi
Tobias
Top achievements
Rank 1
 answered on 16 Dec 2009
1 answer
95 views
Hi!

Is it possible to show a loading panel while uploading a file with the fileexplorer. If so, how could i do this

Regards,
Marlou
Fiko
Telerik team
 answered on 16 Dec 2009
3 answers
161 views
Hi All,

I am using following code, after loading grid data those record are displayed in grid, the real problem is that once i unchecked any record from first page(i.e. grid first page), and move to next page and again come back the first page, it will not display unchecked record, why?

<telerik:RadGrid ID="rgEventResult" Width="100%" runat="server" AllowFilteringByColumn="false"
                AllowPaging="True" AllowSorting="True" GridLines="None" ShowGroupPanel="false"
                AllowMultiRowSelection="true" AutoGenerateColumns="False" Height="370px" PageSize="10"
                OnNeedDataSource="rgEventResult_NeedDataSource" OnItemCreated="rgEventResult_ItemCreated"
                OnItemDataBound="rgEventResult_ItemDataBound">
                <HeaderContextMenu EnableEmbeddedSkins="False" />
                <ItemStyle Wrap="True" />
                <PagerStyle AlwaysVisible="True" ShowPagerText="true" Mode="NextPrevAndNumeric" />
                <MasterTableView DataKeyNames="Id" ItemStyle-Wrap="true" TableLayout="Auto">
                    <Columns>
                        <telerik:GridClientSelectColumn UniqueName="SelectColumn" HeaderStyle-Width="25px">
                            <HeaderStyle Width="25px"></HeaderStyle>
                        </telerik:GridClientSelectColumn>
                        <telerik:GridBoundColumn UniqueName="EventAttendeeId" HeaderText="Event Attendee Id"
                            DataField="EventAttendeeId" Display="false" />
                        <telerik:GridBoundColumn DataField="Email" HeaderText="Email" UniqueName="EventEmail" />
                        <telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name" UniqueName="EventFirstName" />
                        <telerik:GridBoundColumn DataField="LastName" HeaderText="Last Name" UniqueName="EventLastName" />
                        <telerik:GridBoundColumn DataField="CompanyName" HeaderText="Company" UniqueName="EventCompanyName" />
                        <telerik:GridBoundColumn DataField="Status" HeaderText="Registration Status" UniqueName="EventStatus" />
                        <telerik:GridBoundColumn DataField="EventTitle" HeaderText="Event Title" UniqueName="EventTitle" />
                    </Columns>
                </MasterTableView>
                <ClientSettings AllowColumnHide="false" AllowColumnsReorder="false" AllowDragToGroup="false"
                    ReorderColumnsOnClient="false">
                    <Selecting AllowRowSelect="True" />
                    <Resizing ClipCellContentOnResize="false" AllowColumnResize="true" ResizeGridOnColumnResize="true" />
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true" ScrollHeight="100%" />
                </ClientSettings>
            </telerik:RadGrid>

protected void rgEventResult_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            ContactListDetailService.ContactListDetailClient proxyDetail = new ContactListDetailService.ContactListDetailClient();
            List<System.Guid> eventIds = new List<Guid>();
            List<System.Guid> statusIds = new List<Guid>();

            if (Session["EventIds"] != null)
            {
                eventIds = Session["EventIds"] as List<System.Guid>;
            }

            if (Session["StatusIds"] != null)
            {
                statusIds = Session["StatusIds"] as List<System.Guid>;
            }

            try
            {
                epp2ClientPL.ContactListDetailProperties[] details = proxyDetail.LoadByEventAndStatusIds(eventIds.ToArray(), statusIds.ToArray());
                rgEventResult.DataSource = details; // proxyDetail.LoadByEventAndStatusIds(eventIds, statusIds);
                lblTotal.Text = details.Count().ToString();
            }
            catch
            { }
            finally
            {
                if (proxyDetail != null)
                {
                    proxyDetail.Close();
                    proxyDetail = null;
                }
            }
        }

protected void rgEventResult_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem dataItem = (GridDataItem)e.Item;
                dataItem.Selected = true;
            }
        }

waiting for reply


Thanks & Regards,
Dharmesh





Schlurk
Top achievements
Rank 2
 answered on 16 Dec 2009
1 answer
93 views
Morning all,

I just follow the example ( http://www.telerik.com/support/kb/aspnet-ajax/editor/using-the-image-and-document-managers-outside-radeditor.aspx) using DialogOpener, and I have been asked to disable 'Delete' from context menu. I can not find a way to access to default RadContextMenu. Does anybody know how to do this?  BTW: I am working on RadControls_for_ASP.NET_AJAX_2009_1_402.

Q2: I use subversion for version control, so that I can see the .svn hidden folder after setting up dialogParams.ViewPaths. Is there any way to not show such hidden folders except implementing customer FileSystemContentProvider.

Q3: How can I show image thumbnails after loading image manager with my current version (have no chance to upgrade to higher version recently)

Many thanks in advance.

Cheers,
Rachael
Rumen
Telerik team
 answered on 16 Dec 2009
1 answer
878 views
Hi,

I am using a Telerik RadGrid in my project.
The concept is i will use single grid for the whole project.
In that grid SelectColumn[one checkbox column],Edit and Delete columns are common for all pages.
Other column will vary based on the page.

So i have set 'AutoGenerateColumn = true'.
And i have created 3 static columns i.e) one.GridClientSelectColumn and two GridButtonColumns [one for delete and another one for edit].
At run time i will bind the grid as 'AutoGeneratecolumn = true' other columns will come based the datasource.

I have assigned the 'Item-Style' for the Horizontal and Vertical alignments.But it is not working.
Here is my code in aspx
 <MasterTableView> 
                        <Columns> 
                            <Telerik:GridClientSelectColumn UniqueName="SelectColumn" ItemStyle-HorizontalAlign="Center" 
                                ItemStyle-VerticalAlign="Middle"> 
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" /> 
                            </Telerik:GridClientSelectColumn> 
                            <Telerik:GridButtonColumn UniqueName="EditColumn" CommandName="View" ButtonType="ImageButton" 
                                ImageUrl="~/img/Edit.gif" Text="Edit" HeaderText="Edit" ItemStyle-Width="20px" 
                                HeaderStyle-Width="20px" ItemStyle-HorizontalAlign="Center" Resizable="false" 
                                Visible="false"> 
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" /> 
                            </Telerik:GridButtonColumn> 
                            <Telerik:GridButtonColumn UniqueName="DeleteColumn" CommandName="Delete" Text="Delete" 
                                HeaderText="Delete" ButtonType="ImageButton" ImageUrl="~/img/Delete_Telerik.gif" 
                                ConfirmText="Are you sure you want to delete?" ItemStyle-VerticalAlign="Middle" 
                                ConfirmTitle="Delete" HeaderStyle-Width="20px" ItemStyle-HorizontalAlign="Center" 
                                Resizable="false"> 
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" /> 
                            </Telerik:GridButtonColumn> 
                        </Columns> 
                        <NoRecordsTemplate> 
                            <table width="100%" style="height: 75px;" border="0" cellpadding="1" cellspacing="1"> 
                                <tr align="left"> 
                                    <td align="left" valign="middle"> 
                                        <br /> 
                                        <br /> 
                                        No records to display 
                                    </td> 
                                </tr> 
                            </table> 
                        </NoRecordsTemplate> 
                    </MasterTableView> 

But still Select checkbox, Edit image and Delete image and other column Text all are left aligned.
What is the problem?
I need to set vertical aligned middle and horizondal aligned center...
Please give me the solution.

Thanks,
Kumar
Dimo
Telerik team
 answered on 16 Dec 2009
2 answers
119 views
Hi, I am using Q2 2009, using a Radgrid, I have a few GridHyperLinkColumn's, they export fine to PDF and Excel, but usung ExportToCSV() simply returns an empty field on those columns. I have ExportOnlyData set to true and in order to be able to use these columns I had to do the trick for the CSV depicted here , which is kind of an old post and it reads that this problem had already been addressed, am I missing something?

Thanks
Luis



luisfernandoCR
Top achievements
Rank 1
 answered on 16 Dec 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?