Protected
Sub
myRadGrid_ItemDataBound(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.Web.UI.GridItemEventArgs)
Handles
myRadGrid.ItemDataBound
If
((
TypeOf
(e.Item)
Is
GridEditFormItem)
And
(e.Item.IsInEditMode))
Then
'*** this will never be reached.
End
If
End
Sub
Private
Sub
RadGrid1_PreRender(
ByVal
sender
As
Object
,
ByVal
e
As
System.EventArgs)
Handles
RadGrid1.PreRender
For
rowindex = RadGrid1.Items.Count - 1
To
0
Step
-1
Dim
row
As
GridDataItem = RadGrid1.Items(rowindex)
If
row.Cells(9).Text =
"T"
Then
'Hides the Edit command for the row with Category = T
row.Cells(6).Controls(0).Visible =
False
End
If
Next
End
Sub
<
ClientSettings
>
<
ClientEvents
OnRowDblClick
=
"RowDblClick"
/>
</
ClientSettings
>
<
telerik:RadCodeBlock
ID
=
"RadCodeBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function RowDblClick(sender, eventArgs) {
sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
}
</
script
>
</
telerik:RadCodeBlock
>
Hi All,
I have a bug that is a bit strange and hard to reproduce. I think (not sure as I did not get the JS warnings) I was able to reproduce it on your demo site, here:
http://demos.telerik.com/aspnet-ajax/dock/examples/dynamicdocks/defaultcs.aspx
The steps to reproduce are:
- Dynamically created docks (with autopostback and Save/Load State).
- Click the header like crazy (about 10+ times)
- First I get a 'undefined' is null or not an object Line: 5869
- If I then try to move the dock, I get:
==========================================
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; WOW64; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Thu, 26 Mar 2009 04:36:58 UTC
Message: 'undefined' is null or not an object
Line: 5869
Char: 1
Code: 0
URI: http://localhost/RiskShield/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_sm_HiddenField&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a1247b7d8-6b6c-419f-a45f-8ff264c90734%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2009.1.311.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3af48f6488-574a-46fe-9b15-624f013d8c03%3a16e4e7cd%3af7645509%3a24ee1bba%3ae330518b%3a1e771326%3a8e6f0d33%3aed16cbdc%3a854aa0a7%3a874f8ea2%3a5a6d9d23
Message: Sys.WebForms.PageRequestManagerServerErrorException: Invalid JSON primitive: {"Top":0,"Left":0,"DockZoneID":"ctl00_c_rdzDash","Collapsed":false,"Pinned":false,"Resizable":false,"Closed":false,"Width":"305px","Height":"331px","ExpandedHeight":0,"Index":1}.
Line: 6
Char: 62099
Code: 0
URI: http://localhost/RiskShield/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_sm_HiddenField&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a1247b7d8-6b6c-419f-a45f-8ff264c90734%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2009.1.311.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3af48f6488-574a-46fe-9b15-624f013d8c03%3a16e4e7cd%3af7645509%3a24ee1bba%3ae330518b%3a1e771326%3a8e6f0d33%3aed16cbdc%3a854aa0a7%3a874f8ea2%3a5a6d9d23
Any help would be greatly appreciated.
Thanks
Guido Tapia
<
telerik:RadUpload
ID
=
"RadUpload1"
runat
=
"server"
AllowedFileExtensions
=
".jpeg,.gif,.png,.jpg"
ControlObjectsVisibility
=
"None"
OverwriteExistingFiles
=
"True"
AllowedMimeTypes
=
"image/png,image/jpeg,image/gif"
>
</
telerik:RadUpload
>
For Each f As UploadedFile In RadUpload1.UploadedFiles
strNewMasterFilename = Server.MapPath("~/blogs/" & strActiveBlogName & "/" & strActiveBlogName & "_masterimage") & f.GetExtension
f.SaveAs(strNewMasterFilename, True)Next
<
connectionStrings
>
<
add
name
=
"ActiveSkillConnectionString"
connectionString
=
"Data Source=NETDEV\SqlExpress;Initial Catalog=ActiveSkill;Integrated Security=True;User Id=ActiveSkillUser;Password=a0biozasu1"
providerName
=
"System.Data.SqlClient"
/>
</
connectionStrings
>
<
system.web
>
<
roleManager
enabled
=
"true"
>
<
providers
>
<
add
connectionStringName
=
"ActiveSkillConnectionString"
applicationName
=
"/ActiveSkill"
name
=
"RoleProvider"
type
=
"System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
/>
</
providers
>
</
roleManager
>
<
membership
>
<
providers
>
<
clear
/>
<
add
name
=
"AspNetSqlMembershipProvider"
type
=
"System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName
=
"ActiveSkillConnectionString"
enablePasswordRetrieval
=
"false"
enablePasswordReset
=
"true"
requiresQuestionAndAnswer
=
"false"
requiresUniqueEmail
=
"false"
passwordFormat
=
"Hashed"
maxInvalidPasswordAttempts
=
"3"
minRequiredPasswordLength
=
"7"
minRequiredNonalphanumericCharacters
=
"1"
passwordAttemptWindow
=
"10"
passwordStrengthRegularExpression
=
""
applicationName
=
"/ActiveSkill"
/>
</
providers
>
</
membership
>
etc etc...
<
add
name
=
"LocalSqlServer"
connectionString
=
"data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
providerName
=
"System.Data.SqlClient"
/>
<
div
style
=
"width: 80%"
>
<
telerik:RadAjaxPanel
runat
=
"server"
ID
=
"RadAjaxPanel1"
>
<
div
style="float: left; height: 100%; width: 55px; background: #E3EFFF; text-align: center;
border-right: 1px solid #6593CF;">
<
img
src
=
"images/tasks.gif"
alt
=
""
/></
div
>
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
AllowPaging
=
"True"
AllowSorting
=
"True"
GridLines
=
"None"
Width
=
"585px"
>
<
MasterTableView
AllowMultiColumnSorting
=
"true"
/>
<
SortingSettings
SortedBackColor
=
"Azure"
EnableSkinSortStyles
=
"false"
/>
<
HeaderStyle
Width
=
"100px"
/>
</
telerik:RadGrid
>
</
telerik:RadAjaxPanel
>
</
div
>
protected
void
PRate_Load(
object
sender, EventArgs e)
{
LoadData();
}
protected
void
LoadData()
{
var Person = TypeCreator.TypeGenerator(
new
[]{
new
{ID=1, PackageName=
"1 Week"
, Duration=
"1 Week"
, Rate=29, Price=100},
new
{ID=2, PackageName=
"1 Month(s)"
, Duration=
"1 Week"
, Rate=29, Price=100},
new
{ID=3, PackageName=
"3 Month(s)"
, Duration=
"1 Week"
, Rate=29, Price=100},
new
{ID=4, PackageName=
"6 Month(s)"
, Duration=
"1 Week"
, Rate=29, Price=100},
new
{ID=5, PackageName=
"9 Month(s)"
, Duration=
"1 Week"
, Rate=29, Price=100},
new
{ID=6, PackageName=
"12 Month(s)"
, Duration=
"1 Week"
, Rate=29, Price=100}
});
//none of the method is working,
var dt =
new
System.Data.DataTable();
dt.Columns.Add(
new
System.Data.DataColumn(
"ID"
,
typeof
(System.Int16)));
dt.Columns.Add(
new
System.Data.DataColumn(
"PackageName"
,
typeof
(System.String)));
dt.Columns.Add(
new
System.Data.DataColumn(
"Duration"
,
typeof
(System.String)));
System.Data.DataRow dr;
for
(
int
i = 0; i < 100; i++)
{
dr = dt.NewRow();
dr[0] = i;
dr[1] =
"Package"
+ i;
dr[2] = i * 10;
dt.Rows.Add(dr);
}
RadGrid1.DataSource = dt;
RadGrid1.DataBind();
}
static
class
TypeCreator
{
public
static
List<T> TypeGenerator<T>(
this
T[] t)
{
return
new
List<T>(t);
}
}