Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
172 views
Hello,
I am trying to set the value in the RAD Combo Box. My situation is: I have one Page from which I popup other page..And before I close the popup, I set the value of the Combobox in the Parent Page using Javascript Function.
I know I can set the Combobox value if I access it like, 
var combo = $find("<%= RadComboBox1.ClientID %>");   
in the javascript function.
But I can not access it like that bcz it is on another page..
I have only one option to access it through,

var

 

 

objstate = document.getElementById('maincontent_RadcomboBox');

 


So I can only access using its PageRendered name and not by the actual name...
The ASP DROPDOWN works fine if I access it like this.
Plz suggest any solution ASAP...

Thasnk,
Deepa
Deepa
Top achievements
Rank 1
 answered on 14 Dec 2010
2 answers
251 views
Hi all,
I am implementing custom radGrid column with datefrom, dateto and datebetween filtering. I derived my column from GridBoundColumn similar as described in article http://www.telerik.com/help/aspnet-ajax/grdimplementingfilteringfortemplatecolumns.html. My column uses two datepickers for filtering. I provide filtering in registered clientscript. CurrentFilterValue is set correct whenever SetCurrentFilterValueToControl is invoked. Only one problem is that I am not able to detect CurrentFilterFunction in overriden method. It becomes always value NoFilter. How can I detect CurrentFilterFunction?
-Thanks
protected override void SetCurrentFilterValueToControl(TableCell cell)
{
    base.SetCurrentFilterValueToControl(cell);
    if (!string.IsNullOrWhiteSpace(this.CurrentFilterValue))
    {
        // this.CurrentFilterFuncion always returns NoFilter
        switch (this.CurrentFilterFuncion)
            case GridKnownFunction.Between:
               // ...
            case GridKnownFunction.LessThanOrEqualTo:
               // ...
            case GridKnownFunction.GreatherThanOrEqualTo:
               // ...
    }
}
Marian
Top achievements
Rank 1
 answered on 14 Dec 2010
2 answers
72 views
Developers,

I am new to this, and I need to identify (locate)  the file that is used to display the alert icon (exclamation sign) that appears after a user has entered an invalid date.  I need to replace that file with another picture.  Please see the attachment.

Thanks for your help.

EDP
Eduardo Dulanto
Top achievements
Rank 1
 answered on 14 Dec 2010
13 answers
483 views

Greetings.

I'd like to have some custom templates for my template column in addition to ItemTemplate, EditTemplate, etc.

So i inherited from GridTemplateColumn and addted ITemplate properties, for instance, ExportItemTemplate.

The question is HOW to use this in the code? For instance:

1.<MyGridTemplateColumn ...>
2.  <ExportItemTemplate>
3.    <asp:Label ID="Name" runat="server" />
4.  </ExportItemTemplate>
5.  <ItemTemplate>
6.    <asp:Label ID="Name" runat="server" />
7.  </ItemTemplate>
8.</MyGridTemplateColumn>
1.In c#:
2.[access controls in ItemTemplate only] 
3.[access controls in ExportItemTemplate only]

And by the way! I want to use this templates in client-side binding!

Bruno
Top achievements
Rank 2
 answered on 14 Dec 2010
3 answers
96 views
Hello,
   We recently moved our web site to a new host, and have lost the ability for RadCharts to show custom colors on the series displays.  I found a post about adding a custom palette which works for Bar / Line charts that use a MainColor and SecondColor.  But is there a way to do this for Complex Gradient Colors?  Seems to be a security/trust issue or something not letting me programmatically change the colors via VB or even take custom settings through the control properties, am always getting the default skin palette showing up.  (Does work when using "View in Browser") option on local development PC, however.)

VB and ASPX below.  Suggestions appreciated.

Regards,
Dave

 

 

Protected Sub SetupChart()

 

 

 

'RadChart1.Clear()

 

 

 

'Dim series0 As ChartSeries = New ChartSeries("Develop", ChartSeriesType.StackedBar)

 

 

 

'Dim series1 As ChartSeries = New ChartSeries("Work", ChartSeriesType.StackedBar)

 

 

 

'Dim series2 As ChartSeries = New ChartSeries("Retirement", ChartSeriesType.StackedBar)

 

 

 

'Dim series3 As ChartSeries = New ChartSeries("Years", ChartSeriesType.StackedBar)

 

 

 

''

 

 

 

'' Note: series 3 is not displayed, it is just used to set the "years" range on the

 

 

 

'' secondary axis display.

 

 

 

''

 

 

 

'RadChart1.SeriesOrientation = ChartSeriesOrientation.Horizontal

 

 

 

'RadChart1.Series.Add(series0)

 

 

 

'RadChart1.Series.Add(series1)

 

 

 

'RadChart1.Series.Add(series2)

 

 

 

'RadChart1.Series.Add(series3)

 

RadChart1.Series(3).YAxisType =

 

ChartYAxisType.Secondary

 

RadChart1.Series(3).Appearance.LegendDisplayMode =

 

ChartSeriesLegendDisplayMode.Nothing

 

RadChart1.AutoLayout =

 

False

 

RadChart1.PlotArea.YAxis2.AutoScale =

 

False

 

RadChart1.Series(3).Visible =

 

False

 

 

 

With RadChart1.Series(0).Appearance

 

.LabelAppearance.Position.Auto =

 

True

 

.LabelAppearance.Position.AlignedPosition =

 

AlignedPositions.Center

 

.LabelAppearance.LabelLocation =

 

LabelLocation.InsidePlotArea

 

.TextAppearance.TextProperties.Font =

 

New Font("Verdana", 12, FontStyle.Bold)

 

.FillStyle.FillSettings.GradientMode =

 

GradientFillStyle.Circle

 

.FillStyle.FillType =

 

FillType.Gradient

 

.FillStyle.FillSettings.ComplexGradient.Add(

 

New GradientElement(Color.Red, 0))

 

.FillStyle.FillSettings.ComplexGradient.Add(

 

New GradientElement(Color.Orange, 0.5))

 

.FillStyle.FillSettings.ComplexGradient.Add(

 

New GradientElement(Color.Yellow, 1))

 

.TextAppearance.Position.AlignedPosition =

 

AlignedPositions.Center

 

 

 

' .Border.Color = Color.Black

 

.Corners.BottomLeft =

 

CornerType.Round

 

.Corners.BottomRight =

 

CornerType.Round

 

.Corners.TopLeft =

 

CornerType.Round

 

.Corners.TopRight =

 

CornerType.Round

 

.Corners.RoundSize = 10

 

 

End With

 

 

 

'With series0.Appearance

 

 

 

' .LabelAppearance.Position.Auto = True

 

 

 

' .LabelAppearance.Position.AlignedPosition = AlignedPositions.Center

 

 

 

' .LabelAppearance.LabelLocation = LabelLocation.InsidePlotArea

 

 

 

' .TextAppearance.TextProperties.Font = New Font("Verdana", 12, FontStyle.Bold)

 

 

 

' .FillStyle.FillSettings.GradientMode = GradientFillStyle.Circle

 

 

 

' .FillStyle.FillType = FillType.Gradient

 

 

 

' .FillStyle.FillSettings.ComplexGradient.Add(New GradientElement(Color.Red, 0))

 

 

 

' .FillStyle.FillSettings.ComplexGradient.Add(New GradientElement(Color.Orange, 0.5))

 

 

 

' .FillStyle.FillSettings.ComplexGradient.Add(New GradientElement(Color.Yellow, 1))

 

 

 

' .TextAppearance.Position.AlignedPosition = AlignedPositions.Center

 

 

 

' ' .Border.Color = Color.Black

 

 

 

' .Corners.BottomLeft = CornerType.Round

 

 

 

' .Corners.BottomRight = CornerType.Round

 

 

 

' .Corners.TopLeft = CornerType.Round

 

 

 

' .Corners.TopRight = CornerType.Round

 

 

 

' .Corners.RoundSize = 10

 

 

 

'End With

 

 

 

With RadChart1.Series(1).Appearance

 

.LabelAppearance.Position.Auto =

 

True

 

.LabelAppearance.Position.AlignedPosition =

 

AlignedPositions.Center

 

.LabelAppearance.LabelLocation =

 

LabelLocation.InsidePlotArea

 

.TextAppearance.TextProperties.Font =

 

New Font("Verdana", 12, FontStyle.Bold)

 

.FillStyle.FillSettings.GradientMode =

 

GradientFillStyle.Circle

 

.FillStyle.FillType =

 

FillType.Gradient

 

.FillStyle.FillSettings.ComplexGradient.Add(

 

New GradientElement(Color.Blue, 0))

 

.FillStyle.FillSettings.ComplexGradient.Add(

 

New GradientElement(Color.Azure, 0.5))

 

.FillStyle.FillSettings.ComplexGradient.Add(

 

New GradientElement(Color.LightBlue, 1))

 

.FillStyle.MainColor =

 

Color.Red

 

.FillStyle.SecondColor =

 

Color.White

 

.TextAppearance.Position.AlignedPosition =

 

AlignedPositions.Center

 

.Corners.BottomLeft =

 

CornerType.Round

 

.Corners.BottomRight =

 

CornerType.Round

 

.Corners.TopLeft =

 

CornerType.Round

 

.Corners.TopRight =

 

CornerType.Round

 

.Corners.RoundSize = 10

 

 

End With

 

 

 

With RadChart1.Series(2).Appearance

 

.LabelAppearance.Position.Auto =

 

True

 

.LabelAppearance.Position.AlignedPosition =

 

AlignedPositions.Center

 

.LabelAppearance.LabelLocation =

 

LabelLocation.InsidePlotArea

 

.TextAppearance.TextProperties.Font =

 

New Font("Verdana", 12, FontStyle.Bold)

 

.FillStyle.FillSettings.GradientMode =

 

GradientFillStyle.Circle

 

.FillStyle.FillType =

 

FillType.Gradient

 

.FillStyle.FillSettings.ComplexGradient.Add(

 

New GradientElement(Color.Green, 0))

 

.FillStyle.FillSettings.ComplexGradient.Add(

 

New GradientElement(Color.LightGreen, 0.5))

 

.FillStyle.FillSettings.ComplexGradient.Add(

 

New GradientElement(Color.Aquamarine, 1))

 

.FillStyle.MainColor =

 

Color.Red

 

.FillStyle.SecondColor =

 

Color.White

 

.TextAppearance.Position.AlignedPosition =

 

AlignedPositions.Center

 

.Corners.BottomLeft =

 

CornerType.Round

 

.Corners.BottomRight =

 

CornerType.Round

 

.Corners.TopLeft =

 

CornerType.Round

 

.Corners.TopRight =

 

CornerType.Round

 

.Corners.RoundSize = 10

 

 

End With

 

 

 

'With (RadChart1.Series(0).Appearance)

 

 

 

' .LabelAppearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.Top

 

 

 

' '.FillStyle.FillSettings.ComplexGradient(0).Color = System.Drawing.Color.Green

 

 

 

' '.FillStyle.FillSettings.ComplexGradient(2).Color = Drawing.Color.DarkGreen

 

 

 

'End With

 

 

 

' RadChart1.PlotArea.Appearance.Dimensions.Width = 400

 

 

 

' RadChart1.Visible = True

 

 

 

End Sub

<telerik:RadChart ID="RadChart1" runat="server"
   AlternateText="Loading..." DefaultType="StackedBar" Height="180px" SeriesOrientation="Horizontal"
   Skin="Desert" Width="500px">
  <Appearance>
    <Border Color="183, 181, 159" />
  </Appearance>
  <series>
    <telerik:ChartSeries Name="Developing" Type="StackedBar">
      <Appearance BarWidthPercent="50" Corners="Round, Round, Round, Round, 3">
        <FillStyle FillType="ComplexGradient" MainColor="Red" SecondColor="Orange">
          <FillSettings>
            <ComplexGradient>
              <telerik:GradientElement Color="Red" />
              <telerik:GradientElement Color="Orange" Position="0.5" />
              <telerik:GradientElement Color="Yellow" Position="1" />
            </ComplexGradient>
          </FillSettings>
        </FillStyle>
        <LabelAppearance LabelLocation="Inside" Position-AlignedPosition="Center">
        </LabelAppearance>
        <TextAppearance TextProperties-Color="108, 105, 87">
        </TextAppearance>
        <Border Color="187, 149, 58" />
      </Appearance>
    </telerik:ChartSeries>
    <telerik:ChartSeries Name="Work" Type="StackedBar">
      <Appearance Corners="Round, Round, Round, Round, 3">
        <FillStyle FillType="ComplexGradient" MainColor="Blue" SecondColor="LightBlue">
          <FillSettings>
            <ComplexGradient>
              <telerik:GradientElement Color="Blue" />
              <telerik:GradientElement Color="Azure" Position="0.5" />
              <telerik:GradientElement Color="LightBlue" Position="1" />
           </ComplexGradient>
         </FillSettings>
       </FillStyle>
       <LabelAppearance LabelLocation="Inside" Position-AlignedPosition="Center"
          Position-Auto="true">
       </LabelAppearance>
       <TextAppearance Position-AlignedPosition="Center"
          TextProperties-Color="108, 105, 87">
       </TextAppearance>
       <Border Color="129, 180, 193" />
     </Appearance>
   </telerik:ChartSeries>
   <telerik:ChartSeries Name="Retirement" Type="StackedBar">
     <Appearance Corners="Round, Round, Round, Round, 3">
       <FillStyle FillType="ComplexGradient">
         <FillSettings>
           <ComplexGradient>
             <telerik:GradientElement Color="Green" />
             <telerik:GradientElement Color="LightGreen" Position="0.5" />
             <telerik:GradientElement Color="Aquamarine" Position="1" />
           </ComplexGradient>
         </FillSettings>
       </FillStyle>
       <TextAppearance TextProperties-Color="108, 105, 87">
       </TextAppearance>
       <Border Color="123, 154, 69" />
     </Appearance>
   </telerik:ChartSeries>
   <telerik:ChartSeries Name="CalendarYears" Type="StackedBar" Visible="False"
      YAxisType="Secondary">
     <Appearance LegendDisplayMode="Nothing">
       <FillStyle FillType="ComplexGradient">
         <FillSettings>
           <ComplexGradient>
             <telerik:GradientElement Color="187, 174, 165" />
             <telerik:GradientElement Color="163, 146, 135" Position="0.5" />
             <telerik:GradientElement Color="134, 115, 103" Position="1" />
           </ComplexGradient>
         </FillSettings>
       </FillStyle>
       <TextAppearance TextProperties-Color="108, 105, 87"></TextAppearance>
       <Border Color="136, 119, 102" />
     </Appearance>
   </telerik:ChartSeries>
  </series>
  <Legend>
    <Appearance Dimensions-Margins="8px, 10px, 1px, 5px" Overflow="Auto"
       Position-AlignedPosition="TopRight">
      <ItemTextAppearance AutoTextWrap="False" TextProperties-Color="87, 84, 65">
      </ItemTextAppearance>
      <FillStyle MainColor="243, 243, 229"></FillStyle>
      <Border Color="208, 207, 195" />
    </Appearance>
  </Legend>
  <PlotArea>
    <XAxis MaxItemsCount="1">
      <Appearance Color="215, 214, 202" MajorTick-Color="226, 225, 207">
        <MajorGridLines Color="226, 225, 207" PenStyle="Solid" />
        <LabelAppearance Visible="False"></LabelAppearance>
        <TextAppearance TextProperties-Color="87, 84, 65"></TextAppearance>
      </Appearance>
      <AxisLabel>
        <Appearance RotationAngle="270"></Appearance>
        <TextBlock Text="" Visible="False">
          <Appearance TextProperties-Color="96, 93, 75"></Appearance>
        </TextBlock>
      </AxisLabel>
    </XAxis>
    <YAxis>
      <Appearance Color="212, 211, 199" MajorTick-Color="226, 225, 207"
         MinorTick-Color="226, 225, 207" MinorTick-Width="0">
         <MajorGridLines Color="226, 225, 207" PenStyle="Solid" />
         <MinorGridLines Color="226, 225, 207" PenStyle="Solid" Width="0" />
         <LabelAppearance Position-AlignedPosition="Top"></LabelAppearance>
         <TextAppearance Position-AlignedPosition="Top" TextProperties-Color="DarkGreen">
         </TextAppearance>
       </Appearance>
       <AxisLabel Visible="True">
          <Appearance Position-Auto="False" Position-X="220" Position-Y="155"
              RotationAngle="0" Visible="True">
          </Appearance>
          <TextBlock Text="Age (years)">
            <Appearance Position-AlignedPosition="Top" TextProperties-Color="DarkGreen"></Appearance>
          </TextBlock>
       </AxisLabel>
     </YAxis>
     <YAxis2 AutoScale="False" MaxValue="100" MinValue="0" Step="10" Visible="True">
       <Appearance MinorTick-MinorTickCount="4" ValueFormat="General">
          <TextAppearance TextProperties-Color="DarkBlue"></TextAppearance>
       </Appearance>
       <AxisLabel Visible="True">
         <Appearance Dimensions-Paddings="0px, 1px, 0px, 1px" RotationAngle="0"
            Visible="True" Position-Auto="False" Position-X="236" Position-Y="50">
         </Appearance>
         <TextBlock Text="Year">
           <Appearance TextProperties-Color="DarkBlue"></Appearance>
         </TextBlock>
       </AxisLabel>
     <Items>
       <telerik:ChartAxisItem></telerik:ChartAxisItem>
       <telerik:ChartAxisItem Value="10"></telerik:ChartAxisItem>
       <telerik:ChartAxisItem Value="20"></telerik:ChartAxisItem>
       <telerik:ChartAxisItem Value="30"></telerik:ChartAxisItem>
       <telerik:ChartAxisItem Value="40"></telerik:ChartAxisItem>
       <telerik:ChartAxisItem Value="50"></telerik:ChartAxisItem>
       <telerik:ChartAxisItem Value="60"></telerik:ChartAxisItem>
       <telerik:ChartAxisItem Value="70"></telerik:ChartAxisItem>
       <telerik:ChartAxisItem Value="80"></telerik:ChartAxisItem>
       <telerik:ChartAxisItem Value="90"></telerik:ChartAxisItem>
       <telerik:ChartAxisItem Value="100"></telerik:ChartAxisItem>
     </Items>
   </YAxis2>
   <Appearance Dimensions-AutoSize="False" Dimensions-Height="40px"
      Dimensions-Margins="2%, 7%, 2%, 5%" Dimensions-Width="440px"
      Position-AlignedPosition="Center" Position-Auto="False" Position-X="35"
      Position-Y="95">
     <FillStyle FillType="Solid" MainColor="243, 243, 229"></FillStyle>
     <Border Color="208, 207, 195" />
   </Appearance>
 </PlotArea>
 <ChartTitle>
   <Appearance Dimensions-Margins="4%, 0px, 0px, 8%"></Appearance>
   <TextBlock Text="Time in Phase">
      <Appearance TextProperties-Color="DarkRed" TextProperties-Font="Verdana, 12pt, style=Bold">
       </Appearance>
  </TextBlock>
 </ChartTitle>
</telerik:RadChart>

 

Velin
Telerik team
 answered on 14 Dec 2010
1 answer
111 views
Is there a way to increase the font face selection to include more font types?
And is there a way to have a custom color picker added?
I'm using ASP.NET AJAX  2009 Q3.
Rumen
Telerik team
 answered on 14 Dec 2010
6 answers
106 views
Hi,

I have recently upgraded our application to use 2008.3 1314 (Jan 14, 2009)

We now get the following error when using the Editor control in IE8 only:

Message: 'Telerik.Web.UI.FormDecoratorDecoratedControls.Default' is null or not an object

This was not occuring in the previous version we were using before, is there a fix / patch available to allow us to use the control in IE8 or can we download the previous (older) version that works?
Rumen
Telerik team
 answered on 14 Dec 2010
7 answers
133 views
Hi,
         I have Radrotator placed inside my sharepoint webpart. The datasource for the Radrotator contains the different sizes of images.
for example one image can be width of 200 and height of 300px, and other can be width of 100 and height of 250px. So i dont want to specify any specific height to the Radrotator. If i did not mention any height and i can see rotator taking default height as "200Px".
With this behaviour i'm unable to see the desired output.
Following two approaches i tried.

If i set the height>200 px, but still i dont see any change to the image height but there is some gap below the image.
If i set the height below 200px then the image height  are coming down to 100px.

So, please help in removing default height of rotator and the rotator height should be the default height of actual image.

Thanks,
Srikanth.

Fiko
Telerik team
 answered on 14 Dec 2010
3 answers
99 views
I have implemented something very similar to the RadToolTip for RadCalendar example on the demo site.

http://demos.telerik.com/aspnet-ajax/tooltip/examples/tooltipcalendar/defaultcs.aspx

My problem is there is a slight delay while the tooltip content is loaded, so at first glance, to the user, it looks like it doesn't work.  The demo has a ajax loading indicator to get around this problem.  However, when I look at the code for the example I don't see what is causing this to happen.

Would someone please show me where the code is in the demo that makes the ajax loading image appear?

Dallas
Dallas Gaddis
Top achievements
Rank 1
 answered on 14 Dec 2010
1 answer
64 views
Hello,

How can we add pager control of RadGrid to panel outside Radgrid?how can we display paging of RadGrid(Paging visible in RadGrid header or Footer) in panel which is outside radgrid.

i tried in the following way

<

 

 

telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" ShowHeader="true"

 

 

 

ShowFooter="false" AllowSorting="True" Skin="ManageInventory" EnableEmbeddedSkins="false"

 

 

 

PageSize="10" AllowPaging="true" OnItemCreated="RadGrid1_ItemCreated">

 

 

 

<ItemStyle />

 

 

 

<MasterTableView AutoGenerateColumns="False" DataKeyNames="Reg_id" DataSourceID="SqlDataSource1">

 

 

 

 

<PagerTemplate>

 

 

 

<asp:Panel ID="PagerPanel" Style="padding: 6px; line-height: 24px" runat="server">

 

 

 

<div style="float: left">

 

 

 

<span style="margin-right: 3px;">Page size:</span>

 

 

 

<telerik:RadComboBox ID="RadComboBox1" DataSource="<%# new object[]{10, 20, 30, 40, 50} %>"

 

 

 

Style="margin-right: 20px;" Width="40px" SelectedValue='<%# DataBinder.Eval(Container, "Paging.PageSize") %>'

 

 

 

runat="server" OnClientSelectedIndexChanged="RadComboBox1_SelectedIndexChanged">

 

 

 

</telerik:RadComboBox>

 

 

 

</div>

 

 

 

<div style="margin: 0px; float: right;">

 

Displaying page

<%

 

# (int)DataBinder.Eval(Container, "Paging.CurrentPageIndex") + 1 %>

 

of

<%

 

# DataBinder.Eval(Container, "Paging.PageCount")%>

 

, items

<%

 

# (int)DataBinder.Eval(Container, "Paging.FirstIndexInPage") + 1 %>

 

to

<%

 

# (int)DataBinder.Eval(Container, "Paging.LastIndexInPage") + 1 %>

 

of

<%

 

# DataBinder.Eval(Container, "Paging.DataSourceCount")%>

 

 

 

</div>

 

 

 

<div style="width: 260px; margin: 0px; padding: 0px; float: left; margin-right: 10px;

 

 

 

 

white-space: nowrap;">

 

 

 

<asp:Button ID="Button1" runat="server" OnClientClick="changePage('first'); return false;"

 

 

 

CommandName="Page" CommandArgument="First" Text=" " CssClass="PagerButton FirstPage" />

 

 

 

<asp:Button ID="Button2" runat="server" OnClientClick="changePage('prev'); return false;"

 

 

 

CommandName="Page" CommandArgument="Prev" Text=" " CssClass="PagerButton PrevPage" />

 

 

 

<span style="vertical-align: middle;">Page:</span>

 

 

 

<telerik:RadNumericTextBox ID="RadNumericTextBox1" Width="25px" Value='<%# (int)DataBinder.Eval(Container, "Paging.CurrentPageIndex") + 1 %>'

 

 

 

runat="server">

 

 

 

<ClientEvents OnValueChanged="RadNumericTextBox1_ValueChanged" />

 

 

 

<NumberFormat DecimalDigits="0" />

 

 

 

</telerik:RadNumericTextBox>

 

 

 

<span style="vertical-align: middle;">of

 

<%

 

# DataBinder.Eval(Container, "Paging.PageCount")%>

 

 

 

</span>

 

 

 

<asp:Button ID="Button3" runat="server" OnClientClick="changePage('next'); return false;"

 

 

 

CommandName="Page" CommandArgument="Next" Text=" " CssClass="PagerButton NextPage" />

 

 

 

<asp:Button ID="Button4" runat="server" OnClientClick="changePage('last'); return false;"

 

 

 

CommandName="Page" CommandArgument="Last" Text=" " CssClass="PagerButton LastPage" />

 

 

 

</div>

 

 

 

</asp:Panel>

 

 

 

</PagerTemplate>

 

 

 

 

<PagerStyle Mode="NumericPages" PageButtonCount="10" Position="TopAndBottom"/>

 


Code Behind:---

 

 

protected void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)

 

{

 

 

if (e.Item is GridPagerItem)

 

{

 

 

GridPagerItem gridPager = e.Item as GridPagerItem;

 

 

 

Control numericPagerControl = gridPager.GetNumericPager();

 

 

 

if (gridPager.NamingContainer is GridFooterItem)

 

{

 

 

Panel pagerpanel=(Panel)gridPager.FindControl("PagerPanel");

 

pnl1.Controls.Add(pagerpanel);

}

pnl.Controls.Add(numericPagerControl);

}

Client Functions:-

var

 

 

tableView = null;

 

 

 

function pageLoad(sender, args) {

 

tableView = $find(

 

"<%= RadGrid1.ClientID %>").get_masterTableView();

 

}

 

 

function RadComboBox1_SelectedIndexChanged(sender, args) {

 

tableView.set_pageSize(sender.get_value());

}

 

 

function changePage(argument) {

 

tableView.page(argument);

}

 

 

function RadNumericTextBox1_ValueChanged(sender, args) {

 

tableView.page(sender.get_value());

}

here i want this paging should be displayed on panel which is outside radgrid.so i added it in panel but i am getting an error as:--

Unable to cast object of type 'System.Web.UI.HtmlControls.HtmlGenericControl' to type 'System.Web.UI.WebControls.WebControl'.

Line 17:         var tableView = null;
Line 18:         function pageLoad(sender, args) {
Line 19: //tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();Line 20:         }
Line 21

Any Suggestion how can i fullfill my requirement...

Thanks
Iana Tsolova
Telerik team
 answered on 14 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?