how can we like drill into details in gridview? such as when i click on certain part id then it will only display the information according to the id which i clicked.
i tried putting the below statements in the webconfig but it doesn't work. did i put it wrongly??
the answer to your second question is. You should not put the code in Web.Config put nothing in web.config, the code i have provided should be placed in your ASPx pages.
thanks
sharp guy
Marked as answer by newbiejeff on Oct 11, 2007 09:04 AM
is there a way to click on the print button and it will print out all the pages in the gridview? or even better if we can choose to print which pages from the print button?
any idea how can to type and search for eg: from july 07 to sept 07 and display them in the gridview accordingly?
any problem is how can we have the cording for Visual Studio 2005 asp.vb for grouping in gridview? the solution which i found below does not allow me to do so
// Group by ShipRegion
protected void Page_Load(object sender, EventArgs e)
{
GridViewHelper helper = new GridViewHelper(this.GridView1);
helper.RegisterGroup("ShipRegion", true, true);
helper.ApplyGroupSort();
}
newbiejeff
Member
7 Points
36 Posts
Date and Time display
Oct 10, 2007 03:54 AM|LINK
Hi,
ani idea how can i allow my asp.net (vb) to auto update its date and time???
the code below only allow me to capture the date and time upon open/refresh
lblDateTime.Text = Date.Now.ToString thanks,Regards,
Jeff
Regards,
Jeff
hkhaled
Contributor
3024 Points
461 Posts
Re: Date and Time display
Oct 10, 2007 06:47 AM|LINK
You can use the AJAX UpdatePanel,and AJAX Timer for this purpose:
Drag the UpdatePanel, Timer and a Lable to your ASPx Page and then under the tick event of your timer put the code for currend date and time
your aspx page code for the timer and update panel should look like this
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:Timer ID="Timer1" runat="server" Interval="1000" OnTick="Timer1_Tick">
</asp:Timer>
</p>
<p>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
</p>
and under your Timer Tick event:
protected void Timer1_Tick(object sender, EventArgs e){
Label1.Text = DateTime.Now.ToString();
}
thanks
newbiejeff
Member
7 Points
36 Posts
Re: Date and Time display
Oct 10, 2007 07:39 AM|LINK
i don seems to have the "timer" and the "update panel" in my toolbox i am using Visual Studio 2005
Regards,
Jeff
hkhaled
Contributor
3024 Points
461 Posts
Re: Date and Time display
Oct 10, 2007 11:09 AM|LINK
Good, its not coming with VS 2005 you will need to downlaod it from the following link:
http://www.asp.net/ajax/downloads/default.aspx
Please download the ASP.NET Extenstions v1.0, after installation a new tab will be created in your VS 2005 toolbox named AJAX Extensions.
thanks
newbiejeff
Member
7 Points
36 Posts
Drill in for Gridview & datetime
Oct 11, 2007 03:39 AM|LINK
Hi,
how can we like drill into details in gridview? such as when i click on certain part id then it will only display the information according to the id which i clicked.
i tried putting the below statements in the webconfig but it doesn't work. did i put it wrongly??
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:Timer ID="Timer1" runat="server" Interval="1000" OnTick="Timer1_Tick">
</asp:Timer>
</p>
<p>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
</p>
thanks for your help. =)
Regards,
Jeff
Regards,
Jeff
hkhaled
Contributor
3024 Points
461 Posts
Re: Drill in for Gridview & datetime
Oct 11, 2007 05:38 AM|LINK
I think you want a parent child grid, I have already replied this in the following post:
http://forums.asp.net/t/1159833.aspx
the answer to your second question is. You should not put the code in Web.Config put nothing in web.config, the code i have provided should be placed in your ASPx pages.
thanks
newbiejeff
Member
7 Points
36 Posts
Print Function
Oct 15, 2007 12:34 AM|LINK
Hi,
is there a way to click on the print button and it will print out all the pages in the gridview? or even better if we can choose to print which pages from the print button?
can we change the print format to landscape?
is it posible to export the gridview to excel?
Thanks
Regards,
Jeff
Regards,
Jeff
hkhaled
Contributor
3024 Points
461 Posts
Re: Print Function
Oct 15, 2007 11:20 AM|LINK
Sure, put your Gridview in panel control and then use the code which is provided in this post:
http://forums.asp.net/p/1034717/1427991.aspx
or check out this article which add headers:
http://www.codeproject.com/useritems/TariqMultiHeaderGridview.asp?print=true
for exporting it to Excel the check out this:
http://mattberseth.com/blog/2007/04/export_gridview_to_excel_1.html
thanks
newbiejeff
Member
7 Points
36 Posts
Re: Print Function
Oct 16, 2007 12:52 AM|LINK
Response.Clear()
Response.Buffer =
TrueResponse.Charset =
"utf-8" System.IO.StringWriter(sw = New System.IO.StringWriter()) <<<< 'StringWriter' is a type of IO cannot be used as an expressionSystem.Web.UI.HtmlTextWriter(hw =
New HtmlTextWriter(sw)) <<<< HtmlTextWriter is a type of UI cannot be used as an expressionPl_ToPrint.RenderControl(hw)
'//Pl_ToPrintResponse.Write(sw.ToString())
Response.End()
End SubRegards,
Jeff
newbiejeff
Member
7 Points
36 Posts
Search and display for gridview
Oct 18, 2007 07:30 AM|LINK
Hi,
any idea how can to type and search for eg: from july 07 to sept 07 and display them in the gridview accordingly?
any problem is how can we have the cording for Visual Studio 2005 asp.vb for grouping in gridview? the solution which i found below does not allow me to do so
// Group by ShipRegion
protected void Page_Load(object sender, EventArgs e)
{
GridViewHelper helper = new GridViewHelper(this.GridView1);
helper.RegisterGroup("ShipRegion", true, true);
helper.ApplyGroupSort();
}
Thanks.
Regards,
Jeff