Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Dnn Calendar in templateItem of Gridview (edit mode)Dnn Calendar in templateItem of Gridview (edit mode)
Previous
 
Next
New Post
3/20/2008 2:25 PM
 

Hello,

I'm trying to integrate the Dnn calendar in my gridview (in edit mode).

I have a date field in my database, when I want to edit a row, I need to have a textbox with a link 'calendar' next to it. When clicking on the link, it shows the calendar in popup, and after chossing a date, it appears it the textbox... My problem is that I CAN'T acces the textbox control of this specific row to change the calendar link.

this is the navigateUrl of the link:
MyLink.NavigateUrl = CType(DotNetNuke.Common.Utilities.Calendar.InvokePopupCal(MyTextBox), String)

I tried in a form view, and everything is perfect...

-----------------------------------
DateStart:
<asp:textbox id="tb_dateStart"  columns="20" Text='<%# Bind("DateStart") %>' runat="server" MaxLength="20"></asp:textbox>&nbsp;
<asp:hyperlink id="cal_dateStart" runat="server"  text="calendar"></asp:hyperlink>
<asp:comparevalidator id="valMembershipExpires2" runat="server" display="Dynamic"
               controltovalidate="tb_dateStart" ErrorMessage="Invalid date" type="Date" operator="DataTypeCheck">
</asp:comparevalidator>

AND IN MY VB CODE

Protected Sub FormView1_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles FormView1.DataBound

            DirectCast(FormView1.FindControl("cal_dateStart"), HyperLink).NavigateUrl = CType(DotNetNuke.Common.Utilities.Calendar.InvokePopupCal(DirectCast(FormView1.FindControl("tb_dateStart"), TextBox)), String)

End Sub
------------------------------------

My probleme is that FindControl("tb_dateStart")  does't work in the GridView....
I need to find the right ROW but I didn't find the correct code, or maybe it's not called in the right event...

-----------------------------

my Gridview code:

 <EditItemTemplate>
           <asp:textbox id="tb_dateStart1" tabIndex="23" columns="20" Text='<%# Bind("DateStart") %>' runat="server" MaxLength="20"></asp:textbox>&nbsp;
            <asp:hyperlink id="cal_dateStart1" tabIndex="-1" runat="server"  text="calendar" ondatabinding="cal_dateStart1_DataBinding"></asp:hyperlink>
            <asp:comparevalidator id="valMembershipExpires1" runat="server" display="Dynamic"
                       controltovalidate="tb_dateStart1" ErrorMessage="Invalid date" type="Date" operator="DataTypeCheck">
            </asp:comparevalidator>
</EditItemTemplate>

--------------------------------
I need to change the NavigateURL of my calendar link, but I need to put the textbox control in that link, but I don't find that textbox...

Any solution?

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Dnn Calendar in templateItem of Gridview (edit mode)Dnn Calendar in templateItem of Gridview (edit mode)


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out