Remove Underline From Gridview Buttonfield?
Mar 12, 2011
I have a GridView ButtonField and would like to remove the underline. The FontUnderline="False" does not work! I also tries adding text-decoration:none; to the CssClass and that does not work either.
<asp:ButtonField DataTextField="OSTA_OrderStatus" HeaderStyle-ForeColor="White"
HeaderText="File <br /> Status">
<HeaderStyle Width="6%" />
<ItemStyle CssClass="sessionOrderDownloadItems" Font-Underline="False" HorizontalAlign="Center" />
</asp:ButtonField>
My CssClass is coded as follows:
.sessionOrderDownloadItems
{
font-family: Arial, Verdana, Helvetica, sans-serif;
font-size: 12pt;
font-weight:bold;
height : 18px;
vertical-align:middle;
text-align : center;
}
View 2 Replies
Similar Messages:
Apr 14, 2010
I have an email address in a cell in a table like so,
[URL]
1. Is it possible to to remove the underline from the emaill address above?
2. If 1 is not an option, how do I make the underline the same color as the text? I selected the entire text and made the forecolor black but the underline remained as blue.
View 4 Replies
Jan 7, 2011
how can i giv style for BoundField.
am using BoundField in gridview. it shows a underline and a unwanted color.
how to remove underline and color.
View 1 Replies
Jun 15, 2010
I am using an asp:linkbutton control. When it displays I don't want it to display as underlined. How can I remove the underline from the button. I know underline implies hyperlink, however for my problem I don't need the underline to show.
View 4 Replies
Jan 24, 2011
am stuck in a very simple problem but couldn't find a way to get rid of it.May be I clicked somewhere in my web application that is now a cause of underline every label, cell of table or whatever typing in it.how to remove default underline,
View 5 Replies
Oct 3, 2010
I have a hyperlinkfield in Gridview control. I am using the below shown stylesheet for the gridview.But for some reason, the hyperlinkField column in the gridview is not in blue color and there is no underline.How can I display the hyperlinks as regular hyperlinks as blue in color and underline?
/* table style */
table.BlueGridView
{
font-family:helvetica,arial,sans-serif; [code]....
View 1 Replies
Feb 3, 2010
I would like to ask how can i make the gridview just underline the first column by using the rowdatabound.
Currently my code using as below:
protected void gvResult_RowDataBound(object sender, GridViewRowEventArgs e)
View 3 Replies
Aug 2, 2011
I'm currently using a RESPONSE.REDIRECT but I want to open to a new window using VB.NET.
Code:
Protected Sub gridREPORTS_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles gridREPORTS.RowCommand
If e.CommandName = "View" Then
Dim row As GridViewRow = gridREPORTS.Rows(Convert.ToInt32(e.CommandArgument))
Session("Reports") = row.Cells(0).Text
Response.Redirect("DisplayReport.aspx")
End If
End Sub
View 3 Replies
Feb 17, 2011
AllowSoting is true on every column of my gridvieww.
i want to remove those underlines in everycolumn ...
how can i do that?
View 3 Replies
Apr 7, 2010
This is the grid
<asp:GridView ID="annonceView" runat="server" AutoGenerateColumns="False" DataKeyNames="Id" DataSourceID="dataSourceAnnoncer">
<Columns>
<asp:BoundField DataField="Productname" HeaderText="Productname" />
<asp:buttonfield buttontype="Link" commandname="Delete" text="Delete"/>
<asp:TemplateField HeaderText="Administration">
<ItemTemplate>
<asp:LinkButton ID="lnkBtnDelete" runat="server" Text="Delete" CausesValidation="False" CommandName="Delete" OnClientClick="return confirm('Delete?')" />
/ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:LinqDataSource ID="dataSourceAnnoncer" runat="server" ContextTypeName="Namespcae.TheContext"
EnableDelete="True" TableName="Annoncer">
</asp:LinqDataSource>
Clicking the buttonfield deletes the record just fine. Clicking the LinkButton doesn't work. I get a postback and the grid is shown as empty and no record is deleted. Seems like an empty databinding. I have tried to create a custom OnClick, OnCommand event for the LinkButton, but neither are fired. The OnRowCommand isn't fired either.
I don't manually DataBind in the codebehind.
View 2 Replies
Feb 22, 2010
I am trying to insert a buttonfield at the end of the datagrid. I am using the following code. However, it is getting inserted at the beginning of the datagrid.
DataTable consolidatedDataTable = PortfolioManagement.Portfolio.GetConsolidatedPositionsDataTable(userName, portfolioName);
gridViewConsolidatedPositions.DataSource = consolidatedDataTable;
gridViewConsolidatedPositions.DataBind();
ButtonField buttonField = new ButtonField();
buttonField.Text = "Hedge with Stock Options";
gridViewConsolidatedPositions.Columns.Add(buttonField);
gridViewConsolidatedPositions.DataBind();
View 1 Replies
Oct 26, 2010
I know there are a number of posts along this topic, but everything I find seems to not have a final solution or else I'm just not getting what the solution is. I have a simple GridView with a ButtonField and a BoundField. I'm having the same problem most of the other posts seem to have; I can retrieve the BoundField value easy enough in the RowCommand subroutine, but I can't figure out how to get the value of the ButtonField. Here is the code I'm trying to use:
[Code]....
sAddr is being set to the correct address value, but sName is set to an empty string no matter what I try. The GridView HTML all works correctly, including showing the names from my bound data table on the button text. I can use to retrieve the ButtonField text value?
View 2 Replies
Jan 20, 2011
I want to have two asp:buttonfield buttons in one cell. I have to be able to access the Gridview.SelectedRow. And I don't seem to be able to add a asp:buttonfield to a templatefield.
View 3 Replies
Jul 28, 2010
A bit new to buttonfields in gridviews - Did a bit of research and most of the stuff I came up with had the gridviews with data bound like so :
[Code]....
private void BindGridControl()
{//method created so that the binded gridview can allow paging controls
DataTable dt = new DataTable();
try
{
/*Gridview requires another column either a checkbox or a hyperlink column that
* can drill down another level and load a page where user can edit the data/cheque
* Will place an exception here that will prompt a window to notify users that
there were no rows returned
*/
GridView1.Visible = true;
sqlConn.Open();
sqlSearch = "select store_nbr as [Store number],date as Date,data_type as [Data type],acct_1 as [Account 1], ";
sqlSearch += "amt_1 as [Amount 1],acct_2 as [Account 2],amt_2 as [Amount 2], ";
sqlSearch += "acct_3 as [Account 3], amt_3 as [Amount 3], cheque_nbr as [Cheque Number], ";
sqlSearch += "cheque_amt as [Cheque Amount], gst_hst as [GST/HST], qst as [QST],comments as [Comment] ";
sqlSearch += "from SimpData where store_nbr = '" + StoreNum + "'";
sqlCmd = new SqlCommand(sqlSearch, sqlConn);
SqlDataAdapter adapter = new SqlDataAdapter(sqlCmd);
adapter.Fill(dt);
if (dt.Rows.Count > 0)
{
//if there are rows returned bind the datasource to the gridview
GridView1.DataSource = dt;
GridView1.DataBind();
}
else
{
//label control notifies user that there are no rows found
lblResults.Text = "Search returned no rows";
}
My ButtonFields<Columns>
<asp:ButtonField ButtonType="Button" CommandName="Select" HeaderText="Select item"
ShowHeader="True" Text="Select1">
<ControlStyle Width="50px" />
<HeaderStyle Font-Size="XX-Small" />
</asp:ButtonField>
<asp:ButtonField ButtonType="Button" CommandName="Select" HeaderText="Select item"
ShowHeader="True" Text="Select2">
<ControlStyle Width="50px" />
<HeaderStyle Font-Size="XX-Small" />
</asp:ButtonField>
<asp:ButtonField ButtonType="Button" CommandName="Select" HeaderText="Select item "
ShowHeader="True" Text="Select3">
<ControlStyle Width="50px" />
<HeaderStyle Font-Size="XX-Small" />
</asp:ButtonField>
</Columns>
[Code]....
View 7 Replies
Aug 25, 2010
I have a gridview with a column for tracking numbers. I would like for the user to be able to click the tracking number in that column and it open another browser window to the site with the tracking information. I have tried Hyperllinkfield and I cannot get it to open the website.
View 7 Replies
Jan 18, 2011
I have a gridview with a ButtonField. When I leave the button type as the default LinkButton, clicking that button fires the RowCommand and everything works as expected. As soon as I change the button type to ImageButton and assign an ImageUrl, clicking that button does not fire the RowCommand.
View 4 Replies
Mar 3, 2011
How to make hyperlink field or buttonfield pop up a window and redirect to a new page at the same time? so far it can only redirect to a new page, but target is also to pop up a child window when try protected void Cheque_GridView_RowCommand(object sender, GridViewCommandEventArgs e) can not find a way to add attribute to button to use javascript to pop up a child window <asp:HyperLinkField Text="Select" DataNavigateUrlFields="BatchNo, BankCode, ChequeDate2, IssueDate2, CompanyCode, VoucherBatchNo, VoucherNo, ChequeID, ChequeNo, PaymentType, DespatchType, DespatchDate2, Curr_Code, Amount"
datanavigateurlformatstring="~/Edit_Batch/AddCheque.aspx?BatchNo={0}&BankCode={1}&ChequeDate={2}&IssueDate={3}&companycode={4}&VoucherBatchNo={5}&VoucherNo={6}&ChequeID={7}&ChequeNo={8}&PaymentType={9}&DespatchType={10}&DespatchDate2={11}&Curr_Code={12}&Amount={13}" />
View 1 Replies
Jul 1, 2010
I have 2 gridviews in an aspx file. The First one is master grid, and the second one is detail grid. (such as Customer and it's Invoices) First, I load data into master grid. I use FireBug and notice that every row has it's row id, such as:
<tr onmouseover="javascript:SetRowColor('ctl00_ContentPlaceHolder1_grdResult_ctl02',0);"
id="ctl00_ContentPlaceHolder1_grdResult_ctl02">
.....
</tr>
Then, in master grid, I select a buttonfiled in a row to load the second gridview.Every thing alright, the second grid has it's row id But The master grid lost all row id that I dont know the reason why?
View 3 Replies
May 3, 2010
I have a button with access key set. I need to show users the hot key of that button, so that hot key needs to be underlined. I've tried all the available possible solutions given in the web like, putting & before text, using submit button and few others did not work on my machine absolutely. I'm using Visual Studio 2008 with IE6. I can only use IE6. If I use , then the text displays with &.
I cannot use Submit button because I've a huge set of javascript validation that is performed before firing the server side event. Since the submit button cannot be returned using Javascript, I cannot use it.
View 4 Replies
Mar 25, 2011
underline text in button how?
View 14 Replies
Apr 20, 2010
how to set an access key for controls using the associated label but I can't figure out how to underline the appropriate letter so the users know which key to use.
View 4 Replies
May 15, 2012
I have linkbutton in my datalist i want increase space between text and underline in my link button how i can do it?
View 1 Replies
Oct 28, 2010
I want to save the contents from HtmlEditor(Ajax Control) into a database field.
If i try to save as VARCHAR than error comes as data too long.
View 1 Replies
Apr 3, 2010
I want to add my own set of functions into my GridView. For example, I have a help desk management module that displays all the help desk tickets in a GridView. When the tech is finished supporting the customer, I want him/her to click the "Close Ticket" link in the GridView to close the ticket.
I've never used the ButtonField feature field before so I thought this would be perfect but I'm a little confused about getting the TicketID in the GridViewCommandEventArgs method. I thought I could just put the TicketID in the CommandArgument and pull it from there but looks like I can't do that as ButtonField is not giving me the CommanArguement option.
I'm not displaying TicketID's in the GridView because they're "uniqueidentifier" datatype and look ugly. How do I pull the TicketID if I were to use a ButtonField? Or is there a better way to do this?
I already have a method in my DAL expecting the TicketID so all I'd have to do is get the TicketID and call this method.
View 8 Replies
Sep 23, 2010
I have been trying to work this out for ages but nothing seems to work.
I am using a database as my source of data, I then fill a Datatable with the restult and bind it to my gridview cntrl.
Here is my code.
Code:
[code]....
Everything works except the button image. All I need to do is make it so that the ButtonField.imageurl is loaded from my database. I dont want one picture for all I want a specific one.
View 39 Replies