I'm new to MVC, and am not following how you'd do paging and sorting on a grid. I'm used to using the asp.Net GridView control with an ObjectDataSource pointed at objects in our business layer - and in that case the ODS handles all of the paging & sorting using the methods that our ORM generates on the objects.
I've looked at using the...
Can anyone give me a short snippet that, given a GridView that was originally bound to a simple string array, and given a GridViewRow row, will return the value that was bound to the row?
...
We have an app that uses simple one way binding with a GridView to display some data. Well, now we need to allow the user to change some of that data, so I've been trying to get two way data binding to work in the GridView. So far everything displays correctly, but editing cells in the GridView seems to do nothing at all. What am I messi...
Hi,
it seems common issue so I am surprised I didn't find solution already, maybe someone can help me out.
I have a gridview that displays list of users of the app, this list is very big, and takes forever to load the data. Otherwise, data is paged through and once loaded everything goes fine. To help admins, I made search box and that w...
I use a GridView control which uses paging and inline editing. I am not using any other features (no sorting or anything fancy).
What browsers is this GridView control completely compatible with? Is there an "official" document/spec from MS?
...
I have bound fields in GridView to some dateTime property of data objects. The fields are displayed to the seconds level. It looks like 2009-2-3 18:00:00 PM.
I just want it displayed to the minutes. E.g 2009-2-3 18:00.
What is the best way to do this?
Edit:
I find use DataFormatString="{0:g}" is fine for me.
The format is 2009-2-3...
I have a following situation. I have a gridview and I need to dynamically add rows to it. All works fine and dandy. However, lately, I have been curious about making this process faster and more usable. I found a Callback feature in asp.net 2.0.
It seems to make sense for a case when the gridview is used ti display something. Adding a r...
Is there a way to avoid postbacks with gridview every time a row is added to it?
In other words, can I store the DataTable on the client and pass it on to the server control when I am done to save, rather than do postbacks every time the row is added?
I searched and searched....all I could find was web services, JSON, and I have a fee...
Hi folks,
I've already got my custom header drawing in my GridView using SetRenderMethodDelegate on the header row within the OnRowCreated method. I'm having problems trying to add LinkButtons to the new header row though.
This is what the RenderMethod looks like:
private void RenderSelectionMode(HtmlTextWriter output, Control contain...
Hello,
I am trying to implement a master details solution using the jQuery Tabs. Two tabs, first tab contains Northwind Customers, selecting customer command should display tab2 with the orders for the customer.
So far, I have come to the conclusion that it cannot be done without using some sort of Ajax. Am I correct?
I got some point...
Hi,
I am working on a .NET 3.5 web application and i am using GridView.
I want to select multiple rows when the user presses control key and clicks on the row.
If the clicks without pressing control key i want to do only single row selection.
How to check whether user has pressed Control key in javascript and highlight all the selec...
I have a GridView...
<asp:GridView EnableViewState="true"
ID="grdResults"
runat="server"
CssClass="resultsGrid"
OnRowDataBound="grdResults_OnRowDataBound"
AutoGenerateColumns="false"
HeaderStyle-CssClass="header"
OnRo...
I have a GridView bound to an ObjectDataSource. I've got it supporting editing as well, which works just fine. However, I'd like to safely HtmlEncode text that is displayed as we do allow special characters in certain fields. This is a cinch to do with standard BoundFields, as I just set HtmlEncode to true.
But in order to setup vali...
This might be quite a strange question since usually people bind to gridview only complex types. But I need to bind a List of Int (the same is for strings).
Usually, as property to bind one uses the name of the property of the object, but when using a Int or a String, the value is exactly the object itself, not a property.
Any idea of w...
I have a gridview inside of an updatepanel and would like to allow the user to select a row which would generate a call to a class that outputs a stream back to the client. It looks like I can't do this because the grid is inside of an update panel. Any ideas?
C#
protected void gvResults_SelectedIndexChanged(object sender, EventA...
After posting this: http://stackoverflow.com/questions/509029/custom-header-in-gridview
...I have a related problem. I have added the table row during OnDataBound, and it shows up, the links are clickable. There are two problems with adding it here: first, if a postback occurs that doesn't DataBind, the row disappears; second, no events...
Hi,
When I click on a button which is outside of the GridView in my asp.net page, the GridView rowdatabound event is getting fired before OnClick event for the button. I am using the button for custom paging so I need to reverse the order of these events. Any thoughts ??
Thanks in Advance,
- Amit
...
Hi,
I'm having headache with Time values and multiple time zones.
I'm storing new DateTime values in UTC time, but I face problem when I try to modify them using LinqDataSource and GridView.
I can easily show correct time in
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# TimeManager.ToLocalTime((DateTime)Eval("Order...
Hey,
I need to create a gridview based on 2 different datasources: main and sub-cathegory. And I need to list them like below:
Productinfo
sub-product 1
sub-product 2
Productinfo
sub-product 1
sub-product 2
sub-product 3
sub-product 4
Etc... the thing is that both the "productinfo" and the "sub-product" are dynami...
I have setup a GridView inside an UpdatePanel. The GridView has a SELECT CommandField that is tied to Gridview1_SelectedIndexChanged method. I would like the GridView to refresh after a row is selected but it never does. I have tried several different scenarios and none seem to work.
I have set UpdateMode to "Conditional" and "Always"...