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

I'm trying to use RadGrid with Oracel. I'm using the Devart Oracle provider. I want to use advanced binding. When this runs I get no rows to display message. Code included below.  any suggestions as to wha tI'm doing wrong? Version of contorls is v.2010.3.1109.35

 

<%

@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>

 

<%

@ Register assembly="Devart.Data.Oracle.Web, Version=5.35.54.0, Culture=neutral, PublicKeyToken=09af7300eec23701" namespace="Devart.Data.Oracle.Web" tagprefix="cc1" %>

 

 

 

 

<!

 

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>

 

 

 

 

 

 

<telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />

 

</

 

head>

 

<

 

body>

 

 

 

 

 

 

<form id="form1" runat="server">

 

 

 

 

 

 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">

 

 

 

 

 

 

<Scripts>

 

 

 

 

 

<%

--Needed for JavaScript IntelliSense in VS2010--%>

 

<%

--For VS2008 replace RadScriptManager with ScriptManager--%>

 

 

<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />

 

 

 

 

 

 

<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />

 

 

 

 

 

 

<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />

 

 

 

 

 

 

</Scripts>

 

 

 

 

 

 

</telerik:RadScriptManager>

 

 

 

 

 

 

<script type="text/javascript">

 

 

 

 

 

 

//Put your JavaScript code here.

 

 

 

 

 

 

</script>

 

 

 

 

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

 

 

 

 

</telerik:RadAjaxManager>

 

 

 

 

 

 

<div>

 

 

 

 

 

 

</div>

 

 

 

 

 

 

<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None"

 

 

onneeddatasource="RadGrid1_NeedDataSource" >

 

 

 

 

 

 

 

 

 

<

 

HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>

 

<

 

MasterTableView AllowAutomaticUpdates="True" AutoGenerateColumns="False">

 

<

 

CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>

 

<

 

RowIndicatorColumn>

 

<

 

HeaderStyle Width="20px"></HeaderStyle>

 

</

 

RowIndicatorColumn>

 

<

 

ExpandCollapseColumn>

 

<

 

HeaderStyle Width="20px"></HeaderStyle>

 

</

 

ExpandCollapseColumn>

 

</

 

MasterTableView>

 

 

 

 

 

 

 

</telerik:RadGrid>

 

 

 

 

 

 

<cc1:OracleDataSource ID="OracleDataSource1" runat="server"

 

 

 

ConnectionString="User Id=user_name;Password=password;Server=PROD;Persist Security Info=True;"

 

 

OldValuesParameterFormatString="Original_{0}"

 

 

SelectCommand="select * from data_prequal.data_reporting">

 

 

 

 

 

 

</cc1:OracleDataSource>

 

 

 

 

 

 

</form>

 

</

 

body>

 

</

 

html>

 

 

 


using

 

System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Devart.Data.Oracle;
using System.Data;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;

 

public

 

partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack) return;
}

 

 

private DataTable GetOrdersDetails()
{
string ConnString = "User Id=user_name;Password=password;Server=PROD;Persist Security Info=True;";
string query = "SELECT * FROM data_reporting";
DataTable myDataTable = new DataTable();

 

 

using (OracleConnection conn = new OracleConnection(ConnString))
{
using (OracleDataAdapter adapter = new OracleDataAdapter())
{
adapter.SelectCommand =
new OracleCommand(query, conn);
conn.Open();

 

 

try
{
adapter.Fill(myDataTable);
}

 

 

finally
{
conn.Close();
}

 

}

}

 

return myDataTable;

 

}

 

protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
RadGrid1.DataSource = GetOrdersDetails();
}

 

}

 

 

 

 

 

Princy
Top achievements
Rank 2
 answered on 13 Jan 2011
2 answers
58 views
ItemCreated and ItemDataBoun Cost 2 seconds(50 Items) when I Created a Column dynamic on server side in Page_Load event.

whui
Top achievements
Rank 1
 answered on 13 Jan 2011
8 answers
505 views
Hi Telerik,

I am using Radgrid Q2 2010, VS 2005. I am binding the grid with more than 40000 records. First time i am binding only distinct values in each column, so the number of records is comparatively less. Then when i filter the grid,  I perform the filter on the 40000 records, and after filter it may contain a minimum of 35000 records. When i rebind the grid with the filtered result, sometimes it throws this error 
" htmlfile: Could not get the value property. Not enough storage is available to complete this operation." Or sometimes the browser is not responding and gets closed.

Please reply me asap. Its a very urgent requirement.

Thanks
Bidhan
Top achievements
Rank 2
 answered on 12 Jan 2011
4 answers
733 views
Hi,
How Can i Show preview image when select file from dialogbox and then click button for save.
i tried telerik 'change avatar ' examp it working for show but i cant save image. when i try save file always error
'''' The process cannot access the file because it is being used by another process. '''
My code below

'show image with ajax

 


Protected
Sub AsyncUpload1_FileUploaded(ByVal sender As Object, ByVal e As Telerik.Web.UI.FileUploadedEventArgs) Handles AsyncUpload1.FileUploaded

 

Thumbnail.Width =

 

Unit.Pixel(200)

 

Thumbnail.Height =

 

Unit.Pixel(150)

 

 

 

Dim imageData As Byte() = New Byte(e.File.InputStream.Length) {}

 

e.File.InputStream.Read(imageData, 0, e.File.InputStream.Length)

Thumbnail.DataValue = imageData

 

 

End Sub

 

'save image

 


Protected
Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click

 

 

 

    For Each f As Telerik.Web.UI.UploadedFile In AsyncUpload1.UploadedFiles

 

    f.SaveAs(

 

"c:\a.jpg", True)

 

 

 

    Next

 

 

 

End Sub

 


thanks
majid
Top achievements
Rank 1
 answered on 12 Jan 2011
1 answer
107 views
Hi There,

I recently migrated to the RadPanelBar from an old ASP.net Accordion Bar. My previous Accordion Bar had a built in setting called ContentCssClass for the content INSIDE the Panel itself. Unfortunately on the RadPanelBar I am having difficulty finding anything remotely close to this setting.

I have tried applying style to the <ContentTemplate>  and also tried adding extra <div>'s to apply style to the Inner Content but to my demise none of these worked properly.

Is there a simple way to apply style to the inside of a PanelItem that I'm missing?

Image: The attached image shows an example of the Panel I am trying to apply style to.
Landon
Top achievements
Rank 2
 answered on 12 Jan 2011
14 answers
319 views
Hi,
 I am using the radcalendar in my page. if i click on the particular date on the calendar, need to open small window, i did that, in that window i have textbox , ok button in that if i enter some value in the textbox, after click ok, it should be displayed in the previous page(calendar page) on the particular date. tell me how to do this?
Brown
Top achievements
Rank 1
 answered on 12 Jan 2011
3 answers
100 views
I am attempting to create  a tabstrip which has various buttons, but only for the selected tab...

the only way i can see of doing that is doing something similar to this tutorial here:

http://www.telerik.com/help/aspnet-ajax/create-closable-tabs-client-side.html

I have done essentially the same thing, however I have added the function RemoveImage(tab, divName) which is being called from the ClientTabUnselected event of the tabstrip.

The relevant javascript is shown below:

var tabStrip1;
 
        function OnClientLoad() {
            tabStrip1 = $find('<%= RadTabStrip1.ClientID %>');
 
            for (var i = 0; i < tabStrip1.get_tabs().get_count(); i++) {
                if (tabStrip1.get_tabs().getItem(i).get_value() != "addTab") {
                    AttachCloseImage(tabStrip1.get_tabs().getItem(i), "Images/TabStrip/toggle.png", i);
                }
            }
        }
 
        function CreateTabImage(ImageUrl) {
            var closeImage = document.createElement("img");
            closeImage.src = ImageUrl;
            closeImage.alt = "close";
            return closeImage;
        }
 
        function AttachCloseImage(tab, closeImageUrl, index) {
            var closeImage = CreateTabImage(closeImageUrl);
            closeImage.AssociatedTab = tab;
            closeImage.setAttribute("id", "_closeImageDiv_" + index);
            closeImage.onclick = function (e) {
                if (!e) e = event;
                if (!e.target) e = e.srcElement;
 
                deleteTab(tab);
 
                e.cancelBubble = true;
                if (e.stopPropagation) {
                    e.stopPropagation();
                }
 
                return false;
            }
            tab.get_innerWrapElement().appendChild(closeImage);
        }
 
        function RemoveImage(tab, divName) {
            var element = tab.get_innerWrapElement();
            var img = element.getElementById(divName);
            element.removeChild(img);
        }
 
        function TabUnselected(sender, eventArgs) {
            RemoveImage(eventArgs.get_tab(), "_closeImageDiv_" + tabStrip1.get_tabs().indexOf(eventArgs.get_tab()));
        }


the RemoveImage() function does not work for some reason... and I am not sure what it is.

as far as i can tell, the parameters are correct, I think perhaps it has to do with me finding the right parent container.

any help would be much appreciated! thanks.
Felipe
Top achievements
Rank 1
 answered on 12 Jan 2011
4 answers
337 views
Hi,

I'd like to be able to calculate some aggregate values and set the footer client side. 

I've got a reference to the footer object on the client using the method: get_masterTableViewFooter().

However, i can't work out how to get a reference to individual cells within this object.  Your Client API documentation doesn't seem to cover the footer object.

Can you tell me how to accomplish the following, client side:

footerItem["percentageOfTrades"].Text = TotalTradePct.ToString("N0");

Thanks



Andrew Ross
Top achievements
Rank 1
 answered on 12 Jan 2011
2 answers
108 views
Hello,

In my website, I am planning to have one outer shell, TabStrip in the inner shell for the links and side panes. Pretty much like how outlook is.
An example of what I'm looking for is: http://tinyurl.com/6le5hv2

Apart from TreeView & Tab Strip, could somebody please post a list of other controls which I would be using to create this web application? 
If this has already been created, then I would highly appreciate if you could post some demo links.

Thanks
Raj  ext Menu
Raj
Top achievements
Rank 1
 answered on 12 Jan 2011
6 answers
343 views
i am using version 7.1.2.0 of the editor

i am trying to set the default font dropdown, right now it always shows new times roman even when i don't have that selection in the dropdown.

I've tried the code i foudn in other threads:

var tool = editor.GetToolByName("FontName");
if (tool)
{
    tool.set_value("Arial");
}

but i get a "Object does not support this proeprty or method" error.

I've tried Set_value(), setValue(), SetValue(), even UpdateValue() and its variation i saw somewhere. Some doesn't throw an error, but does not set the default value.
Jon Shipman
Top achievements
Rank 1
 answered on 12 Jan 2011
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?