Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
110 views
To whom it may concern

I have a radwindow that is launched with javascript. It works 100% on my development machine (Vista & IE8). On a machine with Windows XP SP3 with IE8 though, there are some issues.

The radwindow loads okay. Some of the controls within the radwindow though, do not. 

The Combobox does not seem to load correctly when the page loads. When I minimize and then maximise the browser window, the combobox works, but still seems a bit buggy.

Are there known issues with comboboxes contained in a radwindow on IE8 with XP?

Regards
Hanno
____
Below is the html of the page.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ContactHistory.aspx.cs" 
    Inherits="xxx.yyy.UI.ClientService.ContactHistory" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head runat="server"> 
    <title></title> 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
    </telerik:RadScriptManager> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnablePageHeadUpdate="False" 
        DefaultLoadingPanelID="RadAjaxLoadingPanel1"> 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="NoteType"> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="AddNote" /> 
                    <telerik:AjaxUpdatedControl ControlID="Note" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="AddNote"> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="Note" /> 
                    <telerik:AjaxUpdatedControl ControlID="HistoryList" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="MessageSource"> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="HistoryList" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="HistoryList"> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="HistoryList" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <asp:Panel ID="Panel1" runat="server"> 
        <table width="100%"> 
            <tr> 
                <td> 
                    <asp:Label ID="Label1" runat="server" Text="Note Type:"></asp:Label> 
                </td> 
                <td style="text-align: left;"> 
                    <telerik:RadComboBox ID="NoteType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="NoteType_SelectedIndexChanged"> 
                        <Items> 
                            <telerik:RadComboBoxItem Text="-- Select --" Value="0" Selected="true" /> 
                            <telerik:RadComboBoxItem Text="Admin" Value="Admin" /> 
                            <telerik:RadComboBoxItem Text="Inbound" Value="Inbound" /> 
                            <telerik:RadComboBoxItem Text="Outbound" Value="Outbound" /> 
                        </Items> 
                    </telerik:RadComboBox> 
                </td> 
                <td> 
                    <asp:Button ID="AddNote" runat="server" Text="Add Note" OnClick="AddNote_Click" Enabled="False" /> 
                </td> 
            </tr> 
            <tr> 
                <td colspan="3"> 
                    <telerik:RadEditor ID="Note" runat="server" Height="150" Width="100%" EditModes="Preview"> 
                        <Tools> 
                            <telerik:EditorToolGroup> 
                                <telerik:EditorTool Name="AjaxSpellCheck" Text="SpellCheck" /> 
                            </telerik:EditorToolGroup> 
                        </Tools> 
                        <Content> 
                         
                        </Content> 
                    </telerik:RadEditor> 
                </td> 
            </tr> 
            <tr> 
                <td colspan="3"> 
                    &nbsp; 
                </td> 
            </tr> 
            <tr> 
                <td colspan="3"> 
                    <asp:Panel ID="Panel2" runat="server" GroupingText="Message Filter"> 
                        <br /> 
                        <table> 
                            <tr> 
                                <td> 
                                    <asp:Label ID="Label2" runat="server" Text="Message Source:"></asp:Label> 
                                </td> 
                                <td> 
                                    <telerik:RadComboBox ID="MessageSource" runat="server" AutoPostBack="True" OnSelectedIndexChanged="MessageSource_SelectedIndexChanged"> 
                                        <Items> 
                                            <telerik:RadComboBoxItem Value="all" Text="All" /> 
                                            <telerik:RadComboBoxItem Value="call" Text="Call" Selected="true" /> 
                                            <telerik:RadComboBoxItem Value="claim" Text="Claim" /> 
                                        </Items> 
                                    </telerik:RadComboBox> 
                                </td> 
                            </tr> 
                        </table> 
                    </asp:Panel> 
                </td> 
            </tr> 
            <tr> 
                <td colspan="3"> 
                    <telerik:RadGrid ID="HistoryList" runat="server" DataSourceID="dsContactHistory" 
                        GridLines="None" AutoGenerateColumns="False" Width="100%"> 
                        <MasterTableView CellSpacing="-1" CommandItemDisplay="Top" DataKeyNames="ContactHistoryID" 
                            DataSourceID="dsContactHistory"> 
                            <RowIndicatorColumn> 
                                <HeaderStyle Width="20px" /> 
                            </RowIndicatorColumn> 
                            <ExpandCollapseColumn> 
                                <HeaderStyle Width="20px" /> 
                            </ExpandCollapseColumn> 
                            <Columns> 
                                <telerik:GridBoundColumn DataField="ContactHistoryID" DataType="System.Int32" HeaderText="ContactHistoryID" 
                                    ReadOnly="True" SortExpression="ContactHistoryID" UniqueName="ContactHistoryID" 
                                    Visible="false"> 
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="LogDate" DataType="System.DateTime" HeaderText="Log Date" 
                                    SortExpression="LogDate" UniqueName="LogDate" DataFormatString="{0:ddd dd-MMM-yyyy hh:mm}" 
                                    ItemStyle-Wrap="false"> 
                                    <ItemStyle Wrap="False" /> 
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="UserName" HeaderText="User Name" SortExpression="UserName" 
                                    UniqueName="UserName" ItemStyle-Wrap="false"> 
                                    <ItemStyle Wrap="False" /> 
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Description" HeaderText="Description" SortExpression="Description" 
                                    UniqueName="Description"> 
                                </telerik:GridBoundColumn> 
                            </Columns> 
                            <CommandItemTemplate> 
                                <table style="width: 100%; text-align: right;"> 
                                    <tr> 
                                        <td> 
                                            <img style="border: 0px" width="12" height="12" alt="" src="../App_Themes/OTSSTheme/Images/Refresh.gif" /><asp:LinkButton 
                                                ID="LinkButton4" runat="server" CommandName="RebindGrid">Refresh list</asp:LinkButton> 
                                        </td> 
                                    </tr> 
                                </table> 
                            </CommandItemTemplate> 
                        </MasterTableView> 
                    </telerik:RadGrid> 
                    <asp:ObjectDataSource ID="dsContactHistory" runat="server" OldValuesParameterFormatString="original_{0}" 
                        SelectMethod="GetDataByCallDetailIDMessageSource" TypeName="xxx.yyy.Data.FusionDataTableAdapters.ContactHistoryListTableAdapter"> 
                        <SelectParameters> 
                            <asp:Parameter Name="CallDetailID" Type="Int32" /> 
                            <asp:ControlParameter ControlID="MessageSource" Name="MessageSource" PropertyName="SelectedValue" 
                                Type="String" /> 
                        </SelectParameters> 
                    </asp:ObjectDataSource> 
                </td> 
            </tr> 
        </table> 
    </asp:Panel> 
    <telerik:RadFormDecorator ID="DecorateTelerik" runat="server" Skin="Telerik" /> 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"> 
    </telerik:RadAjaxLoadingPanel> 
    </form> 
</body> 
</html> 
 

Hanno Coetzee
Top achievements
Rank 1
 answered on 27 Jan 2010
2 answers
165 views
hi i have a problem regarding to file explorer...I want to set the icons of the directory , files and shortcuts....how to set the icons??i want to assign different icons to the directory  and i also want to assign different type of icons to the files in it(which would be selected by the user). i would handle the Db my self.Last thing i wana ask is can i assign shortcuts to the contents. like if i have a  folder named as images and it contain a folder image1.jpg and another folder name as Images1 and i want to show image1 in images1 can i do this with shortcuts...



regards
Saad javaid
saad javaid
Top achievements
Rank 1
 answered on 27 Jan 2010
2 answers
416 views
Hi,

I'm using AppointmentDataBound to apply my own cssClasses to scheduler appointments based on their type, status and colour.  The type, status and colour are fields I store in the appointments record in my SQL table.

This all works really well and I get icons based on the appointment type and colours based on their status etc...

My problem occurs after I insert a new appointment.  I get an error 'object variable or with block variable not set' in the AppointmentDataBound code.  I think this is because the dataitem is not available at this point.

This is really stumping me and I just can't seem to get around it.  Here's the code :-


Protected Sub Calendar_AppointmentDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.SchedulerEventArgs) Handles Calendar.AppointmentDataBound  
 
        'Grab details about the appointments appearance  
        Dim apptComputer As String = e.Appointment.DataItem("computer_name").ToString  
        Dim apptProject As String = e.Appointment.DataItem("project_name").ToString  
        Dim apptRelease As String = e.Appointment.DataItem("release_name").ToString  
        Dim apptType As Integer = e.Appointment.DataItem("appointment_type").ToString  
        Dim apptColour As String = "White" 
        Dim apptStatus As Integer = e.Appointment.DataItem("Status").ToString  
        Dim strStatus As String = "Scheduled" 
        Dim strCSSClass As String = "rsCategoryBlue" 
 
 
        e.Appointment.Subject = "Project: " & apptProject & Chr(13) & "Release: " & apptRelease & Chr(13) & "Computer: " & apptComputer  
 
        'Grab the appointment colour if it is assigned if not then  
        'leave the setting as white (generic).  
        If e.Appointment.DataItem("colour").ToString() <> "" Then 
            apptColour = e.Appointment.DataItem("colour").ToString()  
        End If 
 
        'apptStatus dictates the text colour of the appointment.  
        '1 - Scheduled = Blue  
        '2 - Failed = Red  
        '3 - Passed = Green  
        Select Case apptStatus  
            Case 1 'Scheduled  
                strStatus = "Scheduled" 
            Case 2 'Failed  
                strStatus = "Failed" 
            Case 3 'Passed  
                strStatus = "Passed" 
        End Select 
 
        'apptColour dictates the background colour of the appointment  
        'apptType dictates the icon displayed in the top left corner of the appointment  
        Select Case apptType  
            Case 1 'Generic Appointment  
            Case 2 'QualityControl  
                strCSSClass = "Quality_" & apptColour & "_" & strStatus & "_AppointmentStyle" 
            Case 3 'CompatibilityCheck  
                strCSSClass = "Compatible_" & apptColour & "_" & strStatus & "_AppointmentStyle" 
            Case 4 'PackageApp  
                strCSSClass = "Package_" & apptColour & "_" & strStatus & "_AppointmentStyle" 
            Case 5 'Release  
                strCSSClass = "Release_" & apptColour & "_" & strStatus & "_AppointmentStyle" 
        End Select 
 
        e.Appointment.CssClass = strCSSClass  
 
 
    End Sub 

Here's the Insert code which works everytime

    Protected Sub Calendar_OnAppointmentInsert(ByVal sender As Object, ByVal e As Telerik.Web.UI.SchedulerCancelEventArgs) Handles Calendar.AppointmentInsert  
 
        Dim sdsProjectAppointments As New SqlDataSource  
        Dim strConnection As String = ConfigurationManager.ConnectionStrings("RR3ConnectionString").ConnectionString  
        Dim myRecurrenceParentID As String = "" 
 
        'Check to see if the appointment has a RecurrenceParentID  
        'If so then set the variable if not then leave as "".  Avoids passing null to USP.  
        If e.Appointment.RecurrenceParentID <> Nothing Then 
            'If DirectCast(e.Appointment.RecurrenceParentID, Guid) <> Nothing Then  
            myRecurrenceParentID = e.Appointment.RecurrenceParentID.ToString  
        End If 
 
        sdsProjectAppointments.ConnectionString = strConnection  
        sdsProjectAppointments.InsertCommand = "usp_insert_project_appointment" 
        sdsProjectAppointments.InsertCommandType = SqlDataSourceCommandType.StoredProcedure  
 
        'Set the SQLDataSource Parameters.  The first set of parameters are grabbed from  
        'the new ExceptionAppointment part of the RecurrenceExceptionCreatedEventArgs.  
        'This contains the new records indivdual start and end times etc...  
        sdsProjectAppointments.InsertParameters.Add("Subject", e.Appointment.Subject.ToString)  
        sdsProjectAppointments.InsertParameters.Add("start", e.Appointment.Start.ToString)  
        sdsProjectAppointments.InsertParameters("start").DbType = DbType.DateTime  
        sdsProjectAppointments.InsertParameters.Add("end", e.Appointment.End.ToString)  
        sdsProjectAppointments.InsertParameters("end").DbType = DbType.DateTime  
        sdsProjectAppointments.InsertParameters.Add("recurrencerule", e.Appointment.RecurrenceRule.ToString)  
        sdsProjectAppointments.InsertParameters.Add("recurrenceparentid", myRecurrenceParentID)  
 
        'Now stuff in the parameters we got from our select statement  
        sdsProjectAppointments.InsertParameters.Add("project_guid", "00000000-0000-0000-0000-000000000000")  
        sdsProjectAppointments.InsertParameters.Add("parent_project_guid", "00000000-0000-0000-0000-000000000000")  
        sdsProjectAppointments.InsertParameters.Add("release_guid", "00000000-0000-0000-0000-000000000000")  
        sdsProjectAppointments.InsertParameters.Add("app_env_guid", "00000000-0000-0000-0000-000000000000")  
        sdsProjectAppointments.InsertParameters.Add("env_comp_guid", "00000000-0000-0000-0000-000000000000")  
        sdsProjectAppointments.InsertParameters.Add("computer_guid", "00000000-0000-0000-0000-000000000000")  
        sdsProjectAppointments.InsertParameters.Add("status", "1") 'Scheduled  
        sdsProjectAppointments.InsertParameters.Add("appointment_type", "7") 'Type 7 is an informational appointment for the build and release teams  
        sdsProjectAppointments.InsertParameters.Add("colour", "White") 'Unallocated  
 
        'Call the update method of the SQLDataSource  
        Try 
            sdsProjectAppointments.Insert()  
        Catch ex As Exception  
            MsgBox("An unhandled exception has occurred. " & ex.Message)  
        End Try 
 
    End Sub 
 


After the insert code runs the databound code is called again and any reference to e.appointment.dataitem or even e.appointment.id returns the 'object variable or with block variable not set' error.

Thanks for looking
Jase
Peter
Telerik team
 answered on 27 Jan 2010
3 answers
219 views
Dear Sir,
This Example is the same you have in the online documentation, but it's not working.
please i need this functionality to be able to access the data from the client side.

<telerik:RadListView ID="RadListView1" runat="server" ClientDataKeyNames="ID">  
</telerik:RadListView> 
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">  
<script type="text/javascript">  
function GetClientDataKeyValueForFirstItem()   
{  
   var clientDataKeyValues = $find("<%= RadListView1.ClientID %>").get_clientDataKeyValue();  
   var firstItemKeyValue = clientDataKeyValues[0]["ID"];  
}  
</script> 
</telerik:RadCodeBlock>  

note: my telerik version is (2009.3.1016.35)
Regards,
Rosen
Telerik team
 answered on 27 Jan 2010
1 answer
411 views
Hi ,
How could i set parentheses for negatives using boundcolumns without currency symbol something like this

(1,980.70)

actually i have this dataformatstring , and its cool 'cause completes the decimal position with #.00 always
<telerik:GridBoundColumn    DataField="Noviembre" Aggregate="Sum" HeaderStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" DataType="System.Decimal" 
                                                                            FooterAggregateFormatString="{0:N2}" FooterStyle-Font-Bold="true"> 
                                                                             <HeaderStyle HorizontalAlign="Right" /> 
                                                                             <ItemStyle HorizontalAlign="Right" /> 
                                                                     <FooterStyle HorizontalAlign="Right" /> 
                                                </telerik:GridBoundColumn> 
wih this code and setting the dataformatstring={"0:C"} parentheses works but whit the currency symbol
CultureInfo ci = new CultureInfo("es-PE"); 
ci.NumberFormat.CurrencyNegativePattern = 14; 
System.Threading.Thread.CurrentThread.CurrentCulture = ci; 

i hope you can help me, thanks

Regards
Gino


Shinu
Top achievements
Rank 2
 answered on 27 Jan 2010
1 answer
121 views
Hello Everybody,

I have problem with OnClienLoad property. We create dynamicly radeditor code behind like this:
 Dim editor As Control = CreateDhtmlEditor("editor")  
 Label1.Controls.Add(editor) 'Add control to label  
 'Find RadEditor and add Ajax to component  
 Dim RadEd As Telerik.WebControls.RadEditor = CType(Page.FindControl("editor"),Telerik.WebControls.RadEditor)  
RadAjaxManager1.AjaxSettings.AddAjaxSetting(btnOpenTemplate, CType(RadEd, Telerik.WebControls.RadEditor), AjaxLoadingPanel1)  
 RadAjaxManager1.AjaxSettings.AddAjaxSetting(btnOpenTemplate, CType(RadEd, Telerik.WebControls.RadEditor), AjaxLoadingPanel1)  
'add client side event  
RadEd.OnClientLoad="OnClientLoad" 

Basicly this is how we create Editor to Webpage. I have written my onLoadevent into page.aspx file. This is written onload event on codebehind
 function OnClienLoad(editor)  
{  
   alert('Editor');  
} 

Every time i get following error message:
Exception on excetuing Client event onclientload error:'OnClientLoad' is undifined.

Please some tell what I am doing Wrong. We are using RadEditor 7.12.


Jouni
Top achievements
Rank 1
 answered on 27 Jan 2010
3 answers
145 views
Hi

I am trying to display the orders related to a certain customer, at the moment i am displaying all orders for every customer?

regards

D

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="nestedviewtemplate.aspx.vb" 
    Inherits="_Default" %> 
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.QuickStart" %> 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
</head> 
<body class="BODY"> 
    <form runat="server" id="mainForm" method="post"> 
    <telerik:RadScriptManager runat="server" ID="ScriptManager1"> 
    </telerik:RadScriptManager> 
    <!-- content start --> 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" /> 
    <telerik:RadGrid ID="RadGrid1"  runat="server" AutoGenerateColumns="true" 
        AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="True" PageSize="5" 
        GridLines="None" ShowGroupPanel="true"> 
        <PagerStyle Mode="NumericPages"></PagerStyle> 
        <MasterTableView DataKeyNames="customerid" AllowMultiColumnSorting="True"> 
            <NestedViewTemplate> 
                <telerik:RadGrid runat="server" ID="nestedgrid" OnNeedDataSource="onneeddatasource_nestedgrid" 
                    ShowFooter="true" AllowSorting="true" EnableLinqExpressions="false" OnItemCreated="nested_Created" 
                    OnItemCommand="Onitemcommand_nestedgrid_jahoor"> 
                    <MasterTableView ShowHeader="true" AutoGenerateColumns="true" AllowPaging="true" 
                        PageSize="7"> 
                        <Columns> 
                            <telerik:GridEditCommandColumn> 
                            </telerik:GridEditCommandColumn> 
                        </Columns> 
                        <EditFormSettings EditFormType="Template"> 
                            <FormTemplate> 
                                <asp:ImageButton ID="imgb" runat="server" CommandName="go" /> 
                                <asp:Button ID="btn1" runat="server" CommandName="buttonclicked" /> 
                                <asp:DropDownList ID="ddl1" runat="server"> 
                                </asp:DropDownList> 
                            </FormTemplate> 
                        </EditFormSettings> 
                    </MasterTableView> 
                </telerik:RadGrid> 
            </NestedViewTemplate> 
           <NestedViewSettings >   
               <ParentTableRelation>  
                   <telerik:GridRelationFields DetailKeyField="CustomerID" MasterKeyField="CustomerID" />  
               </ParentTableRelation>  
           </NestedViewSettings>  
            <Columns> 
            </Columns> 
        </MasterTableView> 
        <ClientSettings AllowDragToGroup="true" /> 
    </telerik:RadGrid> 
    
    <!-- content end --> 
    </form> 
</body> 
 

Imports Telerik.Web.UI 
Imports System 
Imports System.Data 
Imports System.Data.SqlClient 
Imports System.Web.UI.WebControls 
Imports System.Configuration 
Partial Class _Default 
    Inherits System.Web.UI.Page 
 
 
    Dim ConnString As String = ConfigurationManager.ConnectionStrings("NorthwindConnectionString").ConnectionString 
 
    Protected Sub nestedgrid_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs) 
        Dim btn As Button 
        Dim ddl As DropDownList 
        If e.Item.ItemType = GridItemType.EditFormItem And e.Item.IsInEditMode Then 
            Dim edititem As GridEditFormItem = CType(e.Item, GridEditFormItem) 
            ddl = CType(edititem.FindControl("ddl1"), DropDownList) 
            btn = CType(edititem.FindControl("btngo"), Button) 
 
            ddl.DataSource = dsddl() 
            ddl.DataTextField = "ShipName" 
            ddl.DataValueField = "OrderID" 
            ddl.DataBind() 
 
        End If 
    End Sub 
 
 
 
    Public Function myds() As DataSet 
        Dim conn As SqlConnection = New SqlConnection(ConnString) 
        Dim adapter As SqlDataAdapter = New SqlDataAdapter 
        adapter.SelectCommand = New SqlCommand("SELECT TOP 10 OrderID, ShipName, ShipAddress FROM Orders", conn) 
        Dim myDataSet As DataSet = New DataSet 
 
        conn.Open() 
        Try 
            adapter.Fill(myDataSet, "Orders") 
            adapter.SelectCommand = New SqlCommand("SELECT OrderID, Quantity FROM [Order Details]", conn) 
            adapter.Fill(myDataSet, "OrderDetails") 
        Finally 
            conn.Close() 
        End Try 
        Return myDataSet 
 
    End Function 
 
 
    Public Function dsddl() As DataSet 
        Dim conn As SqlConnection = New SqlConnection(ConnString) 
        Dim adapter As SqlDataAdapter = New SqlDataAdapter 
        Dim myDataSet As DataSet = New DataSet 
 
        conn.Open() 
        Try 
 
            adapter.SelectCommand = New SqlCommand("SELECT TOP 10 OrderID, ShipName FROM Orders", conn) 
            adapter.Fill(myDataSet, "OrderDetails") 
        Finally 
            conn.Close() 
        End Try 
        Return myDataSet 
 
    End Function 
 
 
    Protected Sub nestedgrid_ItemCommand(ByVal source As Object, ByVal e As GridCommandEventArgs) 
        If e.CommandName = "Go" Then 
            Dim item As GridDataItem = DirectCast(e.Item, GridDataItem) 
            Dim editItem As GridEditFormItem = DirectCast(item.EditFormItem, GridEditFormItem) 
 
            Dim doptdown As DropDownList = DirectCast(editItem.FindControl("ddl1"), DropDownList) 
            Dim value As String = doptdown.SelectedItem.Text 
            Response.Write(value) 
        End If 
    End Sub 
 
    Public Function GetDataTable(ByVal query As String) As DataTable 
        Dim ConnString As String = ConfigurationManager.ConnectionStrings("NorthwindConnectionString").ConnectionString 
        Dim conn As SqlConnection = New SqlConnection(ConnString) 
        Dim adapter As SqlDataAdapter = New SqlDataAdapter 
        adapter.SelectCommand = New SqlCommand(query, conn) 
        Dim table1 As New DataTable 
        conn.Open() 
        Try 
            adapter.Fill(table1) 
        Finally 
            conn.Close() 
        End Try 
        Return table1 
    End Function 
 
 
 
    Public Sub onneeddatasource_nestedgrid(ByVal source As Object, ByVal e As GridNeedDataSourceEventArgs) 
        Dim grid As RadGrid = DirectCast(source, RadGrid) 
        ' Populate the grid         
        grid.DataSource = GetDataTable("SELECT * FROM orders") 
    End Sub 
 
 
    Protected Sub Onitemcommand_nestedgrid_jahoor(ByVal source As Object, ByVal e As GridCommandEventArgs) 
        '  Throw New NotImplementedException() 
   Dim item As GridDataItem 
 
        If e.CommandName = "go" Then 
 
            If e.Item.ItemType = GridItemType.Item Then 
                item = CType(e.Item, GridDataItem) 
 
                Dim ddl As DropDownList = CType(item.EditFormItem.FindControl("ddl1"), DropDownList) 
                'ddlEventStatus = CType(itemEdit.FindControl("ddlEventStatus"), DropDownList) 
 
                Response.Write(ddl.SelectedItem.Text) 
            End If 
 
        End If 
    End Sub 
 
    Protected Sub nested_Created(ByVal sender As Object, ByVal e As GridItemEventArgs) 
 
        Dim ddl As DropDownList 
        If e.Item.ItemType = GridItemType.EditFormItem And e.Item.IsInEditMode Then 
            Dim edititem As GridEditFormItem = CType(e.Item, GridEditFormItem) 
            ddl = CType(edititem.FindControl("ddl1"), DropDownList) 
           
            ddl.DataSource = dsddl() 
            ddl.DataTextField = "ShipName" 
            ddl.DataValueField = "OrderID" 
            ddl.DataBind() 
 
        End If 
    End Sub 
 
    Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource 
        RadGrid1.DataSource = GetDataTable("Select * from customers") 
    End Sub 
End Class 
 

Tsvetoslav
Telerik team
 answered on 27 Jan 2010
3 answers
173 views
I have a RadGrid with AutoGenerated GridBoundColumns.

This works great, however i am trying to make one of these columns a GridDropDownColumn from the ColumnCreated() event. I can't find any examples of this anywhere. This post: http://www.telerik.com/help/aspnet/grid/grdcustomizeconfiguregriddropdowncolumn.html is not helping me very much being that all my columns are GridBoundColumns, i have no GridDropDownColumns and (GridDropDownListColumnEditor)(editMan.GetColumnEditor()) fails every time.

Can someone tell me how to set a GridBoundColumn as a GridDropDownColumn?

Thanks,

Duncan
Princy
Top achievements
Rank 2
 answered on 27 Jan 2010
3 answers
175 views
I am using a bar chart with 3 stacked bars and a line, so 4 series total.   The xAxis label is going right through the xAxis, i really need to move the xAxis label down about 50px so it sets below the xAxis.


sample if ______________________ is the xAxis and 12345 is the label.


1 
  2
__3_____________________________________
     4
       5

I am setting the following values.

            radChart.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 45; 
            radChart.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Color = System.Drawing.Color.Black; 
            radChart.PlotArea.XAxis.AxisLabel.Appearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.Bottom; 
            radChart.PlotArea.XAxis.AxisLabel.Appearance.Position.Auto = false; 
            radChart.PlotArea.XAxis.AxisLabel.Appearance.Position.X = 200; 
            radChart.PlotArea.XAxis.AxisLabel.Appearance.Position.Y = 125; 

Ideas?
Ves
Telerik team
 answered on 27 Jan 2010
2 answers
197 views
I have created custom control for RadRotator, the functionality of control is like http://demos.telerik.com/aspnet-ajax/rotator/examples/gallery/defaultcs.aspx. I am using RadAjaxManager to show the details section on click of the strip image. But its refreshing the whole page, instead of just refreshing the details section.

It will be highly appreciated if you could provide me the steps or sample code for configuring the RadAjaxManager in custom controls.

I am getting folowing error on the page

 
Message: Sys.ArgumentNullException: Value cannot be null.  
Parameter name: panelsCreated[2]  
 




Thanks
Datta Navatre

Rosen
Telerik team
 answered on 27 Jan 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?