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

I am using radgrid in my application. i want add a one record using Add button in radgrid.

In this radgrid i have one radCombobox. i want to hide two column dependent on radcomobobox selectedIndexChanged.

Please give any tips for this one.

It is very urgent. Please help me.

I have attached Images also
Princy
Top achievements
Rank 2
 answered on 13 Jan 2011
5 answers
523 views
Hi all,

in RadAjaxManager1_AjaxRequest event I select data from database into reader, then if reader is Nothing i want to prompt alert
    Response.Write("<script>alert('There is no Data to show');</script>") .

when I run alert didn't prompt, just got as below ...
Error: Sys.WebForms.PageRequestmanagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the reponse is modified by calls to Reponse. Write(), reponse filters, httpModules, orserver trace is enabled.
Detail: Error parsing near '<script> alert(' .

How can I solve this please...

Thanks and best regards
Naunton
Top achievements
Rank 1
 answered on 13 Jan 2011
1 answer
121 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
42 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
432 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
402 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
61 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
248 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
66 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
270 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?