I am trying to add paging to the data that I am displaying on screen, but it doesn't work. Whenever data is returned it is always the complete dataset (over 100 records, which should produce a page for every 10 records), and it always starts on page number 0. Here is my code :
XSL :
<?xml...
Is it possible to create a table with gridlines like a .NET control, rather than just setting the border to greater than 0?
Here is the XSLT I am trying to do this with :
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"...
I've been working with the gridiview control for a few weeks now, and I saw some code like this :
<ItemTemplate>
<asp:Label ID="lblTarget" Text='<%# GetTarget(decimal.Parse(Eval("Target", "{0:###0.00}").ToString())).ToString("N2") %>' runat="server"></asp:Label>...
I've been working with the gridiview control for a few weekd now, and I saw some code like this :
<ItemTemplate>
<asp:Label ID="lblTarget" Text='<%# GetTarget(decimal.Parse(Eval("Target", "{0:###0.00}").ToString())).ToString("N2") %>' runat="server"></asp:Label>...
Is it possible to perform calculations on data in your gridview in your ASP, or do you need to do any calculations in the OnRowDataBound event? Here is what I am trying to do :
<asp:TemplateField HeaderText="Target (%)" SortExpression="TargetPercentage">...
I am using a SqlDataSource with a GridView and stored proc, and I have specified exactly the same update parameters for the SqlDataSource in exactly the same order as my stored proc. Yet I keep getting the error 'Procedure or function <stored procedure name> has too many arguments specified'...
I have some code of my own where I am checking a username/password against a database for login, I am not using any of the login controls etc. What I want to do next is to create a folder for my admin pages and make it only available to administrators. At login I set an int which if an admin...
I am using the following code to export my gridview to excel :
protected void btnExport_Click(object sender, ImageClickEventArgs e)
{
Response.Clear();
Response.AddHeader("content-disposition", "attachment;filename=FileName.xls");
Response.Charset = "";
//...
How do you add an update parameter as an output parameter? Here are my update parameters :
SqlDataSource1.UpdateParameters.Clear();
SqlDataSource1.UpdateParameters.Add("ForecastKey", TypeCode.Int32, intID.ToString());
SqlDataSource1.UpdateParameters.Add("UserKey"...
How do you get access to the values you have entered under edit mode in a gridview? I only seem to be able to access the values prior to them being edited.
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
// 1)Convert the row index stored in the...
Sorry, ANOTHER question..but I've nearly finished what I'm trying to do now ;)
Where exactly are the updateparameters of a gridview picked up from? I have created 2 very similar gridviews and given the updateparameters the same names as in my edititemtemplates. Yet this method has worked for...
How do you disable the edit button for selected rows in a gridview? Here is my button :
<asp:CommandField ShowEditButton="True" ButtonType="Link" ShowCancelButton="True"
UpdateText="Update" EditText="Edit" CancelText="Cancel" />
Is it possible to make an editable gridview so that certain rows are editable and other are not editable, dependent upon a value in one of the rows columns?
What date format does the Compare Validator check against? The date format of the web server or of the client?
<asp:CompareValidator ID="CompareValidator2" runat="server"
Display="None" ErrorMessage="Please enter a valid date in format dd/mm/yyyy"...
I have a datetime field that I want to convert to dd/mm/yyyy format in my query. I have tried to cast as varchar for dd, mm, yyyy, but I don't get the leading zeroes. Can anybody help?
I have an editable gridview that I want to add a calendar to in edit mode, but I don't want it to change the formatting of the rest of the row. Is it possible to perhaps add an imagebutton which when clicked will open up a calendar for editing on top of the gridview rather than inside it?
Any...
I have a gridview and label that I only want to show if there are any records in the gridview, if there are no records to show I want them to both be invisible. Given that I'm not using any code for my gridview only declaring it within the ASP, how do I do this?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.