Hi,
From my TileClicked method in javascript I would like to check whether the Ctrl/Shift key is hold during the click so I can implement different behavior in that cases.
In Chrome I can use window.event to check this, but in Firefox the event is not accessible this way. I need the original click event of the dom element for that. Could this be provided through the TileClicked event as a parameter?
this is my code in javascript, by using asp.net gridview .Now i am trying to convert it to the Radgrid code using javascript but i cant find the suitable value.
plz look below asp.net gridview javascript code.
var varRow1 = 0;
var varcol = 0;
var varIndex = 0;
function fApplyToAllMenu(e, varLoop, varcell, varObj) {
if (document.getElementById('<%=gvDetails.ClientID %>') != null) {
var SelectAllObj = new Object();
SelectAllObj = document.getElementById("<%=divApplyToAll.ClientID %>");
var xPosition = getPosition(e).x + 15;
var yPosition = getPosition(e).y + 5;
SelectAllObj.style.position = "absolute";
SelectAllObj.style.top = String(yPosition) + "px";
SelectAllObj.style.left = String(xPosition) + "px";
SelectAllObj.style.display = "inline";
varIndex = varObj.parentNode.parentNode.rowIndex ;
//varRow1 = varLoop;
varRow1 = varObj.parentNode.parentNode.rowIndex ;
if (varRow1 == 0)
varRow1 = 1;
varcol = varcell;
}
return false;
}
function fApplyToAll() {
if (document.getElementById('<%=gvDetails.ClientID %>').rows[varRow1].cells[varcol].getElementsByTagName('INPUT')[0] != null) {
if (document.getElementById('<%=gvDetails.ClientID %>').rows[varRow1].cells[varcol].getElementsByTagName('INPUT')[0].readOnly == false) {
if (document.getElementById('<%=gvDetails.ClientID %>') != null)
if (document.getElementById('<%=gvDetails.ClientID %>').rows.length > 0)
for (var i = Number(varRow1); i < document.getElementById('<%=gvDetails.ClientID %>').rows.length - 1; i++) {
if (document.getElementById('<%=gvDetails.ClientID %>').rows[i + 1].cells[varcol].getElementsByTagName('INPUT')[0] != null)
document.getElementById('<%=gvDetails.ClientID %>').rows[i + 1].cells[varcol].getElementsByTagName('INPUT')[0].value = document.getElementById('<%=gvDetails.ClientID %>').rows[varRow1].cells[varcol].getElementsByTagName('INPUT')[0].value;
}
}
}
if (document.getElementById('<%=gvDetails.ClientID %>').rows[varRow1].cells[varcol].getElementsByTagName('SELECT')[0] != null) {
if (document.getElementById('<%=gvDetails.ClientID %>').rows[varRow1].cells[varcol].getElementsByTagName('SELECT')[0].disabled == false) {
if (document.getElementById('<%=gvDetails.ClientID %>') != null)
if (document.getElementById('<%=gvDetails.ClientID %>').rows.length > 0)
for (var i = Number(varRow1); i < document.getElementById('<%=gvDetails.ClientID %>').rows.length - 1; i++) {
if (document.getElementById('<%=gvDetails.ClientID %>').rows[i + 1].cells[varcol].getElementsByTagName('SELECT')[0] != null) {
document.getElementById('<%=gvDetails.ClientID %>').rows[i + 1].cells[varcol].getElementsByTagName('SELECT')[0].value = document.getElementById('<%=gvDetails.ClientID %>').rows[varRow1].cells[varcol].getElementsByTagName('SELECT')[0].value;
}
}
}
}
}
And this is my code. for Radgrid which i am using.
var varRow1 = 0;
var varcol = 0;
var varIndex = 0;
function fApplyToAllMenu(e, varLoop, varcell, varObj) {
debugger;
var grid = $find("<%= griddetails.ClientID %>");
if (grid != null) {
var SelectAllObj = new Object();
SelectAllObj = document.getElementById("<%=divApplyToAll.ClientID %>");
var xPosition = getPosition(e).x + 15;
var yPosition = getPosition(e).y + 5;
SelectAllObj.style.position = "absolute";
SelectAllObj.style.top = String(yPosition) + "px";
SelectAllObj.style.left = String(xPosition) + "px";
SelectAllObj.style.display = "inline";
varIndex = varObj.parentNode.parentNode.rowIndex;
varRow1 = varObj.parentNode.parentNode.rowIndex;
if (varRow1 == 0)
varRow1 = 2;
varcol = varcell + 2;
}
return false;
}
function fApplyToAll() {
debugger;
var grid = $find("<%= griddetails.ClientID %>");
var MasterTable = grid.get_masterTableView();
var Rows = MasterTable.get_dataItems();
var elements = grid.getElementsByTagName("*");
for (var i = 0; i < elements.length; i++) {
var element = elements[i];
if (element.id.indexOf(serverID) >= 0)
return element;
}
if (MasterTable.getCellByColumnUniqueName(Rows[varRow1].cells[varcol]).getElementsByTagName('INPUT')[0] != null) {
if (Rows[varRow1].cells[varcol].getElementsByTagName('INPUT')[0].readOnly == false) {
if (grid != null) {
if (Rows.length > 0) {
for (var i = Number(varRow1) ; i < Rows.length; i++) {
if (Rows[i + 1].cells[varcol].getElementsByTagName('INPUT')[0] != null) {
Rows[i + 1].cells[varcol].getElementsByTagName('INPUT')[0] = Rows[varRow1].cells[varcol].getElementsByTagName('INPUT')[0].value;
}
}
}
}
}
}
if (Rows[varRow1].cells[varcol].getElementsByTagName('SELECT')[0] != null) {
if (Rows[varRow1].cells[varcol].getElementsByTagName('SELECT')[0].disabled == false) {
if (grid != null) {
if (Rows.length > 0) {
for (var i = Number(varRow1) ; i < Rows.length; i++) {
if (Rows[i + 1].cells[varcol].getElementsByTagName('SELECT')[0] != null) {
Rows[i + 1].cells[varcol].getElementsByTagName('SELECT')[0] = Rows[varRow1].cells[varcol].getElementsByTagName('SELECT')[0].value;
}
}
}
}
}
}
}
This code working for if i select checkbox in radgrid, then press my right click of mouse, then context menu open on click on that then all the below checkbox get also checked.
I am attaching the image file for this.

When i try to filter dynamically created column ii get "is neither a DataColumn nor a DataRelation for table .. "
Ideas?
In the OnItemDeleted event of RadDataForm there is a method for retrieving the deleted record (e.Item.ExtractValues()) and e.Item.SavedOldValues. After successfully deleting a row I am finding that both the method and property listed above returns null. This should not be the case -- in RadGrid and other controls these fields are populated. What is the prescribed approach for accessing deleted data in an OnItemDeleted event? (I also tried OnItemDeleting). Any feedback is appreciated.
Thanks,
Shaun
I've created a dynamic grid which allows me to load different sets of data. I've now turned it into a widget so it can be placed and configured multiple times on a page. The problem I have now is I'm receiving this error when I load more than one widget.
There must be only one instance of RadStyleSheetManager per page.
Same is true for the RadPersisgenceManager. How might I overcome this issue so I can load multiple controls dynamically on a page?

I know this has come up multiple times and I have read multiple posts but have not been able to get it to work
On the parent page in the web browser, there is a button. When a user clicks on the button, it opens a page with a RadGrid in a RadWindow. We will call that WindowA.
In the RadGrid in WindowA, each record has a column with a HyperLink. When clicking on the HyperLink, it opens a different page in another RadWindow for the user to edit and update the data for that record. We will call that WindowB.
When the user edits the data and clicks on the Update button in WindowB, it needs to do the following:
- Execute a SQL statement to update the record in the database table.
- Close WindowB.
- Refresh or Rebind the RadGrid in WindowA using the RadAjaxManager to call an ajaxRequest to show the changes in the data.
-----------------------------------------------------------------------
I was able to do something similiar between the browser window (parent) and a RadWindow where the parent has the RadGrid which gets updated after user clicks on Update button in RadWindow. But I cannot get the scenario above to work.
-----------------------------------------------------------------------
I have read the article in http://docs.telerik.com/devtools/aspnet-ajax/controls/window/how-to/calling-functions-in-windows .
When I debug through the Javascript function, I get the error " Object doesn't support property or method 'get_ContentFrame' " on the following line of code:
oWnd.get_ContentFrame().contentWindow.MyTestViewTodayRelFn();
Below is my code.
Please help me to get this to work. A working example would help alot.
Thanks!
------------------------------------------------------------------------
Update button click subroutine in code-behind for page in WindowB ( VB code)
Protected Sub rbtnUpdateOrder_Click(sender As Object, e As EventArgs) Handles rbtnUpdateOrder.Click
...
ScriptManager.RegisterStartupScript(Me, [GetType](), "mykey", "CloseAndRebind();", True)
...
End Sub
Javascript function CloseAndRebind in page in WindowB (put in <head> </head> section):
function CloseAndRebind(args) {
var oManager = GetRadWindow().BrowserWindow.GetRadWindowManager();
var oWnd = oManager.getWindowByName("Release History");
oWnd.get_ContentFrame().contentWindow.MyTestViewTodayRelFn();
alert(oWnd);
GetRadWindow().close();
}
Javascript function MyTestViewTodayRelFn in page in WindowA (put in <head> </head> section):
function MyTestViewTodayRelFn() {
alert("Called MyTestViewTodayRelFn");
}
Note: MyTestViewTodayRelFn is just a test function. Here is an example of what the actual function would be in the page for WindowA:
function refreshGridRYG(arg) {
if (!arg) {
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
}
else {
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate");
}
}
Sincerely,
Keith Jackson
ScriptManager
.RegisterStartupScript(this.Page, this.GetType(), "printRADGrid", "PrintRadGrid();", true);
but the contents of my radgrid seems to be null. I am also using master pages. I have spent a while trying to find an easy solution and haven't been very successful. Can someone please point me in the right direction? Thanks in advance for your help!
I am trying to hide and show RadHtmlChart based on selection of dropdown. It works fine (hides and shows) unless i set style="display:none;", in that case it does not show itself. Not sure if it matters, but I load control not on Page_Load, but on Button click.
This is another annoyance with Telerik controls that drives me bananas.
Please suggest something
<telerik:RadHtmlChart runat="server" ID="pieChart" style="display:none;"
Width="1100px" Height="580px"
Transitions="true">
<ChartTitle Text="" >
<Appearance Align="Center" Position="Top" Visible="false">
<TextStyle Bold="true"/>
</Appearance>
</ChartTitle>
<Legend>
<Appearance Position="Right" Visible="false"></Appearance>
</Legend>
<PlotArea>
<Series>
<telerik:PieSeries DataFieldY="TotalEmploymentOM" NameField="IndustryName">
<LabelsAppearance Position="OutsideEnd" DataField="IndustryName">
</LabelsAppearance>
<TooltipsAppearance Color="White" DataFormatString="{0:N0}"/>
</telerik:PieSeries>
</Series>
</PlotArea>
</telerik:RadHtmlChart>
function onchange_ddlSelectionOM() {
var ddltext = $('option:selected', $('#ddlSelectionOM')).text();
if (ddltext == "Pie") {
document.getElementById("<%=grdOM.ClientID %>").style.display = "none";
document.getElementById("<%=chartJobsBySectorAnnualOM.ClientID %>").style.display = "none";
document.getElementById("<%=pieChart.ClientID %>").style.display = "";
}
}
Hello,
Is there a way to make the filter image/icon standout out more when the column has a filter applied to it. I'm currently using the Windows 7 skin and it is hard to tell which columns have a filter applied based on the slight difference in styling between the image of a column with no filter vs the image of a column with an active filter.
-Alex
We use the RadTileList on a RadTab panel as first tab item. When I click on a Tile a new tab is opened.
On leaving the RadTileList tab I would like to save the vertical scroll position and restore it when the RadTileList tab is visited again.
Any ideas how to accomplish this? I did not found any client-side methods for it.