<
script type="text/javascript">
function DateValid()
{
alert(
"End Date cannot be lesser than the Start Date");
}
and in ascx.cs, I have the below lines to call the js function.
if (obDoSchedule.DtStartDate >= obDoSchedule.DtEndDate)
{
ctlButtonBar.Attributes.Add(
"onClick", "return DateValid();");
}
Is this correct? I'm not getting the javascript alert msg even if DtStartDate >=DtEndDate.Pls help!!
| <GRID id=g1 Datasource = DS1> |
| <VIEW> |
| <EDIT> |
| <LISTBOX Datasource=DS2></LISTBOX> |
| </EDIT> |
| </GRID> |
| <DS1> |
| ... |
| </DS1> |
| <DS2> |
| <selectparameters> |
| <asp:ControlParameter ControlID="g1" DefaultValue="0" Name="id" PropertyName="SelectedValue" Type="Int32" /> |
| </selectparameters> |
| </ds2> |
<
script type="text/javascript">
function RowDoubleClick(index)
{
__doPostBack(
"<%= this.UniqueID %>", "RowDblClicked:" + this.Rows[index].ItemIndex);
}
</script>
in client events I do,
<ClientEvents OnRowDblClick="RowDoubleClick"></ClientEvents>
and in ascx.cs file, I do this,
public partial class CPackageMainUserControl : BaseUserControl, IPostBackEventHandler
{
void IPostBackEventHandler.RaisePostBackEvent(string eventArgument)
{
string[] postBackEventArgumentData = eventArgument.Split(':');
switch (postBackEventArgumentData[0])
{
case "RowDblClicked":
m_ctlPackageGroupMultiView.SetActiveView(m_ctlPackageSetUpView);
m_ctlPackageSetupUserCtrl.LoadNonDocPredefinedReports();
break;
}
}
}
(because in my cause when i dbl click on a row in a radgrid , I need to setactiveview to openup another view).
But when i do all this and try to run , I get a javascript message :
Microsoft JScript runtime error: 'this.Rows' is null or not an object.
Pls help me and correct my code and let me know what to do .
Thanks,
ZR
| <telerik:RadTreeView id="AllControlsTree" Runat="server" Width="99%" OnContextMenuItemClick="Tree_ContextMenuItemClick" | |
| OnClientContextMenuItemClicking="BeforeClientContextHandler" Height="60%"></telerik:RadTreeView> | |
| <TABLE cellSpacing="2" cellPadding="0" width="260"> | |
| <TR> | |
| <TD onclick="AddControlsPostBack(<%= AllControlsTree.ClientID %>);" >Cell xxx | |
| Add Controls To Version | |
| </TD> | |
| </TR> | |
| </TABLE> | |
| <telerik:RadTreeView id="AllControlsTree" Runat="server" Width="99%" OnContextMenuItemClick="Tree_ContextMenuItemClick" | |
| OnClientContextMenuItemClicking="BeforeClientContextHandler" Height="60%"></telerik:RadTreeView> | |
| <TABLE cellSpacing="2" cellPadding="0" width="260"> | |
| <TR> | |
| <TD onclick="AddControlsPostBack($find('<%= AllControlsTree.ClientID %>')" >Cell xxx | |
| Add Controls To Version | |
| </TD> | |
| </TR> | |
| </TABLE> | |
