freelanceprogrammers.org Forum Index » ASP
datagrid
Joined: 24 Feb 2003
Posts: 2
datagrid
is it possible to insert blank row in datagrid for sub titles?
something like that
a | 1 | 5 | 9
a | 1 | 5 | 9title
a | 1 | 5 | 9
a | 1 | 5 | 9
title
a | 1 | 5 | 9
a | 1 | 5 | 9
elad
Joined: 24 Feb 2003
Posts: 1
datagrid
<PleaseForgiveMyIgnorance>
I am very new to ASP.NET, and this question intrigues me cuz I am sure there is a simple solution.
To solve this question I made my own page that dynamically added DataGrid controls to the page then inserted the title, every 5 rows of the DataTable that populated the DataGrid. It got complex and messy, so that wasn`t elegant enough.
I am sure it would be possible to declare a new class inherited from System.Web.UI.WebControls.DataGrid and you would modify either the method .RenderControl or the method .Render and change the contents of the string being fed to the HtmlTextWriter to force a custom [title] row every nth row.
If you got fancy, you could probably put in a couple properties to define the HTML of the title row and the rows on which the title row should appear.
Would that be the right approach? If it is.. can someone post any code sample (vb.net if possible) that shows a webcontrol having it`s contents modified when being rendered?
Thanks,
David
</PleaseForgiveMyIgnorance>
-----Original Message-----From: Elad Rosenberg [mailto:eladr@...]Sent: Monday, February 24, 2003 9:15 PMTo: AspNetAnyQuestionIsOk@yahoogroups.comSubject: [AspNetAnyQuestionIsOk] datagrid
is it possible to insert blank row in datagrid for sub titles?
something like that
a | 1 | 5 | 9
a | 1 | 5 | 9title
a | 1 | 5 | 9
a | 1 | 5 | 9
title
a | 1 | 5 | 9
a | 1 | 5 | 9
elad
To unsubscribe from this group, send an email to:AspNetAnyQuestionIsOk-unsubscribe@yahoogroups.comYour use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Joined: 07 Jan 2006
Posts: 63
datagrid
http://www.xmlforasp.net/codeSection.aspx?csID=93
At 01:15 PM 2/24/2003 +0200, you wrote:
is it
possible to insert blank row in datagrid for sub titles?
something like that
a | 1 | 5 | 9
a | 1 | 5 | 9
title
a | 1 | 5 | 9
a | 1 | 5 | 9
title
a | 1 | 5 | 9
a | 1 | 5 | 9
Joined: 24 Feb 2003
Posts: 2
datagrid
Thanx !
----- Original Message -----
From: Charles M. Carroll
To: AspNetAnyQuestionIsOk@yahoogroups.com
Sent: Monday, February 24, 2003 5:41 PM
Subject: Re: [AspNetAnyQuestionIsOk] datagrid
http://www.xmlforasp.net/codeSection.aspx?csID=93At 01:15 PM 2/24/2003 +0200, you wrote:
is it possible to insert blank row in datagrid for sub titles?something like that a | 1 | 5 | 9a | 1 | 5 | 9titlea | 1 | 5 | 9a | 1 | 5 | 9title a | 1 | 5 | 9a | 1 | 5 | 9To unsubscribe from this group, send an email to:AspNetAnyQuestionIsOk-unsubscribe@yahoogroups.comYour use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Joined: 14 Jan 2004
Posts: 2
datagrid
hi all
wat`s the diff b/n
<%# databinder.eval(container.dataitem."column name")%>
and
<%# container.dataitem("column name") %>
thanx
Regard
Ahmed
Joined: 14 Jan 2004
Posts: 1
datagrid
Basheer Ahmed <m_basheer_ad@...> wrote:
hi all
wat`s the diff b/n
<%# databinder.eval(container.dataitem."column name")%> Its
<%# databinder.eval(container.dataitem,"column name")%>
databinder.eval allows reflection which will make it easy to know the datatype
of the column and other properties. where as container.dataitem doesnt.
and
<%# container.dataitem("column name") %>
thanx
Regard
Ahmed
---------------------------------
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
To unsubscribe from this group, send an email to:
AspNetAnyQuestionIsOk-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
[Non-text portions of this message have been removed]
Joined: 04 Jan 2005
Posts: 6
datagrid
hey,
i am new to asp.net stil learning...here my
problem....i hav a webform...with 5 textbox`s and a
datagrid...and a button...what i wana do is,when i
press the button the values entered in the textbox, i
wana insert them into the grid....plz help.......
________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony
Joined: 04 Jan 2005
Posts: 1
datagrid
Hi,
If u are using a database and want to save this into the database and
then display, just submitting the values page and updating the database
will help.
If u don`t want to save into the database immediately then after
submitting the page , you must be having a dataset that has been binded
to the datagrid , so you will require to add a row in the datatable of
the dataset, and as the dataset is bound to a data grid the values will
be displayed in the datagrid.
I hope this helps
Hemant
-----Original Message-----
From: hitesh c [mailto:devicekid@...]
Sent: Tuesday, January 04, 2005 2:27 PM
To: AspNetAnyQuestionIsOk@yahoogroups.com
Subject: [AspNetAnyQuestionIsOk] datagrid
hey,
i am new to asp.net stil learning...here my
problem....i hav a webform...with 5 textbox`s and a datagrid...and a
button...what i wana do is,when i press the button the values entered in
the textbox, i wana insert them into the grid....plz help.......
________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony
Yahoo! Groups Links
Zensar Technologies Ltd. Mail Disclaimer: This e-mail and any files transmitted
with it are confidential and the views expressed in the same are not necessarily
the views of Zensar Technologies Ltd., and its Directors, Management or
Employees. This communication represents the originator`s personal views and
opinions. If you are not the intended recipient or the person responsible for
delivering the e-mail to the intended recipient, be advised that you have
received this e-mail by error, and that any use, dissemination, forwarding,
printing, or copying of this e-mail is strictly prohibited. You shall be under
obligation to keep the contents of this e-mail, strictly confidential and shall
not disclose, disseminate or divulge the same to any Person, Company, Firm or
Entity. Please ensure you have adequate virus protection before you open or
detach any documents from this transmission. Zensar Technologies Ltd. does not
accept any liability for virus. If you received this e-mail in error, please
immediately notify administrator@.... The rights to monitor all e-mail
communication through our network are reserved with us.
Joined: 04 Jan 2005
Posts: 6
datagrid
hey,
thanks ...but i tried tht...it works the only
problem is tht i hav initialized the datagrid with
some columes and 2 columes with chheckbox and
radio...the dataset is adding seperate columns to the
grid...plz help
--- Hemant Palod <H.Palod@...> wrote:
---------------------------------
Hi,
If u are using a database and want to save this into
the database and
then display, just submitting the values page and
updating the database
will help.
If u don`t want to save into the database immediately
then after
submitting the page , you must be having a dataset
that has been binded
to the datagrid , so you will require to add a row in
the datatable of
the dataset, and as the dataset is bound to a data
grid the values will
be displayed in the datagrid.
I hope this helps
Hemant
-----Original Message-----
From: hitesh c [mailto:devicekid@...]
Sent: Tuesday, January 04, 2005 2:27 PM
To: AspNetAnyQuestionIsOk@yahoogroups.com
Subject: [AspNetAnyQuestionIsOk] datagrid
hey,
i am new to asp.net stil learning...here my
problem....i hav a webform...with 5 textbox`s and a
datagrid...and a
button...what i wana do is,when i press the button the
values entered in
the textbox, i wana insert them into the grid....plz
help.......
________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony
Yahoo! Groups Links
Zensar Technologies Ltd. Mail Disclaimer: This e-mail
and any files transmitted with it are confidential and
the views expressed in the same are not necessarily
the views of Zensar Technologies Ltd., and its
Directors, Management or Employees. This communication
represents the originator`s personal views and
opinions. If you are not the intended recipient or the
person responsible for delivering the e-mail to the
intended recipient, be advised that you have received
this e-mail by error, and that any use, dissemination,
forwarding, printing, or copying of this e-mail is
strictly prohibited. You shall be under obligation to
keep the contents of this e-mail, strictly
confidential and shall not disclose, disseminate or
divulge the same to any Person, Company, Firm or
Entity. Please ensure you have adequate virus
protection before you open or detach any documents
from this transmission. Zensar Technologies Ltd. does
not accept any liability for virus. If you received
this e-mail in error, please immediately notify
administrator@.... The rights to monitor all
e-mail communication through our network are reserved
with us.
---------------------------------
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
To unsubscribe from this group, send an email to:
AspNetAnyQuestionIsOk-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo!
Terms of Service.
________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony
Joined: 04 Jan 2005
Posts: 6
datagrid
hi,
how can we dynamically add columns to the datagrid
and aslo how can we make it to store temporary data
from webform
________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony
Joined: 07 Jan 2006
Posts: 63
datagrid
http://www.learnasp.com/freebook/learn/datagridtrick-codeonly.aspx
is an example of syntax to add columns dynamically.
Clarify specifically what you mean by storing data from webform. There
are several ways to interpret that request. Then we can answer.
On Wed, 5 Jan 2005 08:01:59 +0000 (GMT), hitesh c <devicekid@...> wrote:
> hi,
> how can we dynamically add columns to the datagrid
> and aslo how can we make it to store temporary data
> from webform
Joined: 06 Jan 2005
Posts: 6
datagrid
¡©¥½
Hi Charles,
I think I understand what "devicekid" means by storing temporary data. I to have
been looking for a way to do that.
Most of the time we just use a datagrid bound to a database or a xml file.
In my case, I`m using a datagrid that starts empty and the user has to insert
data. I store the data in an Arraylist.
Now, how would I read all elements from the arraylist and send them to the
database?
Thank you for your attention.
Here`s my code for the database:
<code>
<codebehind>
Private Sub LoadGrid()
If (Session("Dados") Is Nothing) Then
Dim dt As DataTable
Dim dr As DataRow
Dim i As Integer
dt = New DataTable()
dt.Columns.Add(New DataColumn("Linha", GetType(String)))
dt.Columns.Add(New DataColumn("Ref", GetType(String)))
dt.Columns.Add(New DataColumn("Desc", GetType(String)))
dt.Columns.Add(New DataColumn("Unidade Medida", GetType(String)))
dt.Columns.Add(New DataColumn("Quantidade", GetType(String)))
`For i = 1 To 2
` dr = dt.NewRow()
` dr(0) = "Item " + i.ToString()
` dr(1) = "Item " + i.ToString()
` dr(2) = "Item " + i.ToString()
` dr(3) = "Item " + i.ToString()
` dr(4) = "Item " + i.ToString()
` dt.Rows.Add(dr)
`Next
Session("Dados") = dt
End If
`
With Me.dgMrLines
.DataSource = New DataView(Session("Dados"))
.DataBind()
End With
End Sub
`
`
Public Sub dgMrLines_ItemCommand(ByVal source As System.Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs)
If e.CommandName = "Insert" Then
Dim dr As DataRow
dr = DirectCast(Session("Dados"), DataTable).NewRow()
dr(0) = DirectCast(e.Item.FindControl("txtLinha"), TextBox).Text
dr(1) = DirectCast(e.Item.FindControl("txtRef"), TextBox).Text
dr(2) = DirectCast(e.Item.FindControl("txtDesc"), TextBox).Text
dr(3) = DirectCast(e.Item.FindControl("txtUnit"), TextBox).Text
dr(4) = DirectCast(e.Item.FindControl("txtQty"), TextBox).Text
DirectCast(Session("Dados"), DataTable).Rows.Add(dr)
Call Me.LoadGrid()
End If
End Sub
`
`
Public Sub dgMrLines_DeleteCommand(ByVal source As System.Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs)
DirectCast(Session("Dados"), DataTable).Rows.RemoveAt(e.Item.ItemIndex)
Call Me.LoadGrid()
End Sub
</codebehind>
<aspx code>
<asp:DataGrid id="dgMrLines" OnItemCommand="dgMrLines_ItemCommand"
OnDeleteCommand="dgMrLines_DeleteCommand" style="Z-INDEX: 101; LEFT: 22px;
POSITION: absolute; TOP: 19px" runat="server" BorderColor="#DEDFDE"
BorderStyle="None" BorderWidth="1px" BackColor="White" CellPadding="4"
GridLines="Vertical" ForeColor="Black" Font-Names="Arial" Font-Size="X-Small"
AutoGenerateColumns="False" ShowFooter="True">
<SelectedItemStyle Font-Bold="True" ForeColor="White"
BackColor="#CE5D5A"></SelectedItemStyle>
<AlternatingItemStyle BackColor="White"></AlternatingItemStyle>
<ItemStyle BackColor="#F7F7DE"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="White"
BackColor="#6B696B"></HeaderStyle>
<FooterStyle BackColor="#CCCC99"></FooterStyle>
<Columns>
<asp:TemplateColumn HeaderText="Linha">
<ItemTemplate>
<asp:Label id="lblLinha" runat="server">
<%# DataBinder.Eval(Container.DataItem, "Linha")%>
</asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:TextBox id="txtLinha" runat="server"></asp:TextBox>
</FooterTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Ref">
<ItemTemplate>
<asp:Label id="lblRef" runat="server">
<%# DataBinder.Eval(Container.DataItem, "Ref")%>
</asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:TextBox id="txtRef" runat="server"></asp:TextBox>
</FooterTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Desc">
<ItemTemplate>
<asp:Label id="lblDesc" runat="server">
<%# DataBinder.Eval(Container.DataItem, "Desc")%>
</asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:TextBox id="txtDesc" runat="server"></asp:TextBox>
</FooterTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Unidade Medida">
<ItemTemplate>
<asp:Label id="lblUnit" runat="server">
<%# DataBinder.Eval(Container.DataItem, "Unidade Medida")%>
</asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:TextBox id="txtUnit" runat="server"></asp:TextBox>
</FooterTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Quantidade">
<ItemTemplate>
<asp:Label id="lblQty" runat="server">
<%# DataBinder.Eval(Container.DataItem, "Quantidade")%>
</asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:TextBox id="txtQty" runat="server"></asp:TextBox>
</FooterTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn>
<ItemTemplate>
<asp:Button id="btnDelete" runat="server" Width="20px"
CommandName="Delete" Text="X"></asp:Button>
</ItemTemplate>
<FooterTemplate>
<asp:Button id="btnInsert" runat="server" Width="20px"
CommandName="Insert" Text="+"></asp:Button>
</FooterTemplate>
</asp:TemplateColumn>
</Columns>
<PagerStyle HorizontalAlign="Right" ForeColor="Black" BackColor="#F7F7DE"
Mode="NumericPages"></PagerStyle>
</asp:DataGrid>
</aspx code>
</code>
-----Original Message-----
From: Charles Carroll [mailto:911@...]
Sent: quinta-feira, 6 de Janeiro de 2005 8:13
To: AspNetAnyQuestionIsOk@yahoogroups.com
Subject: Re: [AspNetAnyQuestionIsOk] datagrid
http://www.learnasp.com/freebook/learn/datagridtrick-codeonly.aspx
is an example of syntax to add columns dynamically.
Clarify specifically what you mean by storing data from webform. There
are several ways to¡©¡©interpret that request. Then we can answer.
On Wed, 5 Jan 2005 08:01:59 +0000 (GMT), hitesh c <devicekid@...> wrote:
> hi,
> how can we dynamically add columns to the datagrid
> and aslo how can we make it to store temporary data
> from webform
_____
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
* To unsubscribe from this group, send an email to:
AspNetAnyQuestionIsOk-unsubscribe@yahoogroups.com
<mailto:AspNetAnyQuestionIsOk-unsubscribe@yahoogroups.com?subject=Unsubscribe>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]
Joined: 10 Jan 2006
Posts: 12
datagrid
Hi All,
I`m looking for a free pop3 component which supports the saving of the files
which are sent to the pop3 account.
The component will be used for a hobby project, which is why I`m looking for
a free component.
I have tried the Indy Direct component but this didn`t seem to work for
webform projects.
If you don`t know of any good free pop3 .net controls I could probably also
use a COM component but this doesn`t have my preference.
Joined: 05 Jan 2005
Posts: 2
datagrid
I`ve written a Pop3 component but it is just me and not supported.
Chris
-----Original Message-----
From: Mischa Kroon [mailto:mischa@...]
Sent: Thursday, January 06, 2005 5:22 AM
To: AspNetAnyQuestionIsOk@yahoogroups.com
Subject: [AspNetAnyQuestionIsOk] Free pop3 component wanted
Hi All,
I`m looking for a free pop3 component which supports the saving of the files
which are sent to the pop3 account.
The component will be used for a hobby project, which is why I`m looking for
a free component.
I have tried the Indy Direct component but this didn`t seem to work for
webform projects.
If you don`t know of any good free pop3 .net controls I could probably also
use a COM component but this doesn`t have my preference.
Yahoo! Groups Links
Joined: 10 Jan 2006
Posts: 12
datagrid
Beats writing it myself :)
You have source code available and / or some docs with it ?
-----Original Message-----
From: Chris Burge [mailto:chris.burge@...]
Sent: donderdag 6 januari 2005 14:12
To: AspNetAnyQuestionIsOk@yahoogroups.com
Subject: RE: [AspNetAnyQuestionIsOk] Free pop3 component wanted
I`ve written a Pop3 component but it is just me and not supported.
Chris
-----Original Message-----
From: Mischa Kroon [mailto:mischa@...]
Sent: Thursday, January 06, 2005 5:22 AM
To: AspNetAnyQuestionIsOk@yahoogroups.com
Subject: [AspNetAnyQuestionIsOk] Free pop3 component wanted
Hi All,
I`m looking for a free pop3 component which supports the saving of the files
which are sent to the pop3 account.
The component will be used for a hobby project, which is why I`m looking for
a free component.
I have tried the Indy Direct component but this didn`t seem to work for
webform projects.
If you don`t know of any good free pop3 .net controls I could probably also
use a COM component but this doesn`t have my preference.
Yahoo! Groups Links
Yahoo! Groups Links
All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help
China Wholesale - Electronics Products
Character Studio - Tutorials and Help







