How to disable the gridview rows border - asp.net

Can we disable the gridview horizontal line ? I want to display grid without horizontal lines
help me thank you.

Set GridLines="None" on your GridView

Setting both:
BorderStyle="None"
and
GridLines="None"
on your Gridview will remove all of the lines.

use this code for your GridView to disable lines
GridView1.GridLines = GridLines.None;

The GridView renders as a table so wrap your GridView in a <div> with a class that sets the border of all contained <td> to 0
Kindness,
Dan

Try using this:
BorderWidth="0px"

Related

How to put an Vertical scrollbar within asp:Repeater ItemTemplate?

I have inherited an .ascx control that consists of an asp:repeater construct containing a HeaderTemplate, an ItemTemplate and an empty FooterTemplate.
Both the header and the item templates are linked to a data source.
My question is simply this, I want to have a vertical slider applied to the ItemTemplate such that I can scroll up and down the items contained within whilst the HeaderTemplate remains static.
I have tried using an asp:Panel within the ItemTemplate but this doesn't render the row within the template.
I've resorted to encapsulating the whole of the asp:Repeater within an asp:Panel that specifies a vertical scrollbar. This works but scrolls the header out of view if the number of rows in the ItemTemplate is large.
If anyone can help and suggest a way forward I would be most grateful.
It can be done in a simple manner with some CSS tricks e.g.
Repeater Item Template Markup
<HeaderTemplate>
<div class="template">
</HeaderTemplate>
<ItemTemplate>
Your Stuff
</ItemTemplate>
<FooterTemplate>
</div>
</FooterTemplate>
CSS Defined for "template"
.template {
height: 200px;
overflow-y: scroll;
}
Hope this will help !!

Textbox not displaing all the text?

I have a telerik RadTextBox, in which i want to display one line, the problem the content is a little bit scrolling and don't display all the text, how can i fix it. thanks in advance.
try to use textmode="singleline"
<telerik:RadTextBox runat="server" ID="txtbox1" TextMode="SingleLine"></telerik:RadTextBox>

Div produced from an ASP.Net GridView is too large

I have an ASP.Net GridView with properties like so:
<asp:GridView ID="grdOrderEntry" runat="server" AutoGenerateColumns="false" ShowFooter="True"
DataKeyNames="oid" Height="100%">
When I view the control in the browser, there is a lot of white space after the control. When viewing the HTML, the div that is produced by the GridView is much larger than the control, causing the whitespace. Is there a property I can set on the GridView to make the div as small as possible?
If you set the CssClass property you will be able to create some css to address the problem. I would recommend using a live css editor so you can mess around with it until you get the desired effect.
I suspect this is being caused by your Height="100%" attribute, remove that, and it should just stretch around the table it contains (unless there is some css other style added to it as well).

Telerik Grid Row color

Is the only way to change the background color of a row based on data on the Telerik grid by doing it in the ItemDataBound event? I have a grid that a huge amount of data and it is taking a really long time. I have a property in the data row that tells me what color the row needs to be. I would like to be able to dynamically set the css class at runtime.
Thanks,
Rhonda
You should be able to change the row color using ItemStyle and AlternatingItemStyle:
<MasterTableView AutoGenerateColumns="false" ShowFooter="true">
<ItemStyle BackColor="PeachPuff" />
If you are looking to specifically change the style of the row during the OnItemDataBound event I recommend that you look at this documentation article from the Telerik online documentation. It covers how you can set inline styles from the code-behind, or use predefined CSS styles and apply them to the rows.

Asp.net - How to introduce scrolling in gridview control

I am using Vb.net for coding. I have a grid view control in which i want to introduce a vertical scroll bar if the value from the sql query overflows. How do I go about it?
You could place the gridview in a div with the following style:
overflow: auto; height: 80px;.
The following markup should do this. You'll need to change the height as required.
<div style="overflow-y:auto; height:200px">
<asp:GridView ID="GridView1" runat="server" >
</asp:GridView>
</div>

Resources