I want to add some text to a boundfield build in the code behind without writing any code in the code behind.
example
I receive "overflow" in a specific field, and i'd like to display "stack overflow" and if i receive "house" i want to display "stack house"
is there a property to put text behind or after whatever comes in the boundfiel...
I receive a certain image name in a boundfield (i have two images in the same folder) and it comes from testing in the codebehind and binding a datatable into this gridview.
example:
it comes as "image1.jpg" or "image2.jpg"
I'd like this text not to be displayed, instead, i want these images that are in
/folder1/folder2 of my solutio...
Hi,
In a page, i put a gridview with several template field columns. In one of the template field, i have a linkbutton. Before postback i bind the grid with data. Once page loads, when i click the linkbutton in gridview, it is not firing the related event and its return a empty aspx page.
...
I'm sure this question has been asked a million times, however I haven't been able to find an answer that solves my problem.
I am programmatically adding some custom user controls to a PlaceHolder which I have on a simple aspx page. All of the user controls Postback's work correctly except for one which has a Gridview on it.
For some r...
I've a gridview in my web form and I'm using a the following code in my web form's Save button:
foreach (GridViewRow row in gvList.Rows)
if (row.RowType == DataControlRowType.DataRow)
{ for (int i = 0; i < row.Cells.Count; i++)
{
string headerRowText = ???;
How can I get the...
GridView1.Columns.Count is always zero even SqlDataSource1.DataBind();
But Grid is ok
I can do
for (int i = 0; i < GridView1.HeaderRow.Cells.Count;i++)
I rename request headers here
but
GridView1.Columns[i].Visible = false;
I can't use it because of GridView1.Columns.Count is 0.
So how can I hide them ?
...
Hi, using Telerik RadGrid* in a LINQ context, with ASP.NET/C#, how to truncate text to a maximum length when displaying in columns? By maximum, I mean if original string's length is shorter than the specified maximum length, no errors will raise.
I have seen many examples of this on the net, but it seems that the Container.DataItem use...
In this test application, I am filtering by two ControlParameters. As you can see in the first codeblock, both parameters have a default value of %. This code works great. However, in the second code block, please note that the Default Values are eliminated. The second code block works as long as neither Textbox's text is blank. For some...
I have a GridView that is populated from a LinqDataSource. When I update a row, the RowCommand fires and the change is persisted to the database, but the Grid does not refresh. I have it in an UpdatePanel and explicitely call Update() in the RowCommand handler, but there is no postback and the page just sits there in Edit mode. Once I cl...
I want to change the font size of my gridview in javascript because i am creating a printable version. How can I change the font size in javascript for the gridview?
...
I have a script that presents results using out-gridview. Here is a simple example:
"hello world" | out-gridview
When I run the script using Run with PowerShell, it will open gridview and close it immediately after it is opened. (I think this is because gridview is not modal and the script finishes.)
How to make the PowerShell wait u...
Hi,
My WPF page has a RadGrid control provided by Telerik. The Grid is a nested grid which essentially means that clicking on the (+) sign on the leftmost column of the row expands the row into a Subgrid. This is being done by specifying a hierarchical grid in my XAML. Everything works just fine when you click on the row and expand the ...
Hello all
Trying a different approach for tooltipping on a gridview using the following code:
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
{
if (e.Row.RowType == DataControlRowType.Header)
{
foreach (TableCell cell in e...
Hey guys, what I am trying to do is add a method to my gridview's sorting event to add a class to the column being sorted so the user can know if the data is being sorted ascending or descending and on what column. I am currently trying to do it through a switch statement on the sort expression to determine what column it's coming from b...
I'm currently using a GridView and I want to set the CssClass for the Row depending on a property of the object that the row is being bound to.
I tried the following but it does not work (see comments):
<asp:GridView id="searchResultsGrid" runat="server" AllowPaging="true" PageSize="20" AutoGenerateColumns="false">
<!-- The following ...
I apologize for the odd title. I've been trying to figure out how to do this and can't quite put it into words. Basically, I need to try to display a GridView with a whole bunch of columns (37 in one case) in two "rows" of columns. More or less.
So instead of this:
Column1 Column2 Column3 Column4 Column5 Column6
Data Data Data ...
For the life of me I cannot bind the Checked property of a CheckBox control within a TemplateField (declaritively).
I have tried:
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="deactivated" runat="server" checked="<%#Eval("Deactivated")%>"></asp:CheckBox>
</ItemTemplate>
<...
I have a set of data that has been displayed as just a simple GridView with the item name being a hyperlink to view details. I'm attempting to update this scenario so certain fields (sortOrder and isApproved) are editable from the main page and do not require visiting each item in the grid.
I have converted the GridView to a DataGrid a...
Hi,
I have an asp:panel and a gridview inside the same panel. (Gridview has paging implemented in it). In IE6 everything is working perfectly. But in IE7, last gridview row comes below the panel..i mean it overflows :(
Please help me .
...
I have gridview with a checkbocx templatefiled as first column. I want to disables the current row if user unchecks the checkbox. How to do this?
...