This is a migrated thread and some comments may be shown as answers.

RadDatePicker in aRadGrid

3 Answers 65 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John Giblin
Top achievements
Rank 1
John Giblin asked on 03 Dec 2008, 08:07 PM
I have a RadDatePicker instead the FormTemplate of a RadGrid.  For some reason the calendar pop-up is not working when you click on the calendar.  Any ideas?

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 04 Dec 2008, 06:57 AM
Hi John,

Does this happen if the DatePicker is outside the grid?. This is working from my end.
If you are trying to show the popup on clicking the date input  you need to do the following

function ToggleFirstPopup()
        {
            $find("<%= Raddatepicker1.ClientID %>").showPopup();
        }

 <telerik:RadDatePicker ID="RadDatePicker1" Style="vertical-align: middle;" MinDate="2006-2-1"
            SelectedDate="2006-04-01" runat="server" Skin="Hay">
            <DateInput onclick="ToggleFirstPopup()">
...............................
           
Could you post your aspx  for a better understanding of your scenario.

Thanks,
Princy


0
John Giblin
Top achievements
Rank 1
answered on 09 Dec 2008, 04:56 PM
I have tried that.  I think I have to do something else since I get the below message and it is within the datagrid

Object reference not set to an instance of an object.


Line 21:                 function ToggleOpened()
Line 22:                 {
Line 23: $find("<%= rdpDateOpened.ClientID %>").showPopup();Line 24:                 }
Line 25:                 function ToggleClosed()


Code
<telerik:RadGrid ID="RadGrid1" Skin="Default" EnableAjax="True" runat="server" CssClass="RadGrid" GridLines="None" AllowPaging="True"

 

 

PageSize="20" AllowSorting="True" Width="99%" AutoGenerateColumns="False" ShowStatusBar="True"

 

 

OnItemDeleted="RadGrid1_ItemDeleted" DataKeyNames="Content_Id" AllowFilteringByColumn="True"

 

 

OnItemInserted="RadGrid1_ItemInserted" OnItemUpdated="RadGrid1_ItemUpdated" OnItemCommand="RadGrid1_ItemCommand" OnPreRender="RadGrid1_PreRender" OnItemCreated="RadGrid1_ItemCreated" OnNeedDataSource="RadGrid1_NeedDataSource" OnItemDataBound="RadGrid1_ItemDataBound">

 

 

 

<PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>

 

 

 

 

 

<MasterTableView CommandItemDisplay="TopAndBottom" GridLines="None" DataKeyNames="Content_ID" AllowFilteringByColumn="True">

 

<

RowIndicatorColumn Visible="False">

 

<

HeaderStyle Width="20px"></HeaderStyle>

 

</

RowIndicatorColumn>

 

<

ExpandCollapseColumn Visible="False" Resizable="False">

 

<

HeaderStyle Width="20px"></HeaderStyle>

 

</

ExpandCollapseColumn>

 

<

Columns>

 

<

Telerik:GridEditCommandColumn></Telerik:GridEditCommandColumn>

 

<

Telerik:GridBoundColumn DataFormatString="{0:MM/dd/yy}" DataField="Created" HeaderText="Created" UniqueName="Date">

 

<

HeaderStyle ForeColor="Silver" Width="20px"></HeaderStyle>

 

<

ItemStyle ForeColor="Gray"></ItemStyle>

 

</

Telerik:GridBoundColumn>

 

<

Telerik:GridBoundColumn DataField="Status" HeaderText="Status" UniqueName="Status">

 

<

HeaderStyle Width="60px"></HeaderStyle>

 

</

Telerik:GridBoundColumn>

 

<

Telerik:GridBoundColumn DataFormatString="{0:MM/dd/yy}" DataField="DateOpen" HeaderText="Date Opened" UniqueName="DateOpen"></Telerik:GridBoundColumn>

 

<

Telerik:GridBoundColumn DataFormatString="{0:MM/dd/yy}" DataField="DateClosed" HeaderText="Date Closed" UniqueName="DateClosed"></Telerik:GridBoundColumn>

 

<

Telerik:GridBoundColumn DataField="ReferredBy" HeaderText="Referred By" UniqueName="ReferredBy"></Telerik:GridBoundColumn>

 

<

Telerik:GridBoundColumn DataField="Username" HeaderText="User" UniqueName="User"></Telerik:GridBoundColumn>

 

<

Telerik:GridBoundColumn DataField="Content_Id" HeaderText="Content_Id" Visible=false UniqueName="Content_Id"></Telerik:GridBoundColumn>

 

<

Telerik:GridBoundColumn DataField="ApplicationName" HeaderText="Application Name" UniqueName="ApplicationName"></Telerik:GridBoundColumn>

 

<

Telerik:GridBoundColumn DataField="Application" Visible=false HeaderText="Application" UniqueName="Application"></Telerik:GridBoundColumn>

 

<

Telerik:GridBoundColumn DataField="Problem" HeaderText="Problem" UniqueName="Problem"></Telerik:GridBoundColumn>

 

<

Telerik:GridBoundColumn DataField="Resolution" HeaderText="Resolution" UniqueName="Resolution"></Telerik:GridBoundColumn>

 

<

Telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="column"></Telerik:GridButtonColumn>

 

</

Columns>

 

<

EditFormSettings EditFormType="Template">

 

<

EditColumn UniqueName="EditCommandColumn1"></EditColumn>

 

<

FormTemplate>

 

 

<table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none"style="border-collapse: collapse;background:white;">

 

 

 <tr class="EditFormHeader">

 

 

 <td colspan="2" style="font-size: small"><b>User Calls</b></td>

 

 

 </tr>

 

 

 <tr>

 

 

 <td colspan="2"><b>General Info:</b></td>

 

 

 </tr>

 

 

 <tr>

 

 

 <td>

 

 

 <table id="Table3" cellspacing="1" cellpadding="1" width="250" border="0" class="module">

 

 

 <tr>

 

 

 <td>Status:</td>

 

 

 <td><asp:DropDownList ID="ddStatus" runat="server" SelectedValue='<%# Bind("Status") %>'

 

 

 AppendDataBoundItems="True">

 

 

 <asp:ListItem Text="" Value=""></asp:ListItem>

 

 

 <asp:ListItem Text="Open" Value="Open"></asp:ListItem>

 

 

 

 

 

<asp:ListItem Text="Close" Value="Close"></asp:ListItem>

 

 

 

 

 

<asp:ListItem Text="H" Value="H"></asp:ListItem>

 

 

 

 

 

</asp:DropDownList>

 

 

 

 

 

</td>

 

 

 

 

 

</tr>

 

 

 

 

 

<tr>

 

 

 

 

 

<td>Date Opened:</td>

 

 

 

 

 

<td><telerik:RadDatePicker ID="rdpDateOpened" runat="server" ><DateInput onclick="ToggleOpened()"/></telerik:RadDatePicker></td>

 

 

 

 

 

</tr>

 

 

<tr>

 

 

 

 

 

<td>Date Closed:</td>

 

 

 

 

 

<td><telerik:RadDatePicker ID="rpdDateClosed" runat="server" ><DateInput onclick="Toggleclosed()"/></telerik:RadDatePicker></td>

 

 

 

 

 

</tr>

 

 

<tr>

 

 

 

 

 

<td>Ticket Number:</td>

 

 

 

 

 

<td><asp:TextBox ID="TicketNumber" runat="server" Text='<%# Bind( "TicketNumber") %>' TabIndex="1"></asp:TextBox></td>

 

 

 

 

 

</tr>

 

 

 

 

 

<tr valign=top>

 

 

 

 

 

<td>Application:</td>

 

 

 

 

 

<td valign=top>

 

 

 

 

 

<div Style="BORDER-RIGHT: gray thin solid; BORDER-TOP: gray thin solid; BORDER-LEFT: gray thin solid; BORDER-BOTTOM: gray thin solid">

 

 

 

 

 

<radT:RadTreeView

 

 

DataSource="<%#GetApplications() %>"

 

 

 

 

 

DataFieldID="Id"

 

 

 

 

 

DataValueField = "Id"

 

 

 

 

 

DataFieldParentID = "ParentId"

 

 

 

 

 

DataTextField = "Name"

 

 

 

 

 

Id="ApplicationType2"

 

 

ImagesBaseDir="~/TreeView/Img/Outlook/"

 

 

MultipleSelect="False"

 

 

Runat="server"

 

 

 

 

 

Width="250px"

 

 

Height="300px"

 

 

LoadingMessagePosition="BeforeNodeText" >

 

 

 

 

 

</radT:radtreeview>

 

 

 

 

 

</div>

 

 

 

 

 

 

</tr>

 

 

 

 

 

</table>

 

 

 

 

 

</td>

 

 

 

 

 

<td valign=top>

 

 

 

 

 

<table id="Table1" cellspacing="1" cellpadding="1" width="250" border="0" class="module">

 

 

 

 

 

<tr>

 

 

 

 

 

<td>Referred By:</td>

 

 

 

 

 

<td><asp:TextBox ID="txtReferredBy" runat="server" Text='<%# Bind( "ReferredBy") %>' TabIndex="1"></asp:TextBox></td>

 

 

 

 

 

</tr>

 

 

 

 

 

<tr>

 

 

 

 

 

<td>User:</td>

 

 

 

 

 

<td><asp:TextBox ID="txtUser" runat="server" Text='<%# Bind( "Username") %>' TabIndex="2"></asp:TextBox></td>

 

 

 

 

 

</tr>

 

 

 

 

 

<tr>

 

 

 

 

 

<td colspan=2>Problem:</td>

 

 

 

 

 

</tr>

 

 

 

 

 

<tr>

 

 

 

 

 

<td colspan=2><asp:TextBox ID="txtProblem" Text='<%# Bind( "Problem") %>' runat="server" TextMode="MultiLine" Rows="5" Columns="40" TabIndex="5"></asp:TextBox></td>

 

 

 

 

 

</tr>

 

 

 

 

 

<tr>

 

 

 

 

 

<td colspan=2>Resolution:</td>

 

 

 

 

 

</tr>

 

 

 

 

 

<tr>

 

 

 

 

 

<td colspan=2><asp:TextBox ID="txtResultion" Text='<%# Bind( "Resolution") %>' runat="server" TextMode="MultiLine" Rows="2" Columns="40" TabIndex="6"></asp:TextBox></td>

 

 

 

 

 

</tr>

 

 

 

 

 

</table>

 

 

 

 

 

</td>

 

 

 

 

 

</tr>

 

 

 

 

 

<tr>

 

 

 

 

 

<td align="right" colspan="2">

 

 

 

 

 

<asp:Button ID="btnUpdate" Text='<%# (Container is Telerik.WebControls.GridEditFormInsertItem) ? "Insert" : "Update" %>' runat="server" CommandName='<%# (Container is Telerik.WebControls.GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>

 

 

 

 

 

</asp:Button>&nbsp;<asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button>

 

 

</td>

 

 

</tr>

 

 

</table>

 

</

FormTemplate>

 

</

EditFormSettings>

 

</

MasterTableView>

 

</

telerik:RadGrid>

 

0
Shinu
Top achievements
Rank 2
answered on 10 Dec 2008, 06:07 AM
Hi John,

Here is a code library submission which shows how to access server controls in a Grid template on the client side. Go through it and see if it helps to some extent.
Accessing server controls in a grid template on the client

Shinu
Tags
Grid
Asked by
John Giblin
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
John Giblin
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or