Hello,
In my site i am using Rad Grid,Rad Contex menu and Rad popup features.
i am facing some problems :-
1. while i am inserting some through the Rad Popup , i am not being able to rebining it.so newly inserted data are not showing in
the Rad grid.Rad grid and Rad popup are 2 diiferent Aspx page.
2. After inserting data through Rad popup i want to close it automatically,How can i do this?
Thanks.
Denny
Hi, I have a button to programatically build the url for one RadWindow, but I have some strange problem showing the window, after the Window is closed, every control that must initiate an Ajax request forces a page reload on postback and the window apperas again.
RadGrid
r = new RadGrid();
r.MasterTableView.DataKeyNames =
new string[] { "DepartmentID" };
r.Skin =
"Default";
r.Width =
Unit.Percentage(100);
r.PageSize = 5;
r.AllowPaging =
true;
r.AutoGenerateColumns =
false;
r.MasterTableView.PageSize = 15;
//Add columns
GridBoundColumn boundColumn;
boundColumn =
new GridBoundColumn();
boundColumn.DataField =
"DepartmentID";
boundColumn.HeaderText =
"DepartmentID";
r.MasterTableView.Columns.Add(boundColumn);
boundColumn =
new GridBoundColumn();
boundColumn.DataField =
"Budget";
boundColumn.HeaderText =
"Budget";
r.MasterTableView.Columns.Add(boundColumn);
//Detail table - Orders (II in hierarchy level)
GridTableView tableViewOrders = new GridTableView(r);
//tableViewOrders.DataSourceID = "AccessDataSource2";
tableViewOrders.DataKeyNames =
new string[] { "CourseID" };
GridRelationFields relationFields = new GridRelationFields();
relationFields.MasterKeyField =
"DepartmentID";
relationFields.DetailKeyField =
"DepartmentID";
tableViewOrders.ParentTableRelation.Add(relationFields);
RadGrid1.MasterTableView.DetailTables.Add(tableViewOrders);
//Add columns
boundColumn =
new GridBoundColumn();
boundColumn.DataField =
"CourseID";
boundColumn.HeaderText =
"CourseID";
tableViewOrders.Columns.Add(boundColumn);
boundColumn =
new GridBoundColumn();
boundColumn.DataField =
"Title";
boundColumn.HeaderText =
"Title";
tableViewOrders.Columns.Add(boundColumn);
r.AllowMultiRowSelection =
true;
r.MasterTableView.DetailTables.Add(tableViewOrders);
r.DetailTableDataBind +=
new GridDetailTableDataBindEventHandler(r_DetailTableDataBind);
r.NeedDataSource +=
new GridNeedDataSourceEventHandler(r_NeedDataSource);
r.ID =
"RockOn";
this.PlaceHolder1.Controls.Add(r);
its the same code posted on Site Examples..
it loads ok but when i try to expand the grid Row ... i get an error--
Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
on page load i m binding the DataSets to the Grid
Value='<%#Eval("answer")%>'
but I get error !!???
I have a custom HttpModule that filters out whitespace. When it is enabled, the progress dialog does not appear. I can't seem to figure out why. Here is the code along with the change to web.config. Please note that the whitespace code isn't even running on the upload.aspx page. The line of code that causes the progress bar to fail seems to be:
if (app.Request["HTTP_X_MICROSOFTAJAX"] != null) { return; }
If I put a "return;" immediately above this line, the progress dialog appears. If I put a "return;" immediately after this line, the progress dialog does NOT appear. How does the executing the above line of code cause the progress dialog to fail to appear?
Thanks for any insight into this issue. For now, I have to disable my whitespace httpmodule.
John
| <httpModules> |
| <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI" /> |
| <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> |
| <add name="EntityTransactionModule" type="REO.Web.Data.EntityTransactionModule, REO.Web"/> |
| <add name="WhitespaceModule" type="WhitespaceModule"/> |
| </httpModules> |
| #region Using |
| using System; |
| using System.IO; |
| using System.Web; |
| using System.IO.Compression; |
| using System.Text.RegularExpressions; |
| #endregion |
| /// <summary> |
| /// Removes whitespace from the webpage. |
| /// </summary> |
| public class WhitespaceModule : IHttpModule |
| { |
| #region IHttpModule Members |
| void IHttpModule.Dispose() |
| { |
| // Nothing to dispose; |
| } |
| void IHttpModule.Init(HttpApplication context) |
| { |
| context.BeginRequest += new EventHandler(context_BeginRequest); |
| } |
| #endregion |
| void context_BeginRequest(object sender, EventArgs e) |
| { |
| HttpApplication app = sender as HttpApplication; |
| if (app.Request["HTTP_X_MICROSOFTAJAX"] != null) { return; } |
| string rawurl = app.Request.Path.ToLower(); |
| if (rawurl.EndsWith(".aspx") && !rawurl.ToLower().EndsWith("upload.aspx")) |
| { |
| app.Response.Filter = new WhitespaceFilter(app.Response.Filter); |
| } |
| } |
| #region Stream filter |
| private class WhitespaceFilter : Stream |
| { |
| public WhitespaceFilter(Stream sink) |
| { |
| _sink = sink; |
| } |
| private Stream _sink; |
| private static Regex reg = new Regex(@"(?<=[^])\t{2,}|(?<=[>])\s{2,}(?=[<])|(?<=[>])\s{2,11}(?=[<])|(?=[\n])\s{2,}"); |
| #region Properites |
| public override bool CanRead |
| { |
| get { return true; } |
| } |
| public override bool CanSeek |
| { |
| get { return true; } |
| } |
| public override bool CanWrite |
| { |
| get { return true; } |
| } |
| public override void Flush() |
| { |
| _sink.Flush(); |
| } |
| public override long Length |
| { |
| get { return 0; } |
| } |
| private long _position; |
| public override long Position |
| { |
| get { return _position; } |
| set { _position = value; } |
| } |
| #endregion |
| #region Methods |
| public override int Read(byte[] buffer, int offset, int count) |
| { |
| return _sink.Read(buffer, offset, count); |
| } |
| public override long Seek(long offset, SeekOrigin origin) |
| { |
| return _sink.Seek(offset, origin); |
| } |
| public override void SetLength(long value) |
| { |
| _sink.SetLength(value); |
| } |
| public override void Close() |
| { |
| _sink.Close(); |
| } |
| public override void Write(byte[] buffer, int offset, int count) |
| { |
| byte[] data = new byte[count]; |
| Buffer.BlockCopy(buffer, offset, data, 0, count); |
| string html = System.Text.Encoding.Default.GetString(buffer); |
| if (!html.Contains("textarea")) |
| { |
| html = reg.Replace(html, string.Empty); |
| } |
| byte[] outdata = System.Text.Encoding.Default.GetBytes(html); |
| _sink.Write(outdata, 0, outdata.GetLength(0)); |
| } |
| #endregion |
| } |
| #endregion |
| } |
<
telerik:GridButtonColumn CommandName="Delete" UniqueName="Delete" Text="Delete" ButtonType="ImageButton"
ImageUrl="~/Image/Delete.gif" ConfirmDialogType= "RadWindow" ConfirmText="Are you sure you want to delete this ?"
ItemStyle-Width="20px" HeaderStyle-Width="20px">
<ItemStyle HorizontalAlign="Center"/>
</telerik:GridButtonColumn>
This confirm window is popup but when I click OK or Cancel no response..It's only happening on my production machine, Windows server 2003 sp2 and browser is IE7. The same configuration is on test machine. its working with out any issues. scripting is enabled on browser.
Any idea..it's very urgent ..
Thanks!
i have something like this
If
RadScriptManager1.IsInAsyncPostBack Then
Dim clicked_item As String = "Product"
RadMenu1.FindItemByText(clicked_item).HighlightPath()
Else
Dim clicked_item As String = "Product"
RadMenu1.FindItemByText(clicked_item).HighlightPath()
end if
it will work fine if it is in the else statment but wont work when its in the if. Does this have to do with asyncpostback ? i think it is. so how do i solve this problem. thanks.