calendar inside datagrid

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Mar 2006
Posts: 84
Reputation: web_developer is an unknown quantity at this point 
Solved Threads: 1
web_developer web_developer is offline Offline
Junior Poster in Training

calendar inside datagrid

 
0
  #1
Nov 23rd, 2006
Hey all,

guys I hav to use calendar control in a data grid.. But the events for tha calendar(selection change n others ) are not getting fired...

i am using datagrid_itemcommand and i am searching for the command name but the calendar control doesnt have command name.

how i can catch the calender event and get the select date in a textbox beside the calendar.

sam
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 2
Reputation: smp is an unknown quantity at this point 
Solved Threads: 1
smp smp is offline Offline
Newbie Poster

Re: calendar inside datagrid

 
0
  #2
Dec 12th, 2006
hi
i'm also in need of a calendar control in a datagrid urgently
can u please tel me how do u includecalendar in datagrid
thanks in advance
i need it in C# asp.net




Originally Posted by web_developer View Post
Hey all,

guys I hav to use calendar control in a data grid.. But the events for tha calendar(selection change n others ) are not getting fired...

i am using datagrid_itemcommand and i am searching for the command name but the calendar control doesnt have command name.

how i can catch the calender event and get the select date in a textbox beside the calendar.

sam
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 84
Reputation: web_developer is an unknown quantity at this point 
Solved Threads: 1
web_developer web_developer is offline Offline
Junior Poster in Training

Re: calendar inside datagrid

 
0
  #3
Dec 14th, 2006
dude

i fixed this problem by including a calendar javascript.

u have to add item template in the datagrid then add the calender. if u click on the calender it will set the value in a textbox.

This war is faster and no need to include calendar control.

sam
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 1
Reputation: buitva is an unknown quantity at this point 
Solved Threads: 1
buitva buitva is offline Offline
Newbie Poster

Re: calendar inside datagrid

 
0
  #4
Dec 22nd, 2006
[quote=smp;288476]hi
i'm also in need of a calendar control in a datagrid urgently
can u please tel me how do u includecalendar in datagrid
thanks in advance
i need it in C# asp.net[/quote



I am also in need of this one. I can get the popup calendar and it did return the selected date in the Control text field "txtEffDate" in EditTemplate but when I try to retrieve using :
Dim EffDate As String = Convert.ToString(CType(e.Item.FindControl("txtEffDate"), TextBox).Text) in the Update proc , it did not give me the datevalue which I saw on the screen? Please someone help me with this , I already spent 2 days on this one already....

Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 2
Reputation: smp is an unknown quantity at this point 
Solved Threads: 1
smp smp is offline Offline
Newbie Poster

Re: calendar inside datagrid

 
0
  #5
Jan 8th, 2007
hi can u tel me how could u catch the selected date from te calendar into the textbox inside grid

Originally Posted by web_developer View Post
dude

i fixed this problem by including a calendar javascript.

u have to add item template in the datagrid then add the calender. if u click on the calender it will set the value in a textbox.

This war is faster and no need to include calendar control.

sam
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 8
Reputation: Hsus is an unknown quantity at this point 
Solved Threads: 1
Hsus Hsus is offline Offline
Newbie Poster

Re: calendar inside datagrid

 
0
  #6
Mar 17th, 2009
Hi i am also having the same problem .
Can u tell me how to retrieve the selected date from a calendar inside a datagrid.?
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 68
Reputation: srikanthkadem is an unknown quantity at this point 
Solved Threads: 11
srikanthkadem srikanthkadem is offline Offline
Junior Poster in Training

Re: calendar inside datagrid

 
0
  #7
Mar 17th, 2009
just use any javascript calender control rather than .net control .and usage details willl based on control u r gng to use.so read the manual before using js calender .
got solution ?, please mark the thread as Solved. Thanks & Regards,
srikanth kadem
srikanthkadem@rediffmail.com
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 8
Reputation: Hsus is an unknown quantity at this point 
Solved Threads: 1
Hsus Hsus is offline Offline
Newbie Poster

Re: calendar inside datagrid

 
0
  #8
Mar 18th, 2009
Hi i have added a text box and a hyperlink in my template column. When i click on the hyperlink I want the calendar control to be dispalyed in a pop up window and i should be able to get the selected date. Can u tell me how to do this and the java script??
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 370
Reputation: greeny_1984 is an unknown quantity at this point 
Solved Threads: 29
greeny_1984's Avatar
greeny_1984 greeny_1984 is offline Offline
Posting Whiz

Re: calendar inside datagrid

 
0
  #9
Mar 18th, 2009
hi,

you can try like this
  1. <asp:GridView ID="gdview" runat="server" ShowFooter="true" AutoGenerateColumns="False" DataKeyNames="CategoryID" >
  2. <Columns>
  3. <asp:BoundField HeaderText="Category Name" DataField="CategoryName" SortExpression="CategoryName" >
  4. <ItemStyle Height="20px" Width="150px" />
  5. </asp:BoundField>
  6. <asp:TemplateField>
  7. <ItemTemplate>
  8. <asp:Calendar ID="id1" runat="server" OnSelectionChanged="id1_SelectionChanged"></asp:Calendar>
  9.  
  10. </ItemTemplate>
  11.  
  12. </asp:TemplateField>
  13.  
  14. </Columns>
  15.  
  16.  
  17. </asp:GridView>
  18.  
  19. in code behind:
  20.  
  21. protected void Page_Load(object sender, EventArgs e)
  22. {
  23.  
  24. if (!Page.IsPostBack)
  25. {
  26. bindgrid();
  27.  
  28.  
  29. }
  30.  
  31. }
  32.  
  33. public void bindgrid()
  34. {
  35. SqlConnection conn = new SqlConnection("Data Source='localhost';Initial Catalog='Northwind';Integrated Security=SSPI;Persist Security Info=False ");
  36. SqlCommand cmd = new SqlCommand("select CategoryName,CategoryID from Categories ", conn);
  37.  
  38. SqlDataAdapter da = new SqlDataAdapter("", conn);
  39. da.SelectCommand = new SqlCommand("select CategoryName,CategoryID from Categories", conn);
  40. DataSet ds = new DataSet();
  41. da.Fill(ds, "data");
  42. gdview.DataSource = ds.Tables[0].DefaultView;
  43. gdview.DataBind();
  44.  
  45.  
  46. }
  47. protected void id1_SelectionChanged(object sender, EventArgs e)
  48. {
  49. Calendar cal = new Calendar();
  50. GridViewRow dgrow = (GridViewRow)cal.NamingContainer;
  51.  
  52. }
If u r query is achieved,mark the thread as solved

Live and Let Live
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 3
Reputation: Ramtamil is an unknown quantity at this point 
Solved Threads: 1
Ramtamil Ramtamil is offline Offline
Newbie Poster

Re: calendar inside datagrid

 
0
  #10
Mar 20th, 2009
You can use _Rowdatbound event you will be get the answer

EX:

Protected Sub GridView_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView.RowDataBound
---------------
---------------------

End sub
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC