Hi,
Is there anyway I can make a column thats databound into a hyperlink to
navigate to another page?
Suppose I have 3 columns: SortOrder, Description, UserName
for eg:
<Columns>
<asp:HyperLinkC olumn Text="View" DataNavigateUrl Field="UserId"
DataNavigateUrl FormatString="V iewInfo.aspx?id ={0}">
<HeaderStyle BackColor="#CCC CCC"></HeaderStyle>
<ItemStyle HorizontalAlign ="Center"></ItemStyle>
</asp:HyperLinkCo lumn>
<asp:BoundColum n DataField="Sort Order" HeaderText="Sor t Order"
SortExpression= "SortOrder" >
<ItemStyle HorizontalAlign ="Center" Width="12%"></ItemStyle>
</asp:BoundColumn >
<asp:BoundColum n DataField="Desc ription" HeaderText="Des cription">
<ItemStyle HorizontalAlign ="Center"></ItemStyle>
</asp:BoundColumn >
<asp:BoundColum n DataField="User Name" HeaderText="Use rName"
SortExpression= "UserName">
<ItemStyle HorizontalAlign ="Center"></ItemStyle>
</asp:BoundColumn >
</Columns>
Instead of having HyperLinkColumn with "View" as text, how can I make
"Descriptio n" or whatever column I want
into the hyperlink (with the relevant info to display) and navigate it to
"ViewInfo.aspx? id={0}
please Advice,
Stephen 5 2495
using templates :-)
templates give you all teh free in the world to add something into the cell
in a row...
after the last </asp:BoundColumn >
add this for example: (just copy/paste)
<asp:TemplateFi eld>
<ItemTemplate >
<%#Eval("Descri ption")%> <br />
<asp:HyperLin k runat="server" id="myLink" text="more..."
NavigateUrl='<% # Eval("UserId", "ViewInfo.aspx? id={0}") %>' />
</ItemTemplate>
</asp:TemplateFie ld>
and then tell me the result ;-)
--
Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Stephen" <st********@hot mail.com> escreveu na mensagem
news:OF******** ******@TK2MSFTN GP02.phx.gbl... Hi,
Is there anyway I can make a column thats databound into a hyperlink to navigate to another page? Suppose I have 3 columns: SortOrder, Description, UserName
for eg: <Columns> <asp:HyperLinkC olumn Text="View" DataNavigateUrl Field="UserId" DataNavigateUrl FormatString="V iewInfo.aspx?id ={0}"> <HeaderStyle BackColor="#CCC CCC"></HeaderStyle> <ItemStyle HorizontalAlign ="Center"></ItemStyle> </asp:HyperLinkCo lumn> <asp:BoundColum n DataField="Sort Order" HeaderText="Sor t Order" SortExpression= "SortOrder" > <ItemStyle HorizontalAlign ="Center" Width="12%"></ItemStyle> </asp:BoundColumn > <asp:BoundColum n DataField="Desc ription" HeaderText="Des cription"> <ItemStyle HorizontalAlign ="Center"></ItemStyle> </asp:BoundColumn > <asp:BoundColum n DataField="User Name" HeaderText="Use rName" SortExpression= "UserName"> <ItemStyle HorizontalAlign ="Center"></ItemStyle> </asp:BoundColumn > </Columns>
Instead of having HyperLinkColumn with "View" as text, how can I make "Descriptio n" or whatever column I want into the hyperlink (with the relevant info to display) and navigate it to "ViewInfo.aspx? id={0}
please Advice, Stephen
Hi Bruno,
Thanks for the info but..... I tried your code suggestion but it still gives
me this error:
<Columns>
<asp:HyperLinkC olumn Text="View" DataNavigateUrl Field="UserId"
DataNavigateUrl FormatString="V iewInfo.aspx?id ={0}">
<HeaderStyle BackColor="#CCC CCC"></HeaderStyle>
<ItemStyle HorizontalAlign ="Center"></ItemStyle>
</asp:HyperLinkCo lumn>
<asp:BoundColum n DataField="Sort Order" HeaderText="Sor t Order"
SortExpression= "SortOrder" >
<ItemStyle HorizontalAlign ="Center" Width="12%"></ItemStyle>
</asp:BoundColumn >
<asp:BoundColum n DataField="Desc ription" HeaderText="Des cription">
<ItemStyle HorizontalAlign ="Center"></ItemStyle>
</asp:BoundColumn >
<asp:BoundColum n DataField="User Name" HeaderText="Use rName"
SortExpression= "UserName">
<ItemStyle HorizontalAlign ="Center"></ItemStyle>
</asp:BoundColumn >
<asp:Templateco lumn>
<ItemTemplate >
<%# DataBinder.Eval (Container.Data Item, "Descriptio n") %>
<br />
<asp:HyperLin k runat="server" id="myLink" text="more..." NavigateUrl='<% #
DataBinder.Eval ("Ruleid", "ViewInfo.aspx? id={0}") %>' />
</ItemTemplate>
</asp:Templatecol umn>
</Columns>
gives me this error:
DataBinder.Eval : 'System.String' does not contain a property with the name
ViewInfo.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.Web.Http Exception: DataBinder.Eval :
'System.String' does not contain a property with the name ViewInfo.
Source Error:
<%# DataBinder.Eval (Container.Data Item, "Descriptio n") %>
<br />
<asp:HyperLin k runat="server" id="myLink" text="more..." NavigateUrl='<% #
DataBinder.Eval ("Ruleid", "ViewInfo.aspx? id={0}") %>' />
</ItemTemplate>
</asp:Templatecol umn>
"Bruno Alexandre" <br*********@gm ail.com> wrote in message
news:e8******** ******@TK2MSFTN GP02.phx.gbl... using templates :-)
templates give you all teh free in the world to add something into the
cell in a row...
after the last </asp:BoundColumn > add this for example: (just copy/paste)
<asp:TemplateFi eld> <ItemTemplate > <%#Eval("Descri ption")%> <br /> <asp:HyperLin k runat="server" id="myLink" text="more..." NavigateUrl='<% # Eval("UserId", "ViewInfo.aspx? id={0}") %>' /> </ItemTemplate> </asp:TemplateFie ld>
and then tell me the result ;-)
--
Bruno Alexandre (a Portuguese in Københanv, Danmark)
"Stephen" <st********@hot mail.com> escreveu na mensagem news:OF******** ******@TK2MSFTN GP02.phx.gbl... Hi,
Is there anyway I can make a column thats databound into a hyperlink to navigate to another page? Suppose I have 3 columns: SortOrder, Description, UserName
for eg: <Columns> <asp:HyperLinkC olumn Text="View" DataNavigateUrl Field="UserId" DataNavigateUrl FormatString="V iewInfo.aspx?id ={0}"> <HeaderStyle BackColor="#CCC CCC"></HeaderStyle> <ItemStyle HorizontalAlign ="Center"></ItemStyle> </asp:HyperLinkCo lumn> <asp:BoundColum n DataField="Sort Order" HeaderText="Sor t Order" SortExpression= "SortOrder" > <ItemStyle HorizontalAlign ="Center" Width="12%"></ItemStyle> </asp:BoundColumn > <asp:BoundColum n DataField="Desc ription" HeaderText="Des cription"> <ItemStyle HorizontalAlign ="Center"></ItemStyle> </asp:BoundColumn > <asp:BoundColum n DataField="User Name" HeaderText="Use rName" SortExpression= "UserName"> <ItemStyle HorizontalAlign ="Center"></ItemStyle> </asp:BoundColumn > </Columns>
Instead of having HyperLinkColumn with "View" as text, how can I make "Descriptio n" or whatever column I want into the hyperlink (with the relevant info to display) and navigate it
to "ViewInfo.aspx? id={0}
please Advice, Stephen
remove the DataBinder... just Eval("name") like my example
or Eval("string{0} ", "name")
or the same using Bind("name") if you nees to pass the value!
it's the way to do in ASP.NET 2.0
--
Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Stephen" <st********@hot mail.com> escreveu na mensagem
news:Oc******** ******@TK2MSFTN GP04.phx.gbl... Hi Bruno,
Thanks for the info but..... I tried your code suggestion but it still gives me this error:
<Columns> <asp:HyperLinkC olumn Text="View" DataNavigateUrl Field="UserId" DataNavigateUrl FormatString="V iewInfo.aspx?id ={0}"> <HeaderStyle BackColor="#CCC CCC"></HeaderStyle> <ItemStyle HorizontalAlign ="Center"></ItemStyle> </asp:HyperLinkCo lumn> <asp:BoundColum n DataField="Sort Order" HeaderText="Sor t Order" SortExpression= "SortOrder" > <ItemStyle HorizontalAlign ="Center" Width="12%"></ItemStyle> </asp:BoundColumn > <asp:BoundColum n DataField="Desc ription" HeaderText="Des cription"> <ItemStyle HorizontalAlign ="Center"></ItemStyle> </asp:BoundColumn > <asp:BoundColum n DataField="User Name" HeaderText="Use rName" SortExpression= "UserName"> <ItemStyle HorizontalAlign ="Center"></ItemStyle> </asp:BoundColumn > <asp:Templateco lumn> <ItemTemplate > <%# DataBinder.Eval (Container.Data Item, "Descriptio n") %> <br /> <asp:HyperLin k runat="server" id="myLink" text="more..." NavigateUrl='<% # DataBinder.Eval ("Ruleid", "ViewInfo.aspx? id={0}") %>' /> </ItemTemplate> </asp:Templatecol umn> </Columns>
gives me this error:
DataBinder.Eval : 'System.String' does not contain a property with the name ViewInfo. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.Http Exception: DataBinder.Eval : 'System.String' does not contain a property with the name ViewInfo.
Source Error:
<%# DataBinder.Eval (Container.Data Item, "Descriptio n") %> <br /> <asp:HyperLin k runat="server" id="myLink" text="more..." NavigateUrl='<% # DataBinder.Eval ("Ruleid", "ViewInfo.aspx? id={0}") %>' /> </ItemTemplate> </asp:Templatecol umn>
"Bruno Alexandre" <br*********@gm ail.com> wrote in message news:e8******** ******@TK2MSFTN GP02.phx.gbl... using templates :-)
templates give you all teh free in the world to add something into the cell in a row...
after the last </asp:BoundColumn > add this for example: (just copy/paste)
<asp:TemplateFi eld> <ItemTemplate > <%#Eval("Descri ption")%> <br /> <asp:HyperLin k runat="server" id="myLink" text="more..." NavigateUrl='<% # Eval("UserId", "ViewInfo.aspx? id={0}") %>' /> </ItemTemplate> </asp:TemplateFie ld>
and then tell me the result ;-)
--
Bruno Alexandre (a Portuguese in Københanv, Danmark)
"Stephen" <st********@hot mail.com> escreveu na mensagem news:OF******** ******@TK2MSFTN GP02.phx.gbl... > Hi, > > Is there anyway I can make a column thats databound into a hyperlink to > navigate to another page? > Suppose I have 3 columns: SortOrder, Description, UserName > > for eg: > <Columns> > <asp:HyperLinkC olumn Text="View" DataNavigateUrl Field="UserId" > DataNavigateUrl FormatString="V iewInfo.aspx?id ={0}"> > <HeaderStyle BackColor="#CCC CCC"></HeaderStyle> > <ItemStyle HorizontalAlign ="Center"></ItemStyle> > </asp:HyperLinkCo lumn> > <asp:BoundColum n DataField="Sort Order" HeaderText="Sor t Order" > SortExpression= "SortOrder" > > <ItemStyle HorizontalAlign ="Center" Width="12%"></ItemStyle> > </asp:BoundColumn > > <asp:BoundColum n DataField="Desc ription" HeaderText="Des cription"> > <ItemStyle HorizontalAlign ="Center"></ItemStyle> > </asp:BoundColumn > > <asp:BoundColum n DataField="User Name" HeaderText="Use rName" > SortExpression= "UserName"> > <ItemStyle HorizontalAlign ="Center"></ItemStyle> > </asp:BoundColumn > > </Columns> > > > Instead of having HyperLinkColumn with "View" as text, how can I make > "Descriptio n" or whatever column I want > into the hyperlink (with the relevant info to display) and navigate it to > "ViewInfo.aspx? id={0} > > > please Advice, > Stephen > >
Thanks for the reply... I am using v1.x
anyways I tried it this way and it worked but would welcome suggestion from
you too
<ItemTemplate >
<%# DataBinder.Eval (Container.Data Item, "Descriptio n") %>
<br />
<asp:HyperLin k runat="server" id="myLink" text="more..." NavigateUrl='<% #
"ViewInfo.aspx. aspx?id=" & Container.DataI tem("UserId") %>' />
</ItemTemplate>
Thanks,
Stephen
"Bruno Alexandre" <br*********@gm ail.com> wrote in message
news:ud******** ******@TK2MSFTN GP04.phx.gbl... remove the DataBinder... just Eval("name") like my example
or Eval("string{0} ", "name")
or the same using Bind("name") if you nees to pass the value!
it's the way to do in ASP.NET 2.0
--
Bruno Alexandre (a Portuguese in Københanv, Danmark)
"Stephen" <st********@hot mail.com> escreveu na mensagem news:Oc******** ******@TK2MSFTN GP04.phx.gbl... Hi Bruno,
Thanks for the info but..... I tried your code suggestion but it still gives me this error:
<Columns> <asp:HyperLinkC olumn Text="View" DataNavigateUrl Field="UserId" DataNavigateUrl FormatString="V iewInfo.aspx?id ={0}"> <HeaderStyle BackColor="#CCC CCC"></HeaderStyle> <ItemStyle HorizontalAlign ="Center"></ItemStyle> </asp:HyperLinkCo lumn> <asp:BoundColum n DataField="Sort Order" HeaderText="Sor t Order" SortExpression= "SortOrder" > <ItemStyle HorizontalAlign ="Center" Width="12%"></ItemStyle> </asp:BoundColumn > <asp:BoundColum n DataField="Desc ription" HeaderText="Des cription"> <ItemStyle HorizontalAlign ="Center"></ItemStyle> </asp:BoundColumn > <asp:BoundColum n DataField="User Name" HeaderText="Use rName" SortExpression= "UserName"> <ItemStyle HorizontalAlign ="Center"></ItemStyle> </asp:BoundColumn > <asp:Templateco lumn> <ItemTemplate > <%# DataBinder.Eval (Container.Data Item, "Descriptio n") %> <br /> <asp:HyperLin k runat="server" id="myLink" text="more..."
NavigateUrl='<% # DataBinder.Eval ("Ruleid", "ViewInfo.aspx? id={0}") %>' /> </ItemTemplate> </asp:Templatecol umn> </Columns>
gives me this error:
DataBinder.Eval : 'System.String' does not contain a property with the
name ViewInfo. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.Http Exception: DataBinder.Eval : 'System.String' does not contain a property with the name ViewInfo.
Source Error:
<%# DataBinder.Eval (Container.Data Item, "Descriptio n") %> <br /> <asp:HyperLin k runat="server" id="myLink" text="more..."
NavigateUrl='<% # DataBinder.Eval ("Ruleid", "ViewInfo.aspx? id={0}") %>' /> </ItemTemplate> </asp:Templatecol umn>
"Bruno Alexandre" <br*********@gm ail.com> wrote in message news:e8******** ******@TK2MSFTN GP02.phx.gbl... using templates :-)
templates give you all teh free in the world to add something into the cell in a row...
after the last </asp:BoundColumn > add this for example: (just copy/paste)
<asp:TemplateFi eld> <ItemTemplate > <%#Eval("Descri ption")%> <br /> <asp:HyperLin k runat="server" id="myLink" text="more..." NavigateUrl='<% # Eval("UserId", "ViewInfo.aspx? id={0}") %>'
/> </ItemTemplate> </asp:TemplateFie ld>
and then tell me the result ;-)
--
Bruno Alexandre (a Portuguese in Københanv, Danmark)
"Stephen" <st********@hot mail.com> escreveu na mensagem news:OF******** ******@TK2MSFTN GP02.phx.gbl... > Hi, > > Is there anyway I can make a column thats databound into a hyperlink
to > navigate to another page? > Suppose I have 3 columns: SortOrder, Description, UserName > > for eg: > <Columns> > <asp:HyperLinkC olumn Text="View" DataNavigateUrl Field="UserId" > DataNavigateUrl FormatString="V iewInfo.aspx?id ={0}"> > <HeaderStyle BackColor="#CCC CCC"></HeaderStyle> > <ItemStyle HorizontalAlign ="Center"></ItemStyle> > </asp:HyperLinkCo lumn> > <asp:BoundColum n DataField="Sort Order" HeaderText="Sor t Order" > SortExpression= "SortOrder" > > <ItemStyle HorizontalAlign ="Center" Width="12%"></ItemStyle> > </asp:BoundColumn > > <asp:BoundColum n DataField="Desc ription" HeaderText="Des cription"> > <ItemStyle HorizontalAlign ="Center"></ItemStyle> > </asp:BoundColumn > > <asp:BoundColum n DataField="User Name" HeaderText="Use rName" > SortExpression= "UserName"> > <ItemStyle HorizontalAlign ="Center"></ItemStyle> > </asp:BoundColumn > > </Columns> > > > Instead of having HyperLinkColumn with "View" as text, how can I make > "Descriptio n" or whatever column I want > into the hyperlink (with the relevant info to display) and navigate
it to > "ViewInfo.aspx? id={0} > > > please Advice, > Stephen > >
I was using 2.0 - I passed directly from classic asp to asp.net 2.0, so I
never did anything in 1.x ...
sorry,
but if it works... better :-)
I just love 2.0 version ;-) and for that GridView is really nicer to work
than the old datagrid (seeing all the examples I see in both controls)
you can use the template to show normal rows (itens), the update row
(EditItem), the select row, etc...
check for templateItem under datagrid in your Help file
--
Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Stephen" <st********@hot mail.com> escreveu na mensagem
news:uN******** ******@TK2MSFTN GP05.phx.gbl... Thanks for the reply... I am using v1.x anyways I tried it this way and it worked but would welcome suggestion from you too
<ItemTemplate > <%# DataBinder.Eval (Container.Data Item, "Descriptio n") %> <br /> <asp:HyperLin k runat="server" id="myLink" text="more..." NavigateUrl='<% # "ViewInfo.aspx. aspx?id=" & Container.DataI tem("UserId") %>' /> </ItemTemplate>
Thanks, Stephen
"Bruno Alexandre" <br*********@gm ail.com> wrote in message news:ud******** ******@TK2MSFTN GP04.phx.gbl... remove the DataBinder... just Eval("name") like my example
or Eval("string{0} ", "name")
or the same using Bind("name") if you nees to pass the value!
it's the way to do in ASP.NET 2.0
--
Bruno Alexandre (a Portuguese in Københanv, Danmark)
"Stephen" <st********@hot mail.com> escreveu na mensagem news:Oc******** ******@TK2MSFTN GP04.phx.gbl... > Hi Bruno, > > Thanks for the info but..... I tried your code suggestion but it still > gives > me this error: > > <Columns> > <asp:HyperLinkC olumn Text="View" DataNavigateUrl Field="UserId" > DataNavigateUrl FormatString="V iewInfo.aspx?id ={0}"> > <HeaderStyle BackColor="#CCC CCC"></HeaderStyle> > <ItemStyle HorizontalAlign ="Center"></ItemStyle> > </asp:HyperLinkCo lumn> > <asp:BoundColum n DataField="Sort Order" HeaderText="Sor t Order" > SortExpression= "SortOrder" > > <ItemStyle HorizontalAlign ="Center" Width="12%"></ItemStyle> > </asp:BoundColumn > > <asp:BoundColum n DataField="Desc ription" HeaderText="Des cription"> > <ItemStyle HorizontalAlign ="Center"></ItemStyle> > </asp:BoundColumn > > <asp:BoundColum n DataField="User Name" HeaderText="Use rName" > SortExpression= "UserName"> > <ItemStyle HorizontalAlign ="Center"></ItemStyle> > </asp:BoundColumn > > <asp:Templateco lumn> > <ItemTemplate > > <%# DataBinder.Eval (Container.Data Item, "Descriptio n") %> > <br /> > <asp:HyperLin k runat="server" id="myLink" text="more..." NavigateUrl='<% # > DataBinder.Eval ("Ruleid", "ViewInfo.aspx? id={0}") %>' /> > </ItemTemplate> > </asp:Templatecol umn> > </Columns> > > > gives me this error: > > DataBinder.Eval : 'System.String' does not contain a property with the name > ViewInfo. > Description: An unhandled exception occurred during the execution of > the > current web request. Please review the stack trace for more information > about the error and where it originated in the code. > > Exception Details: System.Web.Http Exception: DataBinder.Eval : > 'System.String' does not contain a property with the name ViewInfo. > > Source Error: > > > <%# DataBinder.Eval (Container.Data Item, "Descriptio n") %> > <br /> > <asp:HyperLin k runat="server" id="myLink" text="more..." NavigateUrl='<% # > DataBinder.Eval ("Ruleid", "ViewInfo.aspx? id={0}") %>' /> > </ItemTemplate> > </asp:Templatecol umn> > > > > > > "Bruno Alexandre" <br*********@gm ail.com> wrote in message > news:e8******** ******@TK2MSFTN GP02.phx.gbl... >> using templates :-) >> >> templates give you all teh free in the world to add something into the > cell >> in a row... >> >> after the last </asp:BoundColumn > >> add this for example: (just copy/paste) >> >> <asp:TemplateFi eld> >> <ItemTemplate > >> <%#Eval("Descri ption")%> <br /> >> <asp:HyperLin k runat="server" id="myLink" text="more..." >> NavigateUrl='<% # Eval("UserId", "ViewInfo.aspx? id={0}") %>' /> >> </ItemTemplate> >> </asp:TemplateFie ld> >> >> and then tell me the result ;-) >> >> -- >> >> Bruno Alexandre >> (a Portuguese in Københanv, Danmark) >> >> >> "Stephen" <st********@hot mail.com> escreveu na mensagem >> news:OF******** ******@TK2MSFTN GP02.phx.gbl... >> > Hi, >> > >> > Is there anyway I can make a column thats databound into a hyperlink to >> > navigate to another page? >> > Suppose I have 3 columns: SortOrder, Description, UserName >> > >> > for eg: >> > <Columns> >> > <asp:HyperLinkC olumn Text="View" DataNavigateUrl Field="UserId" >> > DataNavigateUrl FormatString="V iewInfo.aspx?id ={0}"> >> > <HeaderStyle BackColor="#CCC CCC"></HeaderStyle> >> > <ItemStyle HorizontalAlign ="Center"></ItemStyle> >> > </asp:HyperLinkCo lumn> >> > <asp:BoundColum n DataField="Sort Order" HeaderText="Sor t Order" >> > SortExpression= "SortOrder" > >> > <ItemStyle HorizontalAlign ="Center" Width="12%"></ItemStyle> >> > </asp:BoundColumn > >> > <asp:BoundColum n DataField="Desc ription" HeaderText="Des cription"> >> > <ItemStyle HorizontalAlign ="Center"></ItemStyle> >> > </asp:BoundColumn > >> > <asp:BoundColum n DataField="User Name" HeaderText="Use rName" >> > SortExpression= "UserName"> >> > <ItemStyle HorizontalAlign ="Center"></ItemStyle> >> > </asp:BoundColumn > >> > </Columns> >> > >> > >> > Instead of having HyperLinkColumn with "View" as text, how can I >> > make >> > "Descriptio n" or whatever column I want >> > into the hyperlink (with the relevant info to display) and navigate it > to >> > "ViewInfo.aspx? id={0} >> > >> > >> > please Advice, >> > Stephen >> > >> > >> >> > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Chumley the Walrus |
last post by:
Inside a datagrid that has editcommandcolumns and such, I'm able to
format a date variable with DataFormatString ="{0:d}" to display a
properly formatted date of 7/14/2004 instead of 7/14/2004 12:00AM. But
I have a datagrid that just displays data, and when using :
<Columns>
<asp:BoundColumn
DataField="mydate"
HeaderText="My Date"...
|
by: Jeff Cook |
last post by:
Hi
I have a DataGrid that I am using to display a .xml file (that has a schema
in a .xsd), like this:-
ds.ReadXmlSchema(sDataPath + "Data.xsd");
ds.ReadXml(sDataPath + "Data.xml", XmlReadMode.InferSchema);
grdXXXX.DataSource = ds;
FormatGridColumns(grdXXXX, ds.Tables); // my routine below.
|
by: Matthew Wieder |
last post by:
Hi - I have a datagrid that has a black header and the rows alternate
white and gray. The problem is that until items are added to the grid,
the grid appears as a large black rectangle, which is quite ugly. The
black area is larger then it is once an item is added. How can I solve
this problem either by:
A) Having only the header black and...
|
by: Roy |
last post by:
Here's my problem for the curious consumption of the group mind... I
have an embedded datagrid which works fine. The child grid is nested
within the parent using a templatecolumn tag. Using the TR html tag I
can get the child rows to appear below the parent rows (i.e.,
"tree-view style"), BUT I can't get the parent rows to display in a
grid...
|
by: hope |
last post by:
Hi,
How can I format a string field using Data Formatting Expression property in
datagrid?
For example: format last name from BROWN to Brown.
Thanks
| |
by: KentEMon |
last post by:
I have a field in my SQL database table which has phone numbers stored
with no "-" character. That is, 4540090 rather than 454-0090. I have a
webform datagrid and wish to display these values in a 454-0090
format(with the "-" character.) I have gone to the Property Builder on
the data grid, selected columns option, chose my phone number column...
|
by: John Dann |
last post by:
I've got what seems to be a common problem with the DataGrid control -
I want to display a dataset one of whose columns (always the first
column) is a datetime column. But only the date displays not the time.
The dataset structure is only defined at runtime so I want to set the
format of just this one datetime column programmatically. Would...
|
by: Horselover Fat |
last post by:
Hi,
I have a column in a database that holds elapsed time in milliseconds
and I want to display that column in a DataGrid in a specific format
(d.hh:mm:ss.fff). However, the closest I can get is d.hh:mm:ss.ffffff.
Code snippets follow:
dt = new DataTable("Errors");
dt.Columns.Add("Occurred", typeof(TimeSpan));
// SELECT statement...
|
by: daz_oldham |
last post by:
I am populating my datagrid 'by hand' by that I mean that i am not
using the wizard!
What I would like to know, is if I can format my colums - for example
if I have a column that is returning 100.0500, how would I get it to
display £100.05.
Also, is it possible to create "total rows" to total up the values of a
given column?
|
by: =?Utf-8?B?Uml0YUc=?= |
last post by:
Hello.
I could not find a Web discussion group (only saw Web Services) so am
posting my question here. I have a C# Web application that has a form with a
datagrid. One of the columns of the data grid is filled with a column from a
table that is varChar(500). I only want to display the first 50 character of
that column. I want to be able to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |