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

I have a javascript function that extracts a custom attribute from a treeview node and uses this to decide whether to hide or show the expand button. This works spot on when expanding a node.

However, I also store the treeview XML in a session variable so that when user navigates back to this page the treeview will be in the same shape as they left it. I have attached a function to the treeview OnClientLoad that uses recursion to naviage through all the expanded nodes toggling the expand button as required. Again this works fine.

However - and might not be possible - when a user navigats back to the page all the nodes have an expand button until the js function runs - which is very quick - a second maybe - however this looks unprofessional as the nodes disappear down the treeview.

Is there way to get around?

As a suggestion for future releases, if I may, it would be extremely handy to be able to set this client side
Roland
Top achievements
Rank 1
 answered on 27 Nov 2009
1 answer
320 views
Hi All,

I have a RadGrid with 10 columns, but in EditForm mode i am showing only 6 fields to update.

to show these 6 fields in two columns, i wrote below

<EditFormSettings ColumnNumber="2" CaptionDataField="Period" CaptionFormatString="Edit properties of Period {0}">

but still all the fields are showing in single column in EditForm.

Please help me regarding this.
Daniel
Telerik team
 answered on 27 Nov 2009
4 answers
92 views
Hello

I have a RadGrid with a template column(imagebutton)

i want
  when i click the imagebutton execute a code behind

but i need to know a column value for Example.: an email

how can i do that?


Thanks

P.S.
Sorry about my english is not good enough :)
Luis
Top achievements
Rank 1
 answered on 27 Nov 2009
1 answer
113 views
I have a lot of Grids with default filtering: AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"

Using 2009.3.1109.35 RadGrid filtering crash when if any column that AllowFiltering="true" and not set DataField and try filter for any column.

Example:
... 
<Columns> 
<telerik:GridBoundColumn DataField="ID_ENTIDAD" HeaderText="Id." ReadOnly="True" SortExpression="ID_ENTIDAD" FilterControlWidth="50px" 
     AutoPostBackOnFilter="true" CurrentFilterFunction="EqualTo" ShowFilterIcon="false" >
</telerik:GridBoundColumn> 
<telerik:GridTemplateColumn DataField="DSC_ENTIDAD" HeaderText="Entidad" SortExpression="DSC_ENTIDAD" FilterControlWidth="99%"  
     AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"> 
     .....
</telerik:GridTemplateColumn> 
<telerik:GridTemplateColumn [DataField="BOL_ACTIVO"] DataType="System.Boolean" HeaderText="Activo" SortExpression="BOL_ACTIVO" 
    AutoPostBackOnFilter="true" CurrentFilterFunction="EqualTo" ShowFilterIcon="false"> 
.....
</telerik:GridTemplateColumn> 
</column> 

if you forget [DataField="BOL_ACTIVO"]  any filter don't run. Lauch Postback, but OnInit of grid don´t execute.
If you mark this column AllowFiltering="false", all OK.
Daniel
Telerik team
 answered on 27 Nov 2009
1 answer
126 views
Hello,

We have just added the RadComboBox to a page in our site for Country selection, to replace the existing lookup based on the Ajax Control Toolkit Auto Complete Extender (as clients has commented that this was too slow).

The ComboBox is loaded during Page_Load with a list Countries from the database (237 rows), in the same way that you would load a normal ASP.NET DropDownList. The definition for the ComboBox in the page markup us as follows:

<telerik:RadComboBox ID="cboIssueCountry" runat="server" Height="200px" width="190px" Skin="WindowsXP"   
     EnableEmbeddedSkins="false" EmptyMessage="" MarkFirstMatch="true" AllowCustomText="false"></telerik:RadComboBox> 

It works absolutely fine running under IE7 and IE8, the response is pretty much instant. However it is painfully slow under IE6. It takes 1 or 2 seconds after entering any characters for the list to be displayed and the matching item selected. This is a problem for us as most of our clients (unfortunately) are running IE6!

Is this a known problem? Any advice on how we can improve the perfomance?

Thanks in advance.
Simon
Telerik team
 answered on 27 Nov 2009
5 answers
140 views
Hi,

I'm new to this control and seem to be having some trouble getting it to work correctly. I've got an XML file as the data source, however the control only ever shows the first item in the list.

My code is as follows:

        <telerik:RadRotator ID="RadRotator1" runat="server" DataSourceID="xmlData" RotatorType="AutomaticAdvance" ScrollDuration="2000" ScrollDirection="Up" FrameDuration="1" Height="200" ItemHeight="100" Width="200" ItemWidth="100">  
            <ItemTemplate> 
                <%#System.Web.HttpUtility.HtmlEncode(XPath("Message").ToString())%> 
            </ItemTemplate> 
        </telerik:RadRotator> 
        <asp:XmlDataSource ID="xmlData" DataFile="Messages.xml" XPath="Messages" runat="server"></asp:XmlDataSource> 
 

XML Source:

<?xml version="1.0" encoding="utf-8" ?> 
<Messages> 
  <Message>Frasers Message</Message> 
  <Message>Marks message</Message> 
  <Message>Jimmys message</Message> 
</Messages> 
 

It's probably something obvious - can anyone help me out please?
Lini
Telerik team
 answered on 27 Nov 2009
1 answer
43 views
Hi All,

How to get the dropdown selected text in grid update mode at server side event "RadGrid1_UpdateCommand" .

Please help me regarding this.
Mira
Telerik team
 answered on 27 Nov 2009
1 answer
100 views
Hi All,

I need to populate dropdown in grid insert mode, in which event i can populate and please send me sample code.

Please help me regarding this.
Mira
Telerik team
 answered on 27 Nov 2009
2 answers
109 views
Hi, I have a grid with nestedviewtemplate , it works fine but when I click on expand icon on any record it shows the sub grid but loosing content of my main grid template columns.
<telerik:RadScriptManager ID="ScriptManager1" runat="server"></telerik:RadScriptManager> 
    <telerik:RadGrid ID="RadGrid1" Width = "100%" runat="server" Height= "100%"     
        AutoGenerateColumns="False" GridLines="None"    
        OnItemDataBound="RadGrid1_ItemDataBound" Skin="WebBlue" > 
<MasterTableView> 
 
<RowIndicatorColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</RowIndicatorColumn> 
<NestedViewTemplate> 
<asp:Panel runat="server" ID="InnerContainer" ToolTip='<%# Eval("EventHour") %>' Visible="false">  
    <asp:Label ID="lblEventHour" runat="server" Visible="false" Text='<%# Eval("EventHour") %>'></asp:Label> 
    <telerik:RadGrid ID="RadGrid2" Width = "100%" runat="server" Height= "100%"     
        AutoGenerateColumns="False" GridLines="None" OnNeedDataSource="RadGrid2_NeedDataSource"  Skin="WebBlue" ShowHeader="false" OnItemDataBound="RadGrid2_ItemDataBound">  
        <MasterTableView ShowHeader="false" AutoGenerateColumns = "false"  > 
        <Columns> 
        <telerik:GridBoundColumn UniqueName="CameraId" Visible="false" DataField="CameraId"></telerik:GridBoundColumn> 
        <telerik:GridBoundColumn UniqueName="ServerId" Visible="false" DataField="ServerId"></telerik:GridBoundColumn> 
        <telerik:GridTemplateColumn UniqueName="CameraColumn" Groupable="false">  
        <HeaderStyle Width="18%" HorizontalAlign = "Center" /> 
        <ItemStyle HorizontalAlign="Center" /> 
        <ItemTemplate> 
            <asp:Label ID="CameraName" runat="server" Width="80px" /> 
        </ItemTemplate> 
        </telerik:GridTemplateColumn> 
        <telerik:GridTemplateColumn UniqueName="SliderColumn1" Groupable="false">  
        <HeaderStyle Width="432px" /> 
        <ItemStyle HorizontalAlign="Center" /> 
        <ItemTemplate> 
        <asp:PlaceHolder ID="SliderPlaceHolder1" runat="server"></asp:PlaceHolder> 
        </ItemTemplate> 
        </telerik:GridTemplateColumn> 
        <telerik:GridTemplateColumn UniqueName="EventActions" Groupable="false">  
        <HeaderStyle Width="15%" HorizontalAlign="Center" /> 
        <ItemStyle HorizontalAlign="Center" /> 
        <ItemTemplate> 
         <asp:PlaceHolder ID="EAPlaceHolder1" runat="server"></asp:PlaceHolder> 
        </ItemTemplate> 
        </telerik:GridTemplateColumn> 
        <telerik:GridTemplateColumn UniqueName="TotalDuration1" Groupable="false">  
        <HeaderStyle Width="12%" HorizontalAlign="Center"/>  
        <ItemStyle HorizontalAlign="Center" /> 
        <ItemTemplate> 
        <asp:Label ID="TotalDuration1" runat="server" Width="80px" /> 
        </ItemTemplate> 
        </telerik:GridTemplateColumn> 
        <telerik:GridTemplateColumn UniqueName="TotalSize1" Groupable="false">  
        <HeaderStyle Width="10%" HorizontalAlign="Center"/>  
        <ItemStyle HorizontalAlign="Center" /> 
        <ItemTemplate> 
        <asp:Label ID="TotalSize1" runat="server" Width="80px" /> 
        </ItemTemplate> 
        </telerik:GridTemplateColumn> 
          
    </Columns> 
    </MasterTableView> 
    </telerik:RadGrid> 
</asp:Panel> 
</NestedViewTemplate> 
<ExpandCollapseColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</ExpandCollapseColumn> 
    <Columns> 
        <telerik:GridBoundColumn UniqueName="EvnetHour" Visible="false" DataField="EventHour"></telerik:GridBoundColumn> 
        <telerik:GridBoundColumn UniqueName="EventCount" Visible="false" DataField="EventCount"></telerik:GridBoundColumn> 
        <telerik:GridTemplateColumn HeaderText ="Start Time" UniqueName="StartTime" Groupable="false">  
        <HeaderStyle Width="18%" HorizontalAlign = "Center" /> 
        <ItemStyle HorizontalAlign="Center" /> 
        <ItemTemplate> 
            <asp:Label ID="HourLabel" runat="server" Width="80px" /> 
        </ItemTemplate> 
        </telerik:GridTemplateColumn> 
        <telerik:GridTemplateColumn UniqueName="SliderColumn" Groupable="false">  
        <HeaderStyle Width="432px" /> 
        <ItemStyle HorizontalAlign="Center" /> 
        <ItemTemplate> 
        <asp:PlaceHolder ID="SliderPlaceHolder" runat="server"></asp:PlaceHolder> 
        </ItemTemplate> 
        </telerik:GridTemplateColumn> 
        <telerik:GridTemplateColumn HeaderText="Event Actions" UniqueName="EventActions" Groupable="false">  
        <HeaderStyle Width="15%" HorizontalAlign="Center" /> 
        <ItemStyle HorizontalAlign="Center" /> 
        <ItemTemplate> 
         <asp:PlaceHolder ID="EAPlaceHolder" runat="server"></asp:PlaceHolder> 
        </ItemTemplate> 
        </telerik:GridTemplateColumn> 
        <telerik:GridTemplateColumn HeaderText="Total Duration" UniqueName="TotalDuration" Groupable="false">  
        <HeaderStyle Width="12%" HorizontalAlign="Center"/>  
        <ItemStyle HorizontalAlign="Center" /> 
        <ItemTemplate> 
        <asp:Label ID="TotalDuration" runat="server" Width="80px" /> 
        </ItemTemplate> 
        </telerik:GridTemplateColumn> 
        <telerik:GridTemplateColumn HeaderText="Total Size" UniqueName="TotalSize" Groupable="false">  
        <HeaderStyle Width="10%" HorizontalAlign="Center"/>  
        <ItemStyle HorizontalAlign="Center" /> 
        <ItemTemplate> 
        <asp:Label ID="TotalSize" runat="server" Width="80px" /> 
        </ItemTemplate> 
        </telerik:GridTemplateColumn> 
          
    </Columns> 
</MasterTableView> 
 
        <HeaderStyle Font-Names="Verdana" Font-Size="X-Small" BorderStyle="None"   
            Wrap="False" /> 
 
        <ClientSettings> 
            <Scrolling AllowScroll="True" ScrollHeight="100%" UseStaticHeaders="True" /> 
        </ClientSettings> 
 
<FilterMenu EnableTheming="True">  
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
</FilterMenu> 
    </telerik:RadGrid> 
on Item databound event I am adding some pictures in template columns but whenever I click on plus icon those pictures gone and only lable columns shows up. Any idea
My item Data Bound Code
Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound  
        If Not arrServers Is Nothing Then  
            If TypeOf e.Item Is Telerik.Web.UI.GridDataItem Then  
 
                Dim mySQLConnector As New SQLConnector  
                Dim item As Telerik.Web.UI.GridDataItem = DirectCast(e.Item, Telerik.Web.UI.GridDataItem)  
 
                Dim HourIndex As Integer = CInt(item.GetDataKeyValue("EventHour"))  
                Dim lbl As Label = CType(e.Item.FindControl("HourLabel"), Label)  
                Dim lblDuration As Label = CType(e.Item.FindControl("TotalDuration"), Label)  
                Dim lblTotalSize As Label = CType(e.Item.FindControl("TotalSize"), Label)  
                Dim pl As PlaceHolder = CType(e.Item.FindControl("SliderPlaceHolder"), PlaceHolder)  
                Dim eapl As PlaceHolder = CType(e.Item.FindControl("EAPlaceHolder"), PlaceHolder)  
                Dim objClient As ESMWCF.IESMChannel  
                Dim iWidth As Integer = 0 
                Dim iHeight As Integer = 0 
 
                lbl.Text = FormatHour(HourIndex)  
                PopulateSliderCell(HourIndex, pl, HourIndex, mySQLConnector)  
 
                If iCamCount = 1 Then  
                    'only need width and height if single camera  
                    Dim SerCam() As String = Split(sCameras, ";")  
                    Dim objServer As New Data.cServer(CInt(SerCam(0)), cServer.IDType.idServer)  
                    Try  
                        'objClient = New ESMWCF.ESMClient("WSHttpBinding_IESM", "http://" & objServer.IPAddress & "/ESM.svc")  
                        objClient = ServiceProxy(Of ESMWCF.IESMChannel).getClientProxy("http://" & objServer.IPAddress & "/ESM.svc")  
                        Using ds As DataSet = objClient.GetCameraInfo(CInt(SerCam(1)))  
                            iWidth = CInt(ds.Tables(0).Rows(0)("CameraHorizRes"))  
                            iHeight = CInt(ds.Tables(0).Rows(0)("CameraVertRes"))  
                        End Using  
 
                        PopulateSingleActionCell(eapl, sCameras, HourIndex, HourIndex, iWidth, iHeight)  
                        Dim iSeconds As Integer = 0 
                        iSeconds = objClient.GetEventDurationByHour(iCameraId, HourIndex, SelectedDate, iTimeOffset)  
                        Dim sTotalTime As String = SetTimeFormat(iSeconds)  
                        lblDuration.Text = sTotalTime 
                        lblTotalSize.Text = "0 MB" 
                        Using ds As DataSet = objClient.GetFilteredArchiveInfo(SerCam(1), SelectedDate.Year, SelectedDate.Month, SelectedDate.Day, iTimeOffset, sFilterStr)  
                            'Put the event information in an array because we can't have two open readers on the same database  
                            If ds.Tables(0).Rows.Count > 0 Then  
                                For Each dr In ds.Tables(0).Rows  
                                    If Not dr("EventHour") Is System.DBNull.Value Then  
                                        If CInt(dr("EventHour")) = HourIndex Then  
                                            If Not dr("TotalSize") Is System.DBNull.Value Then  
                                                lblTotalSize.Text = FormatNumber(CDbl(dr("TotalSize")) / 1024000, 2) & " MB"  
                                                Exit For  
                                            End If  
 
                                        End If  
                                    End If  
 
                                Next  
                            End If  
                        End Using  
 
                        objClient.Close()  
                    Catch ex As ServiceModel.CommunicationException  
                        objClient.Abort()  
                    Catch ex As TimeoutException  
                        objClient.Abort()  
                    Catch ex As Exception  
                        objClient.Abort()  
                        Throw ex  
                    End Try  
 
                Else  
                    PopulateActionCell(eapl, sCameras, HourIndex, HourIndex)  
                    'Add a Total Duration cell to the row ====================  
                    lblDuration.Text = "--:--" 
                    lblTotalSize.Text = "0 MB" 
                End If  
 
 
            End If  
        End If  
 
 
        'Dim objClient As ESMWCF.IESMChannel  
        ''  
 
 
    End Sub 
Mira
Telerik team
 answered on 27 Nov 2009
1 answer
93 views
Hi All,

I have two date columns in RadGrid, when i click insert then i am able to see two two date pickers, but i am facing issue is, which one i select first that calender is opening and then if i select second one it is not opening calender.

Please help me regarding this. 
Daniel
Telerik team
 answered on 27 Nov 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?