I do long and slow query to get data to my GridView and I got lot of data, but when I'm changing page it loads as slow as at the start, it loads full data again and again, how to load data once and use paging without data loading ?
thank you
...
A nice good afternoon from Germany,
I have a asp:GridView and ButtonFields on the row with a RowCommand event.
protected void gridView_RowCommand(object sender, GridViewCommandEventArgs e)
{
switch (e.CommandName)
{
case "FirstButton":
this.DoSomething();
break;
case "SecondButton":
...
I have a gridview with one column of checkboxes and other columns with different custom controls .
What I want is that when a checkbox is checked an event is triggered which toggles the visibility of other elements in the row .
...
Hi, in a GridView (ASP.NET/C#), I have a number of template fields - the 2 ones relevant to the question are 'checkbox1' and 'quantity'. The checkbox starts off as unticked for every row, and the quantity starts off as disabled for every row. But when the user ticks one of the rows checkboxes, I need a piece of JavaScript or something to...
I have a GridView that I render to html and export that to MS Word, Excel , PDF etc.
I need to programmatically make column best fit and autosize them to fit their inner text.
Is there is any way to do that?
...
Hi all,
I am working on an attendance system that has the following tables:
Entry
+---------+-----------+
+ EntryID + EntryDate +
+---------+ ----------+
Hour
+---------+--------+---------+
+ EntryID + InHour + OutHour +
+---------+--------+---------+
With the following example data:
Entry
+---------+---------------------+
+ En...
Hi everyone,
Can someone please explain to me how I can include a boundfield (Emp_ID) to the hyperlinkfield (IDNumber) in a code generated gridview using C#? So that the url string would be "'../Pages/Home.aspx?Emp_ID=(Emp_ID)'>(IDNumber)"
Thanks
Snippet code below:
IDColumn.DataField = "Emp_ID";
IDColumn.Head...
Hi, I am using a GridView and I require the user to be able to filter using 2 controls. One simply filters the type of row - there is a column called action, and the user selects one of the distinct values from the database in a dropdown box, and the gridview only displays the rows with that value in the action column. On it's own this w...
I would like to run an if statement but the condition uses a variable from the code behind. How do I call that variable? Side note... I am using a gridview and the variable is in a dataset (dsResult - idnbr colum)
<ItemTemplate>
<% string temp = (Eval("idnbr").ToString());
if (temp.Contains("X")) { %>
...
I have the following (example) column in my GridView:
<Columns>
<asp:BoundField DataField="EmployeeNumber" HeaderText="Employee"
ReadOnly="true" SortExpression="EmployeeNumber" >
<ItemStyle HorizontalAlign="Left" />
</asp:BoundField>
</Columns>
And I want to use that BoundField as a parameter for my DataSou...
Hi all,
Following up on the question here: http://stackoverflow.com/questions/3936389/complex-editing-on-a-gridview-in-c
I have the following example gridview:
What I'm trying to do is that whenever I click on "Edit", the Leaves At column becomes a gridview in which the Hours for the respective date appear. However, I don't know how ...
In the past, I have populated GridView's with 'manually created' data sources in the code behind, by doing this in the Page Load:
DataTable myData = SomeMethod(); //Returns a DataTable
myGrid.DataSource = myData;
myGrid.DataBind();
and whenever I wanted to download the data to a CSV file, I'd just add the following to the button's Cli...
I have a method
private void BindGrid()
{
dataContext = new VTCEntities();
string SortExpression = "DisplayName";
string SortDirection = "ASC";
int skip = 0;
if (this.ViewState["SortExp"] != null)
{
SortExpression = this.ViewState["SortExp"]...
I'm trying to display data which comes from a join on two tables (or more) in a gridview
I want to be able to filter the result set via user given input (text boxes on page)
I have tried the standard tutorials but cannot find something which goes beyond displaying one table result sets in the gridview. If I go through the configure gr...
Hi guys,
Is there a way to display an image on a Boundfield of a dynamically generated GridView where the filename of the image is the data for that column? How can it be implemented?
I have implemented it this way but surely, this isn't right.
column = new BoundField();
column.DataField = "VITALITY_COLOR";
column.HeaderText = "Vitali...
I have a gridview and i want its items to act different if user performs click or long click that is why i am using OnItemClickListener and OnItemLongClickListener but when long click happens both listeners react.I want to perform only OnItemLongClickListener.
...
is there is any way to autoresize gridview columns according to its data ?
...
Hi all,
I have defined the following in my gridview markup (simplified):
<asp:GridView ID="grvReport" runat="server" DataSourceID="odsReport"
AutoGenerateColumns="False" DataKeyNames="EntryDate,EmployeeNumber">
Then I define my datasource's update parameters as such:
<UpdateParameters> ...
I've got a GridView that can be edited. My problem is that when I click Edit, the textbox is too small (the File Name column). It isn't large enough to display its contents, and it isn't as wide as the rest of the column.
How can I make that textbox wider?
Here's the ASP code:
<asp:GridView ID="FileGridView" runat="server" AllowPagi...
Hi
I have a user control "SettingsControl" containing an ajax:CollapsiblePanelExtender which in turn has a GridView (gridView) and checkBoxes. On top of GridView we have two LinkButtons "Select All" and "Clear All". I have written to enable select all and clear all functionality. Select All should select all the rows in the grid by call...