顯示具有 Calendar 標籤的文章。 顯示所有文章
顯示具有 Calendar 標籤的文章。 顯示所有文章

2014年7月13日 星期日

[RESOLVED] Asp.net clickable chart control


Hi all...


I am new to asp.net . I created a chart control with data binding and it has one series. Now I need the chart to be clickable which navigates to another pages by clicking each area. I found this solution,


                         Chart3.Series["Series1"].Url="EffJaEla.aspx";


But, here all the areas(If it is a column chart, all the columns are navigating to "EffJaEla.aspx" only) are navigatin to one page. I need to navigate to different pages by clicking columns. If the chart is with 4 columns, I need to navigate to 4 pages by
clicking 4 columns. Please help me...



Hi ThiTha,


Microsofts  chart control definitely does support click-through. Check below article out at 4guysfromrolla.


http://www.4guysfromrolla.com/articles/102809-1.aspx


And for more articles please have a look at the threads below


http://archive.msdn.microsoft.com/mschart/Release/ProjectReleases.aspx?ReleaseId=4418


http://forums.asp.net/t/1551832.aspx/1


http://forums.asp.net/t/1802726.aspx/1


http://www.advsofteng.com/doc/cdnetdoc/simpleclickable.htm


Hope this helps.


Thanks,


Jatin



here is the similar thread post,


http://forums.asp.net/t/1551832.aspx/1



Hi jats...


Actually I went through these links....but I couldn't find an answere...


Here is my design...


 

         BackColor="64, 64, 0" Palette="Chocolate" onload="Chart2_Load">

            

                

                  LegendText="EFFICIENCY" Palette="BrightPastel">

                 

                


            


            

            

            


            

                

                


            


        




    ConnectionString="<%$ ConnectionStrings:KPIConnectionString1 %>"

    SelectCommand="SELECT [Efficiency], [Fty] FROM [Efficiency_Summery] WHERE ([TransactionDate] = @TransactionDate) ORDER BY [Fty]">

   

    

   


  



There I bind data to the chart.....


then the chart is developped....


Assume I am in a column chart...


I have 4 columns in my chart... I need to click all these columns and navigate to 4 different pages with 4 columns...


Chart3.Series["Series1"].Url="EffJaEla.aspx";


This code navigates to one page by all 4 columns and it does not allow to use 4 urls...


I need to use 4 urls for 4 columns...


Hope you underestood this....


Please help me....



Thanks a lot...




Hi Ijas...


Actually I went through these links....but I couldn't find an answere...


Here is my design...


 

         BackColor="64, 64, 0" Palette="Chocolate" onload="Chart2_Load">

            

                

                  LegendText="EFFICIENCY" Palette="BrightPastel">

                 

                


            


            

            

            


            

                

                


            


        




    ConnectionString="<%$ ConnectionStrings:KPIConnectionString1 %>"

    SelectCommand="SELECT [Efficiency], [Fty] FROM [Efficiency_Summery] WHERE ([TransactionDate] = @TransactionDate) ORDER BY [Fty]">

   

    

   


  



There I bind data to the chart.....


then the chart is developped....


Assume I am in a column chart...


I have 4 columns in my chart... I need to click all these columns and navigate to 4 different pages with 4 columns...


Chart3.Series["Series1"].Url="EffJaEla.aspx";


This code navigates to one page by all 4 columns and it does not allow to use 4 urls...


I need to use 4 urls for 4 columns...


Hope you underestood this....


Please help me....



Thanks a lot...



Hi,


Do you refer the link
http://www.4guysfromrolla.com/articles/102809-1.aspx
? You can set the points url property in the chart control's databound event like this


Protected Sub chtCategoriesProductCount_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles chtCategoriesProductCount.DataBound
For Each point As DataPoint In chtCategoriesProductCount.Series("Categories").Points
Dim categoryId As Integer = point.YValues(1)
point.Url = String.Format("~/Demos/DrillDown/ProductsInCategory.aspx?CategoryID={0}", categoryId.ToString())
...
Next
End Sub

And refer the radchart control:


http://www.telerik.com/community/forums/aspnet-ajax/chart/create-chart-click-event.aspx


Hope it can help you


[RESOLVED] Allow user to SELECT TIME


Within my DetailsView I have added a DATE selection that allows the user to select a specific date using a Calendar feature… this was achieved using the below code


 <%@ Register TagPrefix="asp" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit"%>


 



   



             


             




What I need now is to allow the user to select a TIME feature of 15 minutes. So the user can select 15, 30, 45, etc… what is the best way I can do this?



Look what I found. http://tarruda.github.io/bootstrap-datetimepicker/ Its awesome. Cool



if you are comfortable with ajax-tool-kit then follow this ,


http://www.ajaxcontroltoolkit.com/NumericUpDown/NumericUpDown.aspx its cool Smile


[RESOLVED] Asp.net clickable chart control


Hi all...


I am new to asp.net . I created a chart control with data binding and it has one series. Now I need the chart to be clickable which navigates to another pages by clicking each area. I found this solution,


                         Chart3.Series["Series1"].Url="EffJaEla.aspx";


But, here all the areas(If it is a column chart, all the columns are navigating to "EffJaEla.aspx" only) are navigatin to one page. I need to navigate to different pages by clicking columns. If the chart is with 4 columns, I need to navigate to 4 pages by
clicking 4 columns. Please help me...



Hi ThiTha,


Microsofts  chart control definitely does support click-through. Check below article out at 4guysfromrolla.


http://www.4guysfromrolla.com/articles/102809-1.aspx


And for more articles please have a look at the threads below


http://archive.msdn.microsoft.com/mschart/Release/ProjectReleases.aspx?ReleaseId=4418


http://forums.asp.net/t/1551832.aspx/1


http://forums.asp.net/t/1802726.aspx/1


http://www.advsofteng.com/doc/cdnetdoc/simpleclickable.htm


Hope this helps.


Thanks,


Jatin



here is the similar thread post,


http://forums.asp.net/t/1551832.aspx/1



Hi jats...


Actually I went through these links....but I couldn't find an answere...


Here is my design...


 

         BackColor="64, 64, 0" Palette="Chocolate" onload="Chart2_Load">

            

                

                  LegendText="EFFICIENCY" Palette="BrightPastel">

                 

                


            


            

            

            


            

                

                


            


        




    ConnectionString="<%$ ConnectionStrings:KPIConnectionString1 %>"

    SelectCommand="SELECT [Efficiency], [Fty] FROM [Efficiency_Summery] WHERE ([TransactionDate] = @TransactionDate) ORDER BY [Fty]">

   

    

   


  



There I bind data to the chart.....


then the chart is developped....


Assume I am in a column chart...


I have 4 columns in my chart... I need to click all these columns and navigate to 4 different pages with 4 columns...


Chart3.Series["Series1"].Url="EffJaEla.aspx";


This code navigates to one page by all 4 columns and it does not allow to use 4 urls...


I need to use 4 urls for 4 columns...


Hope you underestood this....


Please help me....



Thanks a lot...




Hi Ijas...


Actually I went through these links....but I couldn't find an answere...


Here is my design...


 

         BackColor="64, 64, 0" Palette="Chocolate" onload="Chart2_Load">

            

                

                  LegendText="EFFICIENCY" Palette="BrightPastel">

                 

                


            


            

            

            


            

                

                


            


        




    ConnectionString="<%$ ConnectionStrings:KPIConnectionString1 %>"

    SelectCommand="SELECT [Efficiency], [Fty] FROM [Efficiency_Summery] WHERE ([TransactionDate] = @TransactionDate) ORDER BY [Fty]">

   

    

   


  



There I bind data to the chart.....


then the chart is developped....


Assume I am in a column chart...


I have 4 columns in my chart... I need to click all these columns and navigate to 4 different pages with 4 columns...


Chart3.Series["Series1"].Url="EffJaEla.aspx";


This code navigates to one page by all 4 columns and it does not allow to use 4 urls...


I need to use 4 urls for 4 columns...


Hope you underestood this....


Please help me....



Thanks a lot...



Hi,


Do you refer the link
http://www.4guysfromrolla.com/articles/102809-1.aspx
? You can set the points url property in the chart control's databound event like this


Protected Sub chtCategoriesProductCount_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles chtCategoriesProductCount.DataBound
For Each point As DataPoint In chtCategoriesProductCount.Series("Categories").Points
Dim categoryId As Integer = point.YValues(1)
point.Url = String.Format("~/Demos/DrillDown/ProductsInCategory.aspx?CategoryID={0}", categoryId.ToString())
...
Next
End Sub

And refer the radchart control:


http://www.telerik.com/community/forums/aspnet-ajax/chart/create-chart-click-event.aspx


Hope it can help you


[RESOLVED] Allow user to SELECT TIME


Within my DetailsView I have added a DATE selection that allows the user to select a specific date using a Calendar feature… this was achieved using the below code


 <%@ Register TagPrefix="asp" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit"%>


 



   



             


             




What I need now is to allow the user to select a TIME feature of 15 minutes. So the user can select 15, 30, 45, etc… what is the best way I can do this?



Look what I found. http://tarruda.github.io/bootstrap-datetimepicker/ Its awesome. Cool



if you are comfortable with ajax-tool-kit then follow this ,


http://www.ajaxcontroltoolkit.com/NumericUpDown/NumericUpDown.aspx its cool Smile


[RESOLVED] Filter gridview data for a given date range


Hi everyone I'm working on a project where my submission date is drawing near. I'm using vb.net language which in this case I'm working with for the very first time.


I appreciate anyone who could help me solve these errors I'm facing with regards to filtering data in the gridview.


Currently I have populated two drop down lists, two calendar controls and one search button to help filter the data in my gridview, however I'm not able to filter the gridview data based on the date selected from my two calendar controls


(*** to be more precise, I need to get all the records from my access database for a given date range which user selects from the calendars, for e.g. 20 May 2013 - 4 July 2013 but I'm only working with one date/time column in the access database)


I have searched everywhere for an example on how to go about doing this but could not find any working solution.


**I am using microsoft access database with a date/time column


Here is what I have done up :


Protected Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSearch.Click


'Date Search



If MultiView1.ActiveViewIndex = 0 Then


Dim FromDate As String

Dim ToDate As String




FromDate = Calendar1.SelectedDate

ToDate = Calendar2.SelectedDate




If FromDate <> "" And ToDate = " Then" Then


Session("Purchase Search String") = " And PurchaseDate between #" & FromDate & "# and #" & Date.Now.ToString("dd/MM/yyyy") & "#"


ElseIf FromDate = "" And ToDate = "" Then


Session("Purchase Search String") = ""


ElseIf FromDate <> "" And ToDate <> "" Then


Session("Purchase Search String") = " And PODate between #" & FromDate & "# and #" & ToDate & "#"


ElseIf FromDate = "" And ToDate <> "" Then


Session("Purchase Search String") = " And PODate between #" & Date.Now.ToString("dd/MM/yyyy") & "# and #" & ToDate & "#"


End If


End If



Any help from any kind soul would be deeply appreciated!


Thanks in advance.



Cherry




Hi,


I think you need to create a dynamic query based on your filter then bind that dataset with grid view.


This link might help you.


http://www.aspdotnet-suresh.com/2011/11/how-to-filter-gridview-records-with.html





in your search method, you are only setting some session variables and not re-binding the data from db. do you not need to query the database with the user filter date values?


thanks. 



Hi Jalpesh,


That was a good suggestion thankyou! :) I guessed I missed out the part to create a dynamic query to retrieve the data associated with the date range selected.


Now that I have done it, I encountered another error where my data is not filtered according to the date after I select an item from the drop down list. Any suggestions to go about doing it? (by the way I'm using multiviews for my calendar and drop down
list controls)


Thanks in advance!


Cherry



Hi Vinz,


I have came across that article before but unfortunately it was not compatible to what I'm working on currently but thankyou anyway! :) 


Now that I have done it, I encountered another error where my data is not filtered according to the date after I select an item from the drop down list. Any suggestions to go about doing it? (by the way I'm using multiviews for my calendar and drop down
list controls)


Thanks in advance!



Hi ijaz,


Yes I did miss out that part of querying the database haha. But it's working fine now thankyou!


However, I encountered another error where my data is not filtered according to the date after I select an item from the drop down list. Any suggestions to go about doing it? (by the way I'm using multiviews for my calendar and drop down list controls)


Thanks in advance!


[RESOLVED] Filter gridview data for a given date range


Hi everyone I'm working on a project where my submission date is drawing near. I'm using vb.net language which in this case I'm working with for the very first time.


I appreciate anyone who could help me solve these errors I'm facing with regards to filtering data in the gridview.


Currently I have populated two drop down lists, two calendar controls and one search button to help filter the data in my gridview, however I'm not able to filter the gridview data based on the date selected from my two calendar controls


(*** to be more precise, I need to get all the records from my access database for a given date range which user selects from the calendars, for e.g. 20 May 2013 - 4 July 2013 but I'm only working with one date/time column in the access database)


I have searched everywhere for an example on how to go about doing this but could not find any working solution.


**I am using microsoft access database with a date/time column


Here is what I have done up :


Protected Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSearch.Click


'Date Search



If MultiView1.ActiveViewIndex = 0 Then


Dim FromDate As String

Dim ToDate As String




FromDate = Calendar1.SelectedDate

ToDate = Calendar2.SelectedDate




If FromDate <> "" And ToDate = " Then" Then


Session("Purchase Search String") = " And PurchaseDate between #" & FromDate & "# and #" & Date.Now.ToString("dd/MM/yyyy") & "#"


ElseIf FromDate = "" And ToDate = "" Then


Session("Purchase Search String") = ""


ElseIf FromDate <> "" And ToDate <> "" Then


Session("Purchase Search String") = " And PODate between #" & FromDate & "# and #" & ToDate & "#"


ElseIf FromDate = "" And ToDate <> "" Then


Session("Purchase Search String") = " And PODate between #" & Date.Now.ToString("dd/MM/yyyy") & "# and #" & ToDate & "#"


End If


End If



Any help from any kind soul would be deeply appreciated!


Thanks in advance.



Cherry




Hi,


I think you need to create a dynamic query based on your filter then bind that dataset with grid view.


This link might help you.


http://www.aspdotnet-suresh.com/2011/11/how-to-filter-gridview-records-with.html





in your search method, you are only setting some session variables and not re-binding the data from db. do you not need to query the database with the user filter date values?


thanks. 



Hi Jalpesh,


That was a good suggestion thankyou! :) I guessed I missed out the part to create a dynamic query to retrieve the data associated with the date range selected.


Now that I have done it, I encountered another error where my data is not filtered according to the date after I select an item from the drop down list. Any suggestions to go about doing it? (by the way I'm using multiviews for my calendar and drop down
list controls)


Thanks in advance!


Cherry



Hi Vinz,


I have came across that article before but unfortunately it was not compatible to what I'm working on currently but thankyou anyway! :) 


Now that I have done it, I encountered another error where my data is not filtered according to the date after I select an item from the drop down list. Any suggestions to go about doing it? (by the way I'm using multiviews for my calendar and drop down
list controls)


Thanks in advance!



Hi ijaz,


Yes I did miss out that part of querying the database haha. But it's working fine now thankyou!


However, I encountered another error where my data is not filtered according to the date after I select an item from the drop down list. Any suggestions to go about doing it? (by the way I'm using multiviews for my calendar and drop down list controls)


Thanks in advance!


[RESOLVED] Filter gridview data for a given date range


Hi everyone I'm working on a project where my submission date is drawing near. I'm using vb.net language which in this case I'm working with for the very first time.


I appreciate anyone who could help me solve these errors I'm facing with regards to filtering data in the gridview.


Currently I have populated two drop down lists, two calendar controls and one search button to help filter the data in my gridview, however I'm not able to filter the gridview data based on the date selected from my two calendar controls


(*** to be more precise, I need to get all the records from my access database for a given date range which user selects from the calendars, for e.g. 20 May 2013 - 4 July 2013 but I'm only working with one date/time column in the access database)


I have searched everywhere for an example on how to go about doing this but could not find any working solution.


**I am using microsoft access database with a date/time column


Here is what I have done up :


Protected Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSearch.Click


'Date Search



If MultiView1.ActiveViewIndex = 0 Then


Dim FromDate As String

Dim ToDate As String




FromDate = Calendar1.SelectedDate

ToDate = Calendar2.SelectedDate




If FromDate <> "" And ToDate = " Then" Then


Session("Purchase Search String") = " And PurchaseDate between #" & FromDate & "# and #" & Date.Now.ToString("dd/MM/yyyy") & "#"


ElseIf FromDate = "" And ToDate = "" Then


Session("Purchase Search String") = ""


ElseIf FromDate <> "" And ToDate <> "" Then


Session("Purchase Search String") = " And PODate between #" & FromDate & "# and #" & ToDate & "#"


ElseIf FromDate = "" And ToDate <> "" Then


Session("Purchase Search String") = " And PODate between #" & Date.Now.ToString("dd/MM/yyyy") & "# and #" & ToDate & "#"


End If


End If



Any help from any kind soul would be deeply appreciated!


Thanks in advance.



Cherry




Hi,


I think you need to create a dynamic query based on your filter then bind that dataset with grid view.


This link might help you.


http://www.aspdotnet-suresh.com/2011/11/how-to-filter-gridview-records-with.html





in your search method, you are only setting some session variables and not re-binding the data from db. do you not need to query the database with the user filter date values?


thanks. 



Hi Jalpesh,


That was a good suggestion thankyou! :) I guessed I missed out the part to create a dynamic query to retrieve the data associated with the date range selected.


Now that I have done it, I encountered another error where my data is not filtered according to the date after I select an item from the drop down list. Any suggestions to go about doing it? (by the way I'm using multiviews for my calendar and drop down
list controls)


Thanks in advance!


Cherry



Hi Vinz,


I have came across that article before but unfortunately it was not compatible to what I'm working on currently but thankyou anyway! :) 


Now that I have done it, I encountered another error where my data is not filtered according to the date after I select an item from the drop down list. Any suggestions to go about doing it? (by the way I'm using multiviews for my calendar and drop down
list controls)


Thanks in advance!



Hi ijaz,


Yes I did miss out that part of querying the database haha. But it's working fine now thankyou!


However, I encountered another error where my data is not filtered according to the date after I select an item from the drop down list. Any suggestions to go about doing it? (by the way I'm using multiviews for my calendar and drop down list controls)


Thanks in advance!


[RESOLVED] Filter gridview data for a given date range


Hi everyone I'm working on a project where my submission date is drawing near. I'm using vb.net language which in this case I'm working with for the very first time.


I appreciate anyone who could help me solve these errors I'm facing with regards to filtering data in the gridview.


Currently I have populated two drop down lists, two calendar controls and one search button to help filter the data in my gridview, however I'm not able to filter the gridview data based on the date selected from my two calendar controls


(*** to be more precise, I need to get all the records from my access database for a given date range which user selects from the calendars, for e.g. 20 May 2013 - 4 July 2013 but I'm only working with one date/time column in the access database)


I have searched everywhere for an example on how to go about doing this but could not find any working solution.


**I am using microsoft access database with a date/time column


Here is what I have done up :


Protected Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSearch.Click


'Date Search



If MultiView1.ActiveViewIndex = 0 Then


Dim FromDate As String

Dim ToDate As String




FromDate = Calendar1.SelectedDate

ToDate = Calendar2.SelectedDate




If FromDate <> "" And ToDate = " Then" Then


Session("Purchase Search String") = " And PurchaseDate between #" & FromDate & "# and #" & Date.Now.ToString("dd/MM/yyyy") & "#"


ElseIf FromDate = "" And ToDate = "" Then


Session("Purchase Search String") = ""


ElseIf FromDate <> "" And ToDate <> "" Then


Session("Purchase Search String") = " And PODate between #" & FromDate & "# and #" & ToDate & "#"


ElseIf FromDate = "" And ToDate <> "" Then


Session("Purchase Search String") = " And PODate between #" & Date.Now.ToString("dd/MM/yyyy") & "# and #" & ToDate & "#"


End If


End If



Any help from any kind soul would be deeply appreciated!


Thanks in advance.



Cherry




Hi,


I think you need to create a dynamic query based on your filter then bind that dataset with grid view.


This link might help you.


http://www.aspdotnet-suresh.com/2011/11/how-to-filter-gridview-records-with.html





in your search method, you are only setting some session variables and not re-binding the data from db. do you not need to query the database with the user filter date values?


thanks. 



Hi Jalpesh,


That was a good suggestion thankyou! :) I guessed I missed out the part to create a dynamic query to retrieve the data associated with the date range selected.


Now that I have done it, I encountered another error where my data is not filtered according to the date after I select an item from the drop down list. Any suggestions to go about doing it? (by the way I'm using multiviews for my calendar and drop down
list controls)


Thanks in advance!


Cherry



Hi Vinz,


I have came across that article before but unfortunately it was not compatible to what I'm working on currently but thankyou anyway! :) 


Now that I have done it, I encountered another error where my data is not filtered according to the date after I select an item from the drop down list. Any suggestions to go about doing it? (by the way I'm using multiviews for my calendar and drop down
list controls)


Thanks in advance!



Hi ijaz,


Yes I did miss out that part of querying the database haha. But it's working fine now thankyou!


However, I encountered another error where my data is not filtered according to the date after I select an item from the drop down list. Any suggestions to go about doing it? (by the way I'm using multiviews for my calendar and drop down list controls)


Thanks in advance!


[RESOLVED] Filter gridview data for a given date range


Hi everyone I'm working on a project where my submission date is drawing near. I'm using vb.net language which in this case I'm working with for the very first time.


I appreciate anyone who could help me solve these errors I'm facing with regards to filtering data in the gridview.


Currently I have populated two drop down lists, two calendar controls and one search button to help filter the data in my gridview, however I'm not able to filter the gridview data based on the date selected from my two calendar controls


(*** to be more precise, I need to get all the records from my access database for a given date range which user selects from the calendars, for e.g. 20 May 2013 - 4 July 2013 but I'm only working with one date/time column in the access database)


I have searched everywhere for an example on how to go about doing this but could not find any working solution.


**I am using microsoft access database with a date/time column


Here is what I have done up :


Protected Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSearch.Click


'Date Search



If MultiView1.ActiveViewIndex = 0 Then


Dim FromDate As String

Dim ToDate As String




FromDate = Calendar1.SelectedDate

ToDate = Calendar2.SelectedDate




If FromDate <> "" And ToDate = " Then" Then


Session("Purchase Search String") = " And PurchaseDate between #" & FromDate & "# and #" & Date.Now.ToString("dd/MM/yyyy") & "#"


ElseIf FromDate = "" And ToDate = "" Then


Session("Purchase Search String") = ""


ElseIf FromDate <> "" And ToDate <> "" Then


Session("Purchase Search String") = " And PODate between #" & FromDate & "# and #" & ToDate & "#"


ElseIf FromDate = "" And ToDate <> "" Then


Session("Purchase Search String") = " And PODate between #" & Date.Now.ToString("dd/MM/yyyy") & "# and #" & ToDate & "#"


End If


End If



Any help from any kind soul would be deeply appreciated!


Thanks in advance.



Cherry




Hi,


I think you need to create a dynamic query based on your filter then bind that dataset with grid view.


This link might help you.


http://www.aspdotnet-suresh.com/2011/11/how-to-filter-gridview-records-with.html





in your search method, you are only setting some session variables and not re-binding the data from db. do you not need to query the database with the user filter date values?


thanks. 



Hi Jalpesh,


That was a good suggestion thankyou! :) I guessed I missed out the part to create a dynamic query to retrieve the data associated with the date range selected.


Now that I have done it, I encountered another error where my data is not filtered according to the date after I select an item from the drop down list. Any suggestions to go about doing it? (by the way I'm using multiviews for my calendar and drop down
list controls)


Thanks in advance!


Cherry



Hi Vinz,


I have came across that article before but unfortunately it was not compatible to what I'm working on currently but thankyou anyway! :) 


Now that I have done it, I encountered another error where my data is not filtered according to the date after I select an item from the drop down list. Any suggestions to go about doing it? (by the way I'm using multiviews for my calendar and drop down
list controls)


Thanks in advance!



Hi ijaz,


Yes I did miss out that part of querying the database haha. But it's working fine now thankyou!


However, I encountered another error where my data is not filtered according to the date after I select an item from the drop down list. Any suggestions to go about doing it? (by the way I'm using multiviews for my calendar and drop down list controls)


Thanks in advance!


[RESOLVED] Filter gridview data for a given date range


Hi everyone I'm working on a project where my submission date is drawing near. I'm using vb.net language which in this case I'm working with for the very first time.


I appreciate anyone who could help me solve these errors I'm facing with regards to filtering data in the gridview.


Currently I have populated two drop down lists, two calendar controls and one search button to help filter the data in my gridview, however I'm not able to filter the gridview data based on the date selected from my two calendar controls


(*** to be more precise, I need to get all the records from my access database for a given date range which user selects from the calendars, for e.g. 20 May 2013 - 4 July 2013 but I'm only working with one date/time column in the access database)


I have searched everywhere for an example on how to go about doing this but could not find any working solution.


**I am using microsoft access database with a date/time column


Here is what I have done up :


Protected Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSearch.Click


'Date Search



If MultiView1.ActiveViewIndex = 0 Then


Dim FromDate As String

Dim ToDate As String




FromDate = Calendar1.SelectedDate

ToDate = Calendar2.SelectedDate




If FromDate <> "" And ToDate = " Then" Then


Session("Purchase Search String") = " And PurchaseDate between #" & FromDate & "# and #" & Date.Now.ToString("dd/MM/yyyy") & "#"


ElseIf FromDate = "" And ToDate = "" Then


Session("Purchase Search String") = ""


ElseIf FromDate <> "" And ToDate <> "" Then


Session("Purchase Search String") = " And PODate between #" & FromDate & "# and #" & ToDate & "#"


ElseIf FromDate = "" And ToDate <> "" Then


Session("Purchase Search String") = " And PODate between #" & Date.Now.ToString("dd/MM/yyyy") & "# and #" & ToDate & "#"


End If


End If



Any help from any kind soul would be deeply appreciated!


Thanks in advance.



Cherry




Hi,


I think you need to create a dynamic query based on your filter then bind that dataset with grid view.


This link might help you.


http://www.aspdotnet-suresh.com/2011/11/how-to-filter-gridview-records-with.html





in your search method, you are only setting some session variables and not re-binding the data from db. do you not need to query the database with the user filter date values?


thanks. 



Hi Jalpesh,


That was a good suggestion thankyou! :) I guessed I missed out the part to create a dynamic query to retrieve the data associated with the date range selected.


Now that I have done it, I encountered another error where my data is not filtered according to the date after I select an item from the drop down list. Any suggestions to go about doing it? (by the way I'm using multiviews for my calendar and drop down
list controls)


Thanks in advance!


Cherry



Hi Vinz,


I have came across that article before but unfortunately it was not compatible to what I'm working on currently but thankyou anyway! :) 


Now that I have done it, I encountered another error where my data is not filtered according to the date after I select an item from the drop down list. Any suggestions to go about doing it? (by the way I'm using multiviews for my calendar and drop down
list controls)


Thanks in advance!



Hi ijaz,


Yes I did miss out that part of querying the database haha. But it's working fine now thankyou!


However, I encountered another error where my data is not filtered according to the date after I select an item from the drop down list. Any suggestions to go about doing it? (by the way I'm using multiviews for my calendar and drop down list controls)


Thanks in advance!


[RESOLVED] Windows 7 UTC Timezone Issue


Hi,


Overview:


We have got a calendar on our site, where users can create meeting request on which a meeting request is sent to their mailbox.


Problem:


When user selects say 9 am to 10 am on website in the email he gets it as 7 am to 8 am.


It happens only on windows 7 where Timezone is set to UTC + 2 , harare, pretoria.


Runs fine on windows xp where timezone's are in GMT . its set to GMT +1 western central africa.


I have checked outlook timezone as well , its same as on machine timezone.



Please suggest.



Regards,


AP




No suggestions?



Hi,



Tried solutions from the forums, no help, any other solutions please?


[RESOLVED] Calendar control in templates


In a grid, I'm having name, date of birth...To edit date of birth, i need a date control with text box and image button. So, when click on edit , DOB value should display in the textbox, calendar control should hide. when click on image button, make calendar
control visisble. 


The problem is on click event of image button, I don't know how to access calendar control and make it visible. Please give me some idea. 



Check these link:


http://www.codeproject.com/Tips/407460/How-to-use-ASP-NET-AJAX-Calender-Extender


http://carlosrivero.com/node/41


May be their is some mistake in your code. just verify it.



In the above they are using ajax controls. But I want to use asp calendar control. is it possible or we can use only ajax control for this. 



http://forums.asp.net/t/1516969.aspx/1



Hi,




albasith1000


The problem is on click event of image button, I don't know how to access calendar control and make it visible.


You can first access gridview control and then using findcontrol like this


GridView1.Rows[GridView1.EditIndex-1].FindControl("CalendarID")

And refer the resolved thread


http://objectmix.com/dotnet/300846-cant-find-control-within-edit-row-gridview-please-halp.html


Hope it can help you.


[RESOLVED] Windows 7 UTC Timezone Issue


Hi,


Overview:


We have got a calendar on our site, where users can create meeting request on which a meeting request is sent to their mailbox.


Problem:


When user selects say 9 am to 10 am on website in the email he gets it as 7 am to 8 am.


It happens only on windows 7 where Timezone is set to UTC + 2 , harare, pretoria.


Runs fine on windows xp where timezone's are in GMT . its set to GMT +1 western central africa.


I have checked outlook timezone as well , its same as on machine timezone.



Please suggest.



Regards,


AP




No suggestions?



Hi,



Tried solutions from the forums, no help, any other solutions please?


[RESOLVED] Calendar control in templates


In a grid, I'm having name, date of birth...To edit date of birth, i need a date control with text box and image button. So, when click on edit , DOB value should display in the textbox, calendar control should hide. when click on image button, make calendar
control visisble. 


The problem is on click event of image button, I don't know how to access calendar control and make it visible. Please give me some idea. 



Check these link:


http://www.codeproject.com/Tips/407460/How-to-use-ASP-NET-AJAX-Calender-Extender


http://carlosrivero.com/node/41


May be their is some mistake in your code. just verify it.



In the above they are using ajax controls. But I want to use asp calendar control. is it possible or we can use only ajax control for this. 



http://forums.asp.net/t/1516969.aspx/1



Hi,




albasith1000


The problem is on click event of image button, I don't know how to access calendar control and make it visible.


You can first access gridview control and then using findcontrol like this


GridView1.Rows[GridView1.EditIndex-1].FindControl("CalendarID")

And refer the resolved thread


http://objectmix.com/dotnet/300846-cant-find-control-within-edit-row-gridview-please-halp.html


Hope it can help you.


[RESOLVED] Windows 7 UTC Timezone Issue


Hi,


Overview:


We have got a calendar on our site, where users can create meeting request on which a meeting request is sent to their mailbox.


Problem:


When user selects say 9 am to 10 am on website in the email he gets it as 7 am to 8 am.


It happens only on windows 7 where Timezone is set to UTC + 2 , harare, pretoria.


Runs fine on windows xp where timezone's are in GMT . its set to GMT +1 western central africa.


I have checked outlook timezone as well , its same as on machine timezone.



Please suggest.



Regards,


AP




No suggestions?



Hi,



Tried solutions from the forums, no help, any other solutions please?


[RESOLVED] Calendar control in templates


In a grid, I'm having name, date of birth...To edit date of birth, i need a date control with text box and image button. So, when click on edit , DOB value should display in the textbox, calendar control should hide. when click on image button, make calendar
control visisble. 


The problem is on click event of image button, I don't know how to access calendar control and make it visible. Please give me some idea. 



Check these link:


http://www.codeproject.com/Tips/407460/How-to-use-ASP-NET-AJAX-Calender-Extender


http://carlosrivero.com/node/41


May be their is some mistake in your code. just verify it.



In the above they are using ajax controls. But I want to use asp calendar control. is it possible or we can use only ajax control for this. 



http://forums.asp.net/t/1516969.aspx/1



Hi,




albasith1000


The problem is on click event of image button, I don't know how to access calendar control and make it visible.


You can first access gridview control and then using findcontrol like this


GridView1.Rows[GridView1.EditIndex-1].FindControl("CalendarID")

And refer the resolved thread


http://objectmix.com/dotnet/300846-cant-find-control-within-edit-row-gridview-please-halp.html


Hope it can help you.


[RESOLVED] Windows 7 UTC Timezone Issue


Hi,


Overview:


We have got a calendar on our site, where users can create meeting request on which a meeting request is sent to their mailbox.


Problem:


When user selects say 9 am to 10 am on website in the email he gets it as 7 am to 8 am.


It happens only on windows 7 where Timezone is set to UTC + 2 , harare, pretoria.


Runs fine on windows xp where timezone's are in GMT . its set to GMT +1 western central africa.


I have checked outlook timezone as well , its same as on machine timezone.



Please suggest.



Regards,


AP




No suggestions?



Hi,



Tried solutions from the forums, no help, any other solutions please?


[RESOLVED] Calendar control in templates


In a grid, I'm having name, date of birth...To edit date of birth, i need a date control with text box and image button. So, when click on edit , DOB value should display in the textbox, calendar control should hide. when click on image button, make calendar
control visisble. 


The problem is on click event of image button, I don't know how to access calendar control and make it visible. Please give me some idea. 



Check these link:


http://www.codeproject.com/Tips/407460/How-to-use-ASP-NET-AJAX-Calender-Extender


http://carlosrivero.com/node/41


May be their is some mistake in your code. just verify it.



In the above they are using ajax controls. But I want to use asp calendar control. is it possible or we can use only ajax control for this. 



http://forums.asp.net/t/1516969.aspx/1



Hi,




albasith1000


The problem is on click event of image button, I don't know how to access calendar control and make it visible.


You can first access gridview control and then using findcontrol like this


GridView1.Rows[GridView1.EditIndex-1].FindControl("CalendarID")

And refer the resolved thread


http://objectmix.com/dotnet/300846-cant-find-control-within-edit-row-gridview-please-halp.html


Hope it can help you.


[RESOLVED] Windows 7 UTC Timezone Issue


Hi,


Overview:


We have got a calendar on our site, where users can create meeting request on which a meeting request is sent to their mailbox.


Problem:


When user selects say 9 am to 10 am on website in the email he gets it as 7 am to 8 am.


It happens only on windows 7 where Timezone is set to UTC + 2 , harare, pretoria.


Runs fine on windows xp where timezone's are in GMT . its set to GMT +1 western central africa.


I have checked outlook timezone as well , its same as on machine timezone.



Please suggest.



Regards,


AP




No suggestions?



Hi,



Tried solutions from the forums, no help, any other solutions please?


[RESOLVED] Calendar control in templates


In a grid, I'm having name, date of birth...To edit date of birth, i need a date control with text box and image button. So, when click on edit , DOB value should display in the textbox, calendar control should hide. when click on image button, make calendar
control visisble. 


The problem is on click event of image button, I don't know how to access calendar control and make it visible. Please give me some idea. 



Check these link:


http://www.codeproject.com/Tips/407460/How-to-use-ASP-NET-AJAX-Calender-Extender


http://carlosrivero.com/node/41


May be their is some mistake in your code. just verify it.



In the above they are using ajax controls. But I want to use asp calendar control. is it possible or we can use only ajax control for this. 



http://forums.asp.net/t/1516969.aspx/1



Hi,




albasith1000


The problem is on click event of image button, I don't know how to access calendar control and make it visible.


You can first access gridview control and then using findcontrol like this


GridView1.Rows[GridView1.EditIndex-1].FindControl("CalendarID")

And refer the resolved thread


http://objectmix.com/dotnet/300846-cant-find-control-within-edit-row-gridview-please-halp.html


Hope it can help you.