Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
109 views
HI!
I want to get the values of RadSlider range in client side (on onClientValuechanged) and to set this values to simple input text fields.
How is possible to do this crossbrowser?
Tsvetie
Telerik team
 answered on 22 Feb 2010
4 answers
90 views
I am having a problem posting back in ie7 when a row is selected from a grid.  I am using the following code:

<

 

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?

 

David Meier
Top achievements
Rank 1
 answered on 22 Feb 2010
1 answer
148 views
Hi Telerik-Support,

I use a RadContextmenu and set the skin to "default". Than I build up an menu with an submenu. On this submenu I use asp:Checkboxes in an item template.

My probelm is that the "default" style isn't inherit. If i hove over an root menu item it gets an gray colored background image. If i hove over an submenu template item nothing happens? Why and how can I solve this behavour?

Thanks a lot.
Christian
Schlurk
Top achievements
Rank 2
 answered on 22 Feb 2010
1 answer
77 views
How can you create two separate CommandItemTemplate on the grid, so that one can be on the top while the other at the bottom and they are function differently? For example, one use to clear all filters and the other one use to export to excel etc.

Thanks for the help.
Daniel
Telerik team
 answered on 22 Feb 2010
1 answer
89 views
I am using the heirchary model and have gotten my detail talbles to correctly display using the DetailTableData bind event.  My question is if the parent row doesnt have any children is it possible to not show the expand row icon to the left of the parent row?  Would I accomplish this in the itemdatabound event?

J
J
Top achievements
Rank 1
 answered on 22 Feb 2010
0 answers
91 views
Disregard, problem was with the coder.
Kip
Top achievements
Rank 1
 asked on 22 Feb 2010
2 answers
270 views
Hello

I am having problems trying to display the message (or a custom message) "No records to diplay" in the radgrid when my page first loads.

I have tried putting in this code on the page load event:

 

If Not IsPostBack Then

 

rgListingWithImages.DataSource =

New Object() {}

 

 

'rgListingWithImages.Rebind()

 

 

End If

 

 
but I get this error.
Both DataSource and DataSourceID are defined on 'rgListingWithImages'.  Remove one definition.

Here is my radgrid code:
***************************************************************************************************************************************************************

<

 

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

 

Chom
Top achievements
Rank 1
 answered on 22 Feb 2010
2 answers
198 views
I am developing an internal web application and when I upload an image using RadEditor Imageupload, it successfully gets uploaded to a virtual directory in the web application. The application creates a document and it can be viewed by anyone outside the network.

So when I insert the images, it reference the virtual directory which is only accessible internally.
So when people outside the network views the document, they are unable to see the images in the document since the image reference is set to the virtual folder.

I can copy the images in the virtual folder to a folder that is accessible from www. In that case how can I change the image reference to point to the external image.

for example.
Image upload folder in only Internal
~/images/a.jpg

I can copy this a.jpg to another server which is available externally.
Say I copy access the image using
www.test.org/images/a.jpg

How can I change the image reference from ~/images/a.jpg to www.test.org/images/a.jpg/

please let me know.
thanks

nickJr
Top achievements
Rank 1
 answered on 22 Feb 2010
4 answers
129 views

Hello,

I start with Telerik, and i woul'd like to put Telerik controls into webcontrol.
i have try many solution, but no one display me the result in the design mode.
I have an error : "Error Creating Control " "Object reference not set to an instance of an object."
but when I run the webpage, i see my Telerik control.

do you have an idea for this problems ?

my code :
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 
 
 

thanks a lot !!!
Daniel
Telerik team
 answered on 22 Feb 2010
1 answer
79 views
Hi,

I want to set styles to Paragaraph, I am able to set the styles but after setting style the selected paragraphs are becoming bold. Editor is adding <Strong> tag to the selected Paragraphs. Please tell me any work around for this, or is it issue in Editor when we do PasteHtml with P tags. This happens for P tags

My Code is as below:

var cssTextFormed = "text-align:"+textAlign+";line-height:"+lineSpace+";text-indent:"+hanging+"; margin: "+ beforePara+ " "+ rightindents +" "+ afterPara +" "+ leftindents +";";
   
var editor =$find("RadEditor1");
   
//if more than one paragrah is selected then replace p tag with applied style
var selection = editor.getSelectionHtml().replace(/<P/g,'<P style='+cssTextFormed);
editor.pasteHtml(selection);
Rumen
Telerik team
 answered on 22 Feb 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?