Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
117 views
I've setup two panels and two buttons, when the listButton is pressed, it should show listPanel, and hide galleryPanel, when the galleryButton is pressed, it then should show the galleryPanel and hide the listPanel.  
The first button seems to be doing ajax, but the second causes a page refresh (postback).

Any help would be appreciated...

        <asp:ScriptManager id="scriptManager" runat="server"></asp:ScriptManager>  
        <telerik:radajaxmanager id="Radajaxmanager" runat="server"
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="listButton"
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="listPanel"></telerik:AjaxUpdatedControl> 
                        <telerik:AjaxUpdatedControl ControlID="galleryPanel"></telerik:AjaxUpdatedControl> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="galleryButton"
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="listPanel"></telerik:AjaxUpdatedControl> 
                        <telerik:AjaxUpdatedControl ControlID="galleryPanel"></telerik:AjaxUpdatedControl> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:radajaxmanager> 
 
        <asp:Button ID="listButton" runat="server" Text="List" onclick="listButton_Click" /> 
        <asp:Button ID="galleryButton" runat="server" Text="Gallery" onclick="galleryButton_Click" /> 
 
        <div> 
            <telerik:RadAjaxPanel id="listPanel" runat="server" style="display: none;"
                List Panel 
            </telerik:RadAjaxPanel> 
            <telerik:RadAjaxPanel id="galleryPanel" runat="server" style="display: none;"
                Gallery Panel 
            </telerik:RadAjaxPanel> 
        </div> 
 
 

Stephen
Top achievements
Rank 1
 answered on 10 Mar 2009
6 answers
587 views
I've been looking through the demos for each of these types of Grid views, which both use ItemTemplate and I'm a bit confused by how each of these work.  What properties on the grid makes it a CardView and a ListView?


Thanks,
Stephen
ManniAT
Top achievements
Rank 2
 answered on 09 Mar 2009
1 answer
101 views
Kind of had an idea to have some sort of designer where I can drag around items inside of a panel, then export their co-ords to html (or xml)...kindof like a dynamic layout on my page.

This do-able with the raddock, or is my only option to create docking areas to drag the items into?
Serrin
Top achievements
Rank 1
 answered on 09 Mar 2009
1 answer
179 views
I am trying to make "truncator" jQuery plugin to work with RadGrid.

I am getting script error "this[expando] is not defined" which I assume is jQuery error and related to jQuery version mismatch

I checked your blog article that indicated that "new and improved" version of jQuery + RadGrid is coming in Q1 2009.
http://blogs.telerik.com/AtanasKorchev/Posts/08-11-06/ASP_NET_Ajax_Controls_and_jQuery.aspx

Is it out?
Is there a workaround to make existing jQuery plugins to work with RadGrid?

Plugin I am talking about is this one
http://henrik.nyh.se/2008/02/jquery-html-truncate

Code that fails

            <script language="javascript" type="text/javascript">
                (function($) {
                    $(document).ready(function() {
                        $('.longtext').truncate({ max_length: 24 });
                    }
                );
                })($telerik.$);    
            </script>

Thank you








Rosen
Telerik team
 answered on 09 Mar 2009
1 answer
185 views
Hi,

I am trying to create a chart, but am receiving the following error;
Am using the samples from the demo, so not sure why this wouldn't work!

Thanks,
H

CS0433: The type 'Telerik.Charting.ChartSeries' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6d522cd2\5802f19\assembly\dl3\08d5e65c\ea88d818_e194c901\Telerik.Charting.DLL' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\6d522cd2\5802f19\assembly\dl3\c9996742\c23b6f7e_e194c901\Telerik.Web.UI.DLL'
Ves
Telerik team
 answered on 09 Mar 2009
1 answer
147 views
Is there a way to set the entire chart as a hyperlink? I am creating a chart dynamically for every skin at runtime, and want the user to be able to click on the chart itself that they want to choose to save the setting  Much the same as this page , but with actual charts instead of images.   It seems impractical to maintain 20 themes for 20 different kinds of charts via images.

Any help would be appreciated.  Below is a crude example of what is being attempted.
   Public Sub GetAndDisplaySkins(ByRef _Table As Table, ByVal _charttype As String
        Dim _myrow As New TableRow 
        Dim _mycell As New TableCell 
        Dim _MyType As Telerik.Charting.ChartSeriesType 
        _MyType = util.GetChartType(_charttype) 
        Dim _MyChart As Telerik.Web.UI.RadChart 
        mysql = "exec sp_GetAllSkins" 
        myreader = dal.GetDataReader(mysql) 
        Dim mycounter As Int32 
        mycounter = 0 
        mysql = "exec sp_GetDummyData" 
        Dim _dstable As DataTable 
        _dstable = dal.GetDataTable(mysql) 
 
        If myreader.HasRows Then 
            While myreader.Read 
                If mycounter = 0 Then 
                    _myrow = New TableRow 
                End If 
                _mycell = New TableCell 
                _MyChart = New Telerik.Web.UI.RadChart 
                With _MyChart 
                    .DefaultType = _MyType 
                    .DataSource = _dstable 
                    .ChartTitle.TextBlock.Text = myreader("DisplayName"
                    .Skin = myreader("skinname"
                    .DataBind() 
                    .Width = 250 
                    .Height = 220 
                    .PlotArea.XAxis.DataLabelsColumn = "xstuff" 
                    .PlotArea.YAxis.AxisMode = Telerik.Charting.ChartYAxisMode.Extended 
                    If .Skin = "Black" Then 
                        .AutoLayout = False 
                    Else 
                        .AutoLayout = True 
                    End If 
                    .AutoTextWrap = True 
                    .DataBind() 
                    .Legend.Visible = False 
                End With 
                _mycell.Controls.Add(_MyChart) 
                _myrow.Cells.Add(_mycell) 
 
                If mycounter = 2 Then 
                    mycounter = 0 
                    _Table.Rows.Add(_myrow) 
                Else 
                    mycounter += 1 
                End If 
            End While 
            If mycounter <> 0 Then 
                _Table.Rows.Add(_myrow) 
            End If 
        End If 

Velin
Telerik team
 answered on 09 Mar 2009
1 answer
105 views
Something tells me this has been answered before, however.

  • I have a simple grid, connected to a dataource
  • I have a fixed height and a width of 99%
  • Paging is turned on
  • Scrolling is on with UseStaticHeaders="true"

When the grid first renders, the columns scroll properly, and are properly aligned with the data.  Without Ajax, changing pages present NO problems.

However, when Ajax is used on the control, when I go to the next page, the columns freeze, they will not move at all when scrolling, and their widths no longer match the column width of the data rows.

Something tells me this is more of an Ajax problem then a grid problem, but if anyone has a solution, that would be great.  Scrolling looks SO much nicer with static headers.

Thanks,

Kuba

Sebastian
Telerik team
 answered on 09 Mar 2009
3 answers
129 views
Hi,

I have a grid (hyrachical) where I edit the detail rows.
The Form template looks like this:

    <EditFormSettings EditFormType="Template" > 
    <FormTemplate> 
        <asp:Button ID="Button1" Text="Update" runat="server" CommandName="Update"></asp:Button>&nbsp;&nbsp;  
        <asp:Button ID="Button2" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button> 
        <br /> 
        <telerik:RadEditor ToolsFile="/Images/ToolsForStrings.xml" Skin="Office2007" Language="de-DE" ID="edTheString" runat="server" Width="760px" Height="150px" Content='<%# Bind("TheString") %>'>  
        </telerik:RadEditor> 
 
 
    </FormTemplate> 
    </EditFormSettings> 
 
 I found the article about setting maxlength (via jscript) - but using this srcipt results in "The Name edTheString is not....".

Now my questions:
a.) what is the correct ID for this scenario?
b.) can something like this be handled with a custom module?

My Idea for b.) - there is a statistic module which shows me the number of letters.
Is it possible to write an own module which also counts the number of letters - but rejects changes when the length is longer than XXX

By the way - "MaxLength" is a very common thing - especially when you work with databases.
So it would be a great idea to have this as "property" like an asp:TextBox has it.

Regards

Manfred
Rumen
Telerik team
 answered on 09 Mar 2009
5 answers
178 views

The word wrap in Telerik RadGrid BoundColumn is not wraping the text in  Firefox version 3.0.1 and we are using the Telerik  web controls  version ASP.NET Q2 2007

 

I have tried changes in <Master Table view> –<Item Style  Wrap=True>

Daniel
Telerik team
 answered on 09 Mar 2009
1 answer
257 views
I have a Grid within a table cell <td></td> that I am having difficulty getting to render the way I want.  The Grid has too many columns to show in the table cell so I want the Grid to automatically size down and provide a scrollbar and still give me fully sized columns (for the data in that column.) 

1) In my original try, the entire Grid rendered and the table cell was too large and caused the entire table row to extend beyond all the other rows in the table.  All the columns were sized to the maximum data item size for that column.

2) In my next try, I set TABLELAYOUT="FIXED" for the MasterTableView.  The Grid then rendered within the table cell at the size I had set for the table cell. (The table row was also the same size as the other table rows.)  However, in this rendering, all the columns showed up similarly sized and too small - the text was cut off.  I can manually size the columns on the page and a horizontal scrollbar will appear for columns that get pushed out of the table cell. (I don't want the user to have to do this though.)

3) If I explicitly size each column's HEADERSTYLE WIDTH, I get what happens in #1 above, the entire Grid will render and the table cell will be too large and cause the entire table row to extend beyond all the other rows in the table - again.  I do not get a horizontal scrollbar for the Grid.

Is there a setting I'm missing or something I'm not taking into consideration?  Thanks, Lance

This is the code for #2, which is where I am so far:

<td colspan="2" width="60%">  
 
<telerik:RadGrid ID="trcrgFlightList" runat="server" AllowSorting="True" AutoGenerateColumns="False" GridLines="Horizontal" Height="180px" Skin="Vista" Width="100%" BorderStyle="Solid" ShowStatusBar="True" EnableHeaderContextMenu="True">  
 
<HeaderContextMenu Skin="Vista">  
 
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
 
</HeaderContextMenu> 
 
<MasterTableView Font-Names="Tahoma" Font-Size="10pt" TableLayout="Fixed">  
 
<Columns> 
 
<telerik:GridBoundColumn HeaderText="ACID" ReadOnly="True" UniqueName="ACID" DataField="ACID" Groupable="False" SortedBackColor="192, 255, 192">  
 
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="False" /> 
 
</telerik:GridBoundColumn> 
 
<telerik:GridBoundColumn HeaderText="Origin" ReadOnly="True" UniqueName="Origin" DataField="Origin" Groupable="False" SortedBackColor="192, 255, 192">  
 
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="False" /> 
 
</telerik:GridBoundColumn> 
 
<telerik:GridBoundColumn HeaderText="Dest." ReadOnly="True" UniqueName="Destination" DataField="Destination" Groupable="False" SortedBackColor="192, 255, 192">  
 
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="False" /> 
 
</telerik:GridBoundColumn> 
 
<telerik:GridBoundColumn HeaderText="OETD" ReadOnly="True" UniqueName="OETD" DataField="OETD" DataFormatString="{0:MM/dd/yyyy HH:mmZ}" DataType="System.DateTime" Groupable="False" SortedBackColor="192, 255, 192">  
 
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="False" /> 
 
</telerik:GridBoundColumn> 
 
<telerik:GridBoundColumn HeaderText="OETA" ReadOnly="True" UniqueName="OETA" DataField="OETA" DataFormatString="{0:MM/dd/yyyy HH:mmZ}" DataType="System.DateTime" Groupable="False" SortedBackColor="192, 255, 192">  
 
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="False" /> 
 
</telerik:GridBoundColumn> 
 
<telerik:GridBoundColumn HeaderText="ETD" ReadOnly="True" UniqueName="ETD" DataField="ETD" DataFormatString="{0:MM/dd/yyyy HH:mmZ}" DataType="System.DateTime" Groupable="False" SortedBackColor="192, 255, 192">  
 
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="False" /> 
 
</telerik:GridBoundColumn> 
 
<telerik:GridBoundColumn HeaderText="ETA" ReadOnly="True" UniqueName="ETA" DataField="ETA" DataFormatString="{0:MM/dd/yyyy HH:mmZ}" DataType="System.DateTime" Groupable="False" SortedBackColor="192, 255, 192">  
 
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="False" /> 
 
</telerik:GridBoundColumn> 
 
<telerik:GridBoundColumn HeaderText="CTD" ReadOnly="True" UniqueName="CTD" DataField="CTD" DataFormatString="{0:MM/dd/yyyy HH:mmZ}" DataType="System.DateTime" Groupable="False" SortedBackColor="192, 255, 192">  
 
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="False" /> 
 
</telerik:GridBoundColumn> 
 
<telerik:GridBoundColumn HeaderText="CTA" ReadOnly="True" UniqueName="CTA" DataField="CTA" DataFormatString="{0:MM/dd/yyyy HH:mmZ}" DataType="System.DateTime" Groupable="False" SortedBackColor="192, 255, 192">  
 
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="False" /> 
 
</telerik:GridBoundColumn> 
 
<telerik:GridBoundColumn HeaderText="ASLT" ReadOnly="True" UniqueName="ASLT" DataField="ASLT" Groupable="False" SortedBackColor="192, 255, 192">  
 
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="False" /> 
 
</telerik:GridBoundColumn> 
 
<telerik:GridBoundColumn HeaderText="Delay" ReadOnly="True" UniqueName="Delay" DataField="Delay" DataType="System.Int32" Groupable="False" SortedBackColor="192, 255, 192">  
 
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="False" /> 
 
</telerik:GridBoundColumn> 
 
</Columns> 
 
</MasterTableView> 
 
<ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" ColumnsReorderMethod="Reorder">  
 
<Selecting AllowRowSelect="True" /> 
 
<Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
 
<Resizing AllowColumnResize="True" /> 
 
</ClientSettings> 
 
<FilterMenu Skin="Vista">  
 
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
 
</FilterMenu> 
 
<HeaderStyle Font-Bold="True" /> 
 
</telerik:RadGrid> 
 
</td> 
 
LANCE NECKAR
Top achievements
Rank 1
 answered on 09 Mar 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?