<
telerik:RadGrid ID="grdDropBox" runat="server" AutoGenerateColumns="False"
GridLines="None" onselectedindexchanged="grdDropBox_SelectedIndexChanged"
Skin="Office2007" Width="827px"
ondeletecommand="grdDropBox_DeleteCommand" AllowAutomaticDeletes="True"
DataSourceID="SqlDropBoxDS" AllowAutomaticUpdates="True"
onneeddatasource="grdDropBox_NeedDataSource">
<ValidationSettings EnableValidation="False" />
<MasterTableView datakeynames="Email,UploadedBy,UploadDate"
datasourceid="SqlDropBoxDS">
<Columns>
<telerik:GridButtonColumn CommandName="Select" HeaderText="Download"
Text="Download" UniqueName="SelectRow">
</telerik:GridButtonColumn>
<telerik:GridBoundColumn DataField="Email" HeaderText="Email"
UniqueName="Email" ReadOnly="True" SortExpression="Email">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="FileName" HeaderText="FileName"
UniqueName="FileName" SortExpression="FileName">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="FileType" HeaderText="FileType"
UniqueName="FileType" SortExpression="FileType">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="UploadedBy" HeaderText="UploadedBy"
UniqueName="UploadedBy" ReadOnly="True" SortExpression="UploadedBy">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="UploadDate" HeaderText="UploadDate"
UniqueName="UploadDate" DataType="System.DateTime" ReadOnly="True"
SortExpression="UploadDate">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="EmailNotify" HeaderText="EmailNotify"
UniqueName="EmailNotify" SortExpression="EmailNotify">
</telerik:GridBoundColumn>
<telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete"
HeaderText="Delete" Text="Delete" UniqueName="DeleteColumn"
ConfirmText="Are you sure you want to delete this item?"
ConfirmTitle="Delete Confirmation">
</telerik:GridButtonColumn>
</Columns>
</MasterTableView>
<ClientSettings EnablePostBackOnRowClick="true" EnableRowHoverStyle="true">
</ClientSettings>
</telerik:RadGrid>
The strange part is this works fine in firefox, in VS development server, and on the same network as the Webserver. It doesn't postback when outside of the network (Both the Download and Delete don't). Any ideas?
If Not IsPostBack Then
rgListingWithImages.DataSource =
New Object() {}
'rgListingWithImages.Rebind()
End If
<
telerik:RadGrid ID="rgListingWithImages" runat="server" GridLines="None" Skin="Office2007"
PageSize="8" ClientSettings-Scrolling-SaveScrollPosition="true" AllowPaging="True"
DataSourceID="dsBusinessListings">
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
<AlternatingItemStyle HorizontalAlign="Left" />
<ClientSettings>
</ClientSettings>
<PagerStyle Mode="NumericPages" />
<MasterTableView PageSize="5" DataSourceID="dsBusinessListings" AutoGenerateColumns="False"
DataKeyNames="ID" CommandItemDisplay="Top" ShowHeadersWhenNoRecords="true" NoMasterRecordsText="Insert some records here">
<Columns>
<telerik:GridButtonColumn CommandName="DeleteRow" CommandArgument="DeleteRow" HeaderText=""
Text="Delete" UniqueName="DeleteRow">
</telerik:GridButtonColumn>
<telerik:GridBoundColumn DataField="ID" DefaultInsertValue="" HeaderText="ID" SortExpression="ID"
UniqueName="ID" DataType="System.Int32" ReadOnly="True" Visible="false">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CustomerID" DefaultInsertValue="" HeaderText="CustomerID"
SortExpression="CustomerID" UniqueName="CustomerID" Visible="false">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="OrderID" DefaultInsertValue="" HeaderText="OrderID"
SortExpression="OrderID" UniqueName="OrderID">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="OrderDate" DataType="System.DateTime" DefaultInsertValue=""
HeaderText="OrderDate" SortExpression="OrderDate" UniqueName="OrderDate" Visible="false">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="BusinessListingNumber" DataType="System.Int32"
DefaultInsertValue="" HeaderText="BusinessListingNumber" SortExpression="BusinessListingNumber"
UniqueName="BusinessListingNumber">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="NumberOfImages" DataType="System.Int32" DefaultInsertValue=""
HeaderText="NumberOfImages" SortExpression="NumberOfImages" UniqueName="NumberOfImages">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="BusinessListingDescription" DefaultInsertValue=""
HeaderText="BusinessListingDescription" SortExpression="BusinessListingDescription"
UniqueName="BusinessListingDescription">
</telerik:GridBoundColumn>
</Columns>
<PagerStyle Mode="NextPrev" />
<CommandItemTemplate>
<asp:Button ID="btnInsertNewRecord" runat="server" CommandName="InsertNewRecord"
Text="New Record" Width="90px" Height="22px" />
</CommandItemTemplate>
</MasterTableView>
</telerik:RadGrid>
<asp:SqlDataSource ID="dsBusinessListings" runat="server" ConnectionString="<%$ ConnectionStrings:hbocdbConnectionString %>"
SelectCommand="admin_Customers_BusinessListing_SelectPrimaryInfo" SelectCommandType="StoredProcedure"
InsertCommand="admin_Customers_BusinessListing_InsertPrimaryInfo" InsertCommandType="StoredProcedure"
DeleteCommand="admin_Customers_BusinessListing_DeleteRowPrimaryInfo" DeleteCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter Name="CustomerID" Type="String" />
<asp:Parameter Name="OrderID" Type="String" />
<asp:Parameter Name="WithSlideNoSlide" Type="String" />
</SelectParameters>
<InsertParameters>
<asp:Parameter Name="CustomerID" Type="String" />
<asp:Parameter Name="OrderID" Type="String" />
<asp:Parameter Name="TabStripSelectedIndex" Type="Int16" />
<asp:Parameter Name="BusinessListingDescription" Type="String" />
<asp:Parameter Name="WithSlideNoSlide" Type="String" />
</InsertParameters>
<DeleteParameters>
<asp:Parameter Name="CustomerID" Type="String" />
<asp:Parameter Name="OrderID" Type="String" />
<asp:Parameter Name="BusinessListingNumber" Type="Int16" />
<asp:Parameter Name="WithSlideNoSlide" Type="String" />
</DeleteParameters>
</asp:SqlDataSource>
<asp:Button ID="Button1" runat="server" Text="Button" />
***************************************************************************************************************************************************************
and my code behind to follow:
***************************************************************************************************************************************************************
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Temp for querystring params
'Set up the viewstate vars
Me.CustomerID = "BLC-7SUZE1SNNF-242010"
Me.OrderID = "OID-KWUV6-2212010"
Me.BusinessListingNumber = 1
Me.WithSlideNoSlide = "WS"
If Not IsPostBack Then
rgListingWithImages.DataSource =
New Object() {}
'rgListingWithImages.Rebind()
End If
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
dsBusinessListings.SelectParameters(
"CustomerID").DefaultValue = "BLC-7SUZE1SNNF-242010"
dsBusinessListings.SelectParameters(
"OrderID").DefaultValue = "OID-KWUV6-2212010"
dsBusinessListings.SelectParameters(
"WithSlideNoSlide").DefaultValue = "WS"
End Sub
#Region
"RadGrid With Images Events."
Protected Sub rgListingWithImages_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles rgListingWithImages.ItemCommand
'Check which command name was selected
Select Case e.CommandName
Case "InsertNewRecord"
'Insert a new row into the BusinessListings table
dsBusinessListings.InsertParameters(
"CustomerID").DefaultValue = Me.CustomerID
dsBusinessListings.InsertParameters(
"OrderID").DefaultValue = Me.OrderID
dsBusinessListings.InsertParameters(
"TabStripSelectedIndex").DefaultValue = 0
dsBusinessListings.InsertParameters(
"BusinessListingDescription").DefaultValue = "Business Listing with slides."
dsBusinessListings.InsertParameters(
"WithSlideNoSlide").DefaultValue = "WS"
'Call the Insert method
dsBusinessListings.Insert()
'Refresh the grid data
SelectgridWithImages()
Exit Select
Case "DeleteRow"
'Delete the selected row from the BusinessListing table
Dim myItem As GridDataItem = DirectCast(e.Item, GridDataItem)
Dim CustID As TableCell = myItem("CustomerID")
Dim OrdID As TableCell = myItem("OrderID")
Dim ListNo As TableCell = myItem("BusinessListingNumber")
''Fill delete parameters
dsBusinessListings.DeleteParameters(
"CustomerID").DefaultValue = CustID.Text
dsBusinessListings.DeleteParameters(
"OrderID").DefaultValue = OrdID.Text
dsBusinessListings.DeleteParameters(
"BusinessListingNumber").DefaultValue = CType(ListNo.Text, Integer)
dsBusinessListings.DeleteParameters(
"WithSlideNoSlide").DefaultValue = "WS"
'Call delete method
dsBusinessListings.Delete()
'Refresh the grid data
SelectgridWithImages()
Exit Select
End Select
End Sub
Protected Sub rgListingWithImages_PageIndexChanged(ByVal source As Object, ByVal e As Telerik.Web.UI.GridPageChangedEventArgs) Handles rgListingWithImages.PageIndexChanged
SelectgridWithImages()
End Sub
Private Sub SelectgridWithImages()
'This is a basic select statement to fill the grid with data
dsBusinessListings.SelectParameters(
"CustomerID").DefaultValue = "BLC-7SUZE1SNNF-242010"
dsBusinessListings.SelectParameters(
"OrderID").DefaultValue = "OID-KWUV6-2212010"
dsBusinessListings.SelectParameters(
"WithSlideNoSlide").DefaultValue = "WS"
End Sub
#End
Region
***************************************************************************************************************************************************************
I have tried several things including the needdatasource but it still is not comming up.
Can someone point me in the right direction.
Thanks
| Public Class Class11 |
| Inherits System.Web.UI.WebControls.WebControl |
| Protected WithEvents RadComboBox2 As Global.Telerik.Web.UI.RadComboBox |
| Public Sub New() |
| MyBase.new() |
| RadComboBox2 = New Telerik.Web.UI.RadComboBox |
| RadComboBox2.ID = "toto" |
| End Sub |
| Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter) |
| RadComboBox2.RenderControl(output) |
| MyBase.CreateChildControls() |
| End Sub |
| Protected Overrides Sub CreateChildControls() |
| Me.Controls.Clear() |
| Me.Controls.Add(RadComboBox2) |
| End Sub |
