gridview

Custom Naming Container for ASP.NET GridView?

I'm looking for information on how to implement a custom naming container for the items in a GridView. My issue is that I have a GridView with a cell for each day of the week, and each cell will contain the same or similar controls. For the controls that are the same, it'd be nice to name them all the same, such as "lblPersonName". Ho...

Change item sortorder in gridview - LINQToSQL

Hi, I've got a gridview with a list of categories. In the database (MSSQL2008), the category table has a SortOrder(INT) NULL field. Currently categories are retrieved using: Galleries.DataSource = From G In DB.GalleryCategories Order By G.SortOrder, G.Name Now, what I need to be able to do is add "Move Up" and "Move Down" buttons to...

Visible='<%# UserCanEdit %>' – if set to true inside Page_Load, then control isn't visible

hi User control defines a property named UserCanEdit: private bool _userCanEdit=false; public bool UserCanEdit { get { return _userCanEdit; } set { _userCanEdit = value; } } This User Control also contains the following GridView: <asp:GridView ID="GridView1" runat="server"> <Columns> <asp:TemplateF...

GridView Checkbox Columns vs. Events

I have created a gridview with a column of checkboxes. I want the user to select the checkboxes, click the register button (outside the gridview), and have a title from the selected row displayed. From what I've read I should put the checkbox check in the button click event. I have done so, but apparently the only time it enters that ...

DateTime update field in C# GridView.

Hi, I'd like to split apart a DateTime for both display and update within a GridView. How do I recombine them in the UpdateParameters of the SqlDataSource? For instance <asp:SqlDataSource ID="uxTravelTripMeetingDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:MGO %>" ProviderName="<%$ Conne...

Where are the margins/padding set on a wpf ListView GridView?

I've got a WPF ListView/GridView spec'd in XAML. The first column uses a CellTemplate to specify icons and the others use DisplayMemberBinding to populate themselves. The icons column is 20 wide, the icons 16 but they're getting truncated by margins/padding/something. I can't work out where it's set. Here's the essentials (I've remov...

Whats the best way to rotate images after a user interaction

I'm wondering what would be the smoothest way to change an image on a web page after a user action. E.g Say a listbox contains a list of book titles. each time a user clicks on a title I want the book cover associated with that title to display in a panel. The data in the listbox is from a dataset which also contains images for each row....

GridView in ASP.Net -- Selecting the correct row

I have a page that includes a GridView in it. That GridView is paged with 10 items at a time. Normally, I want the user to select the item from the GridView and populate the FormView. This works well. I also want to support a query parameter ?ID=n where the page will load the specified item. How do I tell the DataGrid or the data sou...

updating database from checkbox using ajax

im trying to update my database from the checkbox in a grid view. i want to do it using ajax so that the page doesn't have to refresh everytime i click o the checkbox. how am i supposed to do that? ...

GridView AutoGenerateColumns and sorting

Hi, question about gridview sorting in VB.NET: I have a gridview with autogenerate columns = true <asp:GridView ID="GridView1" FooterStyle-BackColor="Aquamarine" AutoGenerateColumns="true" AllowSorting="true" OnSorting="Gridview1_Sorting" AllowPaging="True" PageSize="12" OnRowCreated="GridView1_RowCreated" RowStyle-Wrap="true" ...

Display new form based on GridView data

Hi All, I have a GridView, radGvA133s, on my main form, MainForm. I would like to be able to double-click on a row of the GridView and have that open up a new form, A133Form, to allow editing of the selected row. Here is the double-click code: private void radGvA133s_DoubleClick(object sender, EventArgs e) { A133 oA13...

GridLines Color in IE and FF

I have gridlines set to true on a gridview, i want the lines to be grey. By default, the lines in IE appear grey, due to my stylesheets; but in Firefox, there is a dark line separating the header columns. I have tried adding this.GridView1.Attributes.Add("bordercolor", "#ddd"); This fixes the FireFox issue, but in IE it shows the dark...

GridView Columns are created -generated- when?

Hi! does anybody know when the columns are generated of a GridView? After what event? Basically, when I put a breakpoint on RowCreated event handler of my gridview, I can see each time .Rows count is incrremented. But When I check. .Columns.Count property it is zero. so, even my autoGenerateColumns porperty set to true, why the Column...

Get drop downs in a header row in a gridview

I have been experimenting with adding some filters to a gridview header row. If the dropdowns are on the page, everything works fine. Moving them into the grid has introduced so many problems its shocking. The drop downs are bound to data at runtime as the data in them is dynamic. These values are set only on the initial load and retai...

Export Gridview to Excel with rows formatted as text

I have read serveral tutorials online and seem to be missing something. I am trying to have the leading 0's show up in columns by setting the format to text. Any suggestions would be appreciated. ''' <summary> ''' This is required for the grid view to export properly ''' </summary> ''' <param name="control"></param> ...

With 2 nested gridviews with large data sets each what's the most optimized way to implement

Say I have 2 tables in a database, each with 100,000's of rows in detail and 10,000's of rows in the master 5 columns each, properly indexed and related. I want to have master/detail nested gridviews. What's the fastest architecture I could design in .net to do this? The largest result set on the master could be in the thousands (usua...

Gridview's list of page indexes are spread apart

I have an ASP.NET GridView with paging enabled. The list of page indexes are not listed close to each other. Instead, there's like 80px between each page index. Is there a property which controls this? ...

How to highlight a row in gridview?

My applications sends emails to users, with a hyperlink for an aspx page. There is a guid in the get string. The aspx page shows gridview with rows accross multiple pages. My requirement is when the link is clicked the user should be directed to appropriate page and the row with mapping to guid should be highlighted? Please help, its ur...

Lost indexes after sorting

Hi, I have to add a color to particular rows of DevExpress gridview. There is an event RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e). It works fine but if I sort the data, good indexes are lost. How to solve this problem? How to access the sorted data because I only can access datasource. Thank you. Here is ...

problem binding gridview 's bound columns datafield using the column name of my datatable

I'm binding my gridview's bound columns with datafield using the column name of my datatable. The problem is we have a scenario we need to put in a text where the datafield was int with value 0. I couldn't see any work around. Is there any easy way to do this? ...