Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
61 views
Hi,

I have a RadGrid with filtering of columns enabled. I have set the CurrentFilterFunction so that that filter function gets selected as default instead of the 'NoFilter'. I would like to use the Enter key to apply the selected filter function. Now when I press Enter key the filter function list open up instead of getting selected.

Thanks,
Raji
Shinu
Top achievements
Rank 2
 answered on 30 Nov 2011
1 answer
56 views

Hello!

 

Setup:

  1. 2 levels of grouping using the GroupByExpressions collection of the MasterTableView within the declarative portion of a page
  2. MasterTableView.GroupLoadMode set to “Client”
  3. MasterTableView.GroupsDefaultExpanded set to “false”

 

When I expand any of the top/1st level groups, I am expecting that the child/2nd level groups are shown expanded/collapsed based on their Expanded property. Instead what happens is that the child/2nd level groups are all shown as expanded.

 

Is this behavior expected or is there a fix/workaround that you can provide?

 

Thanks in advance,

Brent

 

<tlr:RadGrid runat="server" ID="grdDoubleGroupings" AutoGenerateColumns="true" 
    AllowSorting="true" 
    OnNeedDataSource="grdDoubleGroupings_NeedDataSource"
>
    <MasterTableView 
        GroupLoadMode="Client" 
        AllowMultiColumnSorting="true" 
        AllowNaturalSort="false" 
        GroupsDefaultExpanded="false"
    >
        <GroupByExpressions>
            <tlr:GridGroupByExpression>
                <GroupByFields>
                    <tlr:GridGroupByField FieldName="Category" />
                </GroupByFields>
                <SelectFields>
                    <tlr:GridGroupByField FieldName="Category" />
                </SelectFields>
            </tlr:GridGroupByExpression
            <tlr:GridGroupByExpression>
                <GroupByFields>
                    <tlr:GridGroupByField FieldName="Subcategory" />
                </GroupByFields>
                <SelectFields>
                    <tlr:GridGroupByField FieldName="Category" />
                    <tlr:GridGroupByField FieldName="Subcategory" />
                </SelectFields>                 
            </tlr:GridGroupByExpression>
        </GroupByExpressions>
    </MasterTableView>
</tlr:RadGrid>

Shinu
Top achievements
Rank 2
 answered on 30 Nov 2011
21 answers
627 views
I created a Tooltip based on the "Load On Demand" example.  In the tooltip I have an asp:Label and an asp:TextBox.  The values for these fields can change each time the tooltip is displayed.  When I initially display the tooltip, the label and textbox have the expected values.  However, when the tooltip is displayed the next time and I set different values for the label and textbox, the label shows the new value, but the textbox contains the original value.

This behavior can be observed by making the following changes to Load On Demand example code:

In the ProductDetails.ascx, add the following row to the "Product Wrapper" table:

<tr> 
    <td> 
        <asp:TextBox ID="txtDT" runat="server" /> 
        <asp:Label ID="lblDT" runat="server" /> 
    </td> 
</tr> 

In the ProductDetails.ascx.cs, add the following code to the ShowCurrentDetails() method:

String dt = DateTime.Now.ToLongTimeString(); 
txtDT.Text = dt
lblDT.Text = dt

The label's value is changes on each time the tooltip is displayed, but the textbox's value retains the original timestamp.

I also added the following code to the method UpdateToolTip(...) in Default.CS.aspx.cs, but it didn't help:

panel.Update();  

Any ideas on what I'm doing wrong?
Williams
Top achievements
Rank 1
 answered on 30 Nov 2011
1 answer
61 views
Hi Telerik Team,

I have a radgrid for which i am setting its height in aspx page everything works fine. But if the number of items in the Grid decreases it leaves whitespace which looks ugly.

Can anyone tell me the approch how to remove that whitespace...

when i remove scrolling and static headers its working fine..But i need them because in some cases i have 600 records..

Thanku Plz do reply its urgent...Its all over my project....

Princy
Top achievements
Rank 2
 answered on 30 Nov 2011
1 answer
467 views
I have a grid that i want to be able to click the row and it becomes selected.  On initial load of the page it does not work.  Once I sort a column or click on another button on the page the functionality works I am able to click on a row and it becomes selected.
Any help or suggestions would be greatly appreciated.

 

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

    <AjaxSettings>

 

        <telerik:AjaxSetting AjaxControlID="RadGrid1">

 

            <UpdatedControls>

 

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

 

            </UpdatedControls>

 

        </telerik:AjaxSetting>

 

    </AjaxSettings>

 

</telerik:RadAjaxManager>

 

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" MinDisplayTime="500" Transparency="25" BackColor="#ffffff" runat="server" CssClass="ajaxloader" />

 

<telerik:RadGrid ID="RadGrid1" runat="server"

 

AllowSorting="True" GridLines="None"

 

AutoGenerateColumns="false"

 

OnNeedDataSource="RadGrid1_NeedDataSource">

    <MasterTableView Width="100%" DataKeyNames="Id">

 

        <Columns>
            <telerik:GridClientSelectColumn UniqueName="ClientSelect" HeaderStyle-Width="5%" />

            <telerik:GridBoundColumn DataField="DisplayName" HeaderText="Name" UniqueName="DisplayName" DataType="System.String" HeaderStyle-Width="20%" />

 

            <telerik:GridBoundColumn DataField="FileDateTime" HeaderText="Created Date/Time" UniqueName="Created" DataType="System.DateTime" HeaderStyle-Width="20%" DataFormatString="{0:MM/dd/yy hh:mm tt}" />

 

            <telerik:GridBoundColumn DataField="LastSentDateTime" HeaderText="Last Used" UniqueName="Sent" DataType="System.DateTime" HeaderStyle-Width="20%" DataFormatString="{0:MM/dd/yy hh:mm tt}" />
            <telerik:GridTemplateColumn ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="30%" HeaderText="Message Type" AllowFiltering="false" UniqueName="MessageFormat" SortExpression="MessageFormat">
                <ItemTemplate>
                    <asp:ImageButton ID="ibtnPhone" runat="server" ImageUrl="~/Images/pc_icon_phone.gif" CommandName="ListenPhone" ToolTip="Listen to message" />

 

                    <asp:ImageButton ID="ibtnSMS" runat="server" ImageUrl="~/Images/pc_icon_txt.gif" CommandName="ViewSMS" ToolTip="View SMS Message" />
                <
/ItemTemplate>

 

                <HeaderStyle HorizontalAlign="Left" />

 

                <ItemStyle HorizontalAlign="Left" />
            </telerik:GridTemplateColumn>
        </Columns>

 

    </MasterTableView>
    <ClientSettings>
        <Selecting AllowRowSelect="True" />

 

    </ClientSettings>

 

</telerik:RadGrid>

Shinu
Top achievements
Rank 2
 answered on 30 Nov 2011
3 answers
84 views
Hi All,

When we try to Export  radGrid  to Excel , we  need to export grid along with custom  header .
eg:
header:
name:dddd
age:28
place:chennai

then grid.....


Please advice.
Shinu
Top achievements
Rank 2
 answered on 30 Nov 2011
1 answer
75 views
How can I close a RadWindow bij clicking on the RadWindow?

Regards,
Marc
Shinu
Top achievements
Rank 2
 answered on 30 Nov 2011
1 answer
153 views
Hi,

In Treeview, How to get parent node of a selected node in server side?

Thanks,
Arunshyam
Princy
Top achievements
Rank 2
 answered on 30 Nov 2011
7 answers
330 views
I have a grid with a loading panel.  When I apply a new filter or sort the grid by clicking on one of the column headers, the loading panel graphic shows just fine.

But during page load, the loading panel graphic never shows, even though the page takes a few seconds to load (it actually takes more time than sorting or filtering).

The .aspx code for the page is shown below.  The code behind follows.

Thanks in advance!

Lynn
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/EPSDev3.master" AutoEventWireup="true" CodeFile="PetitionInfo.aspx.cs" Inherits="PetitionInfo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<style type="text/css">
    .VerticalAlign1 
    
        padding-top: 6px;
    }
        .style1
        {
            height: 31px;
        }
        .RadGrid_Default .rgHeaderDiv
        {
            width: 785px !important;
        }
 
        .RadGrid_Default .rgFooterDiv
        {
            width: 785px !important;
        }
</style>
 </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
      <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
        <!-- content start -->
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="SignersGrid">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="SignersGrid" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" AlternateText="Loading..." Skin="Black" runat="server"  />
    <div style="width: 800px;">
        <div style="float: left; background-color: White; padding: 0px;">
            <table cellpadding="1" cellspacing="0" border="0" >
                <tr>
                    <td colspan="5" align="center" >
                        <h2>
                            <asp:Label ID="VoterAuthenticationLabel" runat="server" Text="<%$ Resources:Resource, PetitionInformationLabel %>"></asp:Label>
                        </h2>
                    </td>
                </tr>
                <tr>
                    <td width="2%">
                          
                    </td>
                    <td width="47%" valign="top">
                        <table >
                            <tr>
                                <td colspan="2" align="left" style="font-weight: normal; height: 12px;">
                                    <asp:Label ID="Label6" runat="server" Font-Bold="true" Text="<%$ Resources:Resource, CandidateInformationLabel%>"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="CycleLabel" runat="server" Text="<%$ Resources:Resource, CycleLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="ElectionCycleList" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label1" runat="server" Text="<%$ Resources:Resource, RaceLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="PoliticalRaceList" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label2" runat="server" Text="<%$ Resources:Resource, NameLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="CandidateName" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label3" runat="server" Text="<%$ Resources:Resource, AddressLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="CandidateAddress" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label4" runat="server" Text="<%$ Resources:Resource, CityStZipLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="CandidateCity" runat="server" Text=""></asp:Label>
                                       
                                    <asp:Label ID="CandidateState" runat="server" Text=""></asp:Label>
                                       
                                    <asp:Label ID="CandidateZipCode" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label5" runat="server" Text="<%$ Resources:Resource, CountyLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="CandidateCountyList" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td width="2%">
                          
                    </td>
                    <td width="47%"  valign="top">
                        <table width="100%">
                            <tr>
                                <td colspan="2" align="left" style="font-weight: normal; height: 12px;">
                                    <asp:Label ID="Label7" runat="server" Font-Bold="true" Text="<%$ Resources:Resource, ContactInformationLabel%>"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label8" runat="server" Text="<%$ Resources:Resource, NameLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="ContactName" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label9" runat="server" Text="<%$ Resources:Resource, PhoneLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="ContactPhone" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label10" runat="server" Text="<%$ Resources:Resource, EmailLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="ContactEmailAddress" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label11" runat="server" Text="<%$ Resources:Resource, WebSiteLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="ContactWebSiteURL" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <asp:Label ID="Label16" runat="server" Text="<%$ Resources:Resource, LinkToLabel %>"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="LinkToURL" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td width="2%">
                          
                    </td>
                </tr>
                <tr>
                    <td colspan="5">
                          
                    </td>
                </tr>
                <tr >
                    <td>
                          
                    </td>
                        <td align="center" valign="middle" colspan="3" >
                            <asp:Label CssClass="VerticalAlign1" ID="PetitionsListTitle" Font-Size="16px" Width="100%" BackColor="#565A43" Height="24px" ForeColor="#ffffff" Font-Bold="true" runat="server" Text="<%$ Resources:Resource, PetitionSignersLabel %>"></asp:Label>
                        </td>
                    <td>
                          
                    </td>
                </tr>
                <tr>
                    <td width="2%">
                          
                    </td>
                    <td colspan="3" valign="middle">
                        <telerik:RadGrid AutoGenerateColumns="false" ID="SignersGrid" runat="server" Width="785px"
                            AllowSorting="true" AllowFilteringByColumn="true" EnableLinqExpressions="true"
                            AllowPaging="false" PageSize="15" CommandItemDisplay="Bottom"
                            BorderWidth="1px" BorderColor="#999999" EnableEmbeddedSkins="true" Skin="Default"
                            DataSourceID="SQLDataSource1"
                            ShowStatusBar="true"
                            ShowFooter="false" GridLines="None" >
                            <PagerStyle Mode="NextPrevAndNumeric" />
                            <GroupingSettings CaseSensitive="false" />
                            <StatusBarSettings ReadyText="Ready" LoadingText="Loading..." />
                            <MasterTableView AutoGenerateColumns="false" EditMode="InPlace" AllowFilteringByColumn="True"
                                ShowFooter="True" TableLayout="Auto">
                                <Columns>
 
                                    <telerik:GridBoundColumn HeaderStyle-Width="150px" HeaderText="First Name" UniqueName="FirstName" DataField="FirstName" SortExpression="FirstName" >
                                    </telerik:GridBoundColumn>
 
                                    <telerik:GridBoundColumn HeaderStyle-Width="150px" UniqueName="LastName" HeaderText="Last Name" DataField="LastName" SortExpression="LastName" >
                                    </telerik:GridBoundColumn>
 
                                    <telerik:GridBoundColumn HeaderStyle-Width="350px" UniqueName="VoterAddress" HeaderText="Address" DataField="Address" SortExpression="Address"  >
                                    </telerik:GridBoundColumn >
 
                                    <telerik:GridButtonColumn CommandName="RemoveSigner" HeaderStyle-Width="135px" UniqueName="RemoveSigner" HeaderText="Remove" ButtonType="PushButton" Text="Remove" ConfirmText="Are you certain that you want to remove this signature?" >
                                    </telerik:GridButtonColumn>
 
                                </Columns>
                            </MasterTableView>
                            <ClientSettings>
                                <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                            </ClientSettings>
                        </telerik:RadGrid>
                    </td>
                    <td width="2%">
                          
                    </td>
                </tr>
 
                <tr>
                    <td colspan="5" align="center" >
                        <asp:Label ID="Label17" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
 
                <tr>
                    <td colspan="5" align="center" >
                        <asp:Label ID="SignatureCountMessage" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
 
                <tr>
                    <td colspan="5" align="center" >
                        <asp:Label ID="Label18" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td colspan="5" align="center" >
                          
                    </td>
                </tr>
                <tr >
                    <td>
                          
                    </td>
                        <td align="center" valign="middle" colspan="3" >
                            <asp:Label CssClass="VerticalAlign1" ID="Label14" Font-Size="16px" Width="100%" BackColor="#565A43" Height="24px" ForeColor="#ffffff" Font-Bold="true" runat="server" Text="<%$ Resources:Resource, CloseAndPrintLabel %>"></asp:Label>
                        </td>
                    <td>
                          
                    </td>
                </tr>
                <tr>
                    <td colspan="5" align="center" >
                          
                    </td>
                </tr>
                <tr>
                    <td colspan="5" align="center" >
                        <asp:Button ID="ReturnToMyDocs" runat="server" TabIndex="6"
                            Text="<%$ Resources:Resource, ReturnToMyEDocs %>"
                            onclick="ReturnToMyDocs_Click" />
                            
                        <asp:Button ID="ClosePetitionButton" TabIndex="7" runat="server" Text="<%$ Resources:Resource, ClosePetitionBtn %>" />
                            
                        <asp:Button ID="PrintListButton" TabIndex="8" runat="server" Text="<%$ Resources:Resource, PrintListBtn %>" />
                            
                        <asp:Button ID="PrintForFilingButton" TabIndex="9" runat="server" Text="<%$ Resources:Resource, PrintForFilingBtn %>" />
                    </td>
                </tr>
                <tr>
                    <td colspan="5" align="center" >
                          
                    </td>
                </tr>
            </table>
        </div>
        <div class="clear">
        </div>
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:ElectronicPetitionSystemConnectionString %>"
        ProviderName="System.Data.SqlClient" runat="server">
    </asp:SqlDataSource>
</asp:Content>


And now the code behind:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
 
public partial class PetitionInfo : System.Web.UI.Page
{
    protected void Page_Init(object sender, EventArgs e)
    {
            //  Set the sql statement for the sql data source
            string griddatasource = "SELECT VoterSignatureId, PetitionId, LastName, FirstName, MiddleName, NameSuffix, [Address], CountyId, Email, SignatureImage, CountyVoterId, ";
            griddatasource = griddatasource + "MvdSerialNumber, DateSigned, ClientIpAddress, VoterSignatureStatusId, CreatedDate, ModifiedDate ";
            griddatasource = griddatasource + "FROM VoterSignatures ";
            string gridWHERE = "WHERE PetitionId = " + Request.QueryString["PID"];
            SqlDataSource1.SelectCommand = griddatasource + gridWHERE;
    }
 
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
 
            if (Request.QueryString["PID"].Length > 0)
            {
                Int32 iMyKeyValue = Convert.ToInt32(Request.QueryString["PID"]);
                ElectronicPetitionSystemDataContext efdc = new ElectronicPetitionSystemDataContext();
 
                var petn =
                    (from pe in efdc.Misc_GetPetitionInfo(iMyKeyValue)
                     select pe).First();
                //  First display the individual fields at the top of the screen
                this.ElectionCycleList.Text = petn.CycleName;
                this.PoliticalRaceList.Text = petn.OfficeDescription;
                this.CandidateName.Text = petn.CandidateDisplayName;
                this.CandidateAddress.Text = petn.Address1;
                this.CandidateCity.Text = petn.City;
                this.CandidateState.Text = petn.State;
                this.CandidateZipCode.Text = petn.Zip;
                this.CandidateCountyList.Text = petn.CountyName;
                this.ContactName.Text = petn.ContactDisplayName;
                this.ContactPhone.Text = petn.ContactPhone;
                this.ContactEmailAddress.Text = petn.ContactEmail;
                this.ContactWebSiteURL.Text = petn.ContactLink;
                this.LinkToURL.Text = Convert.ToString(petn.DeepLinkGuid);
 
            }
        }
                SignatureCountMessage.Text = "(" + (String)GetGlobalResourceObject("Resource", "YouCurrentlyHave1") + " nn " + (String)GetGlobalResourceObject("Resource", "YouCurrentlyHave2") + " nnnn " + (String)GetGlobalResourceObject("Resource", "YouCurrentlyHave3") + ")";
    }
 
    //  Telerik grid sample with filtering, etc.
    //
    //
    //  The following link may be a better example for the SQL/filtering handling
 
    protected void ReturnToMyDocs_Click(object sender, EventArgs e)
    {
        Response.Redirect("MyeDocs.aspx");
    }
}

Lynn
Top achievements
Rank 2
 answered on 30 Nov 2011
2 answers
82 views
Hello Team;

I've read on both controls and I still don't know which is the best for a NEW project that requires:
a) Multiple files to be uploaded.
b) Once files are uploaded I need to give them proper name and store them in a proper folder on server.

I see both being upgraded and still can't decide which one to use. Could you please tell me the major difference and which one is the best and latest to use and go forward?

Thank you in advance!
Ben Hayat
Top achievements
Rank 2
 answered on 30 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?