Resizable Gridview columns using javascript - asp.net

I want to Resize Gridview columns using javascript. Below is an example.

I think this plugin does what you requested http://www.ita.es/jquery/jquery.grid.columnsizing.htm
Though I would suggest checking out this customizable jQuery based grid aswell http://www.trirand.com/blog/

I would recommend using jQuery if you want to do this yourself. You can grab the click event of the header row (or wherever you want), and then you can use the x/y of the mouse to drag a line. Once the mouse is released, you can troll through the table and reset the width of the 's.
Otherwise, there are several JavaScript table controls on the internet that you could use.

You can try open-source project ASP.NET CoolGridView control. It works well with IE 6/7/8, Firefox 3.0 / 3.5, Safari and Chrome. Supports resizable columns and fixed headers.
http://johnsobrepena.blogspot.com/2010/02/coolgridview-february-2010-release.html

The example you are refering to is using ExtJS it looks like. There's also jqGrid (an extension to jQueryUI), and others. If you are looking for an ASP.Net Ajax grid control there are several options from many different component vendors (Component One, Infragistics, DevXPress etc).
I'm only presuming here that you want a server-oriented Grid component because of the term "GridView" in the question. I would suggest searching for: "ASP.Net Ajax" grid control. This will give you results that may best suit your needs.

Related

Dynamic grid using wpf devexpress

I m having situation whhere i need to add text box in grid control cell just like we add button in the cell but the text box should open a small window when click .User should be able to fill enteries in that window.
This is possible in extjs but can anyone please tell how to achieve this with devexpress controls.Please find the screenshot of the same.
DevExpress provides a workaround for WPF platform: PopupContainerEdit for WPF, whats the status?
This solution is valid for WinForms platform only
DevExpress has the PopupContainerEdit editor that supports in-place mode. This editor is very handy to implement the functionality you described.
To make it work properly in in-place mode, handle these two events:
PopupContainerEdit.QueryResultValue Event
RepositoryItemPopupContainerEdit.QueryDisplayText Event
The result value will be passed to the cell where the editor is located. It is a bad practice to modify data manually after closing the pop-up window.

Programatically expand or collapse Telerik grid with detail view

I am using a Telerik grid with a DetailView.
I have the grid rendering correctly, but I was wondering if there is a way to collapse/expand all rows programatically using Java Script?
It works if I do it manually one by one, but I would like to offer a master expand/collapse button for all rows.
Found a solution here:
http://www.telerik.com/community/forums/aspnet-mvc/grid/expand-collapse-all-detailviews-in-a-grid.aspx

Changing the Telerik MVC Grid columns dynamically on client-side

I would like to show my table data in grid. The table has more than 50 columns. By default they are displayed fine but I need a way to hide/show columns which are not required on screen.
So is there any way to achieve this? I think right clicking on the header should show all headers in a list box, allowing selection of which columns we want, then refresh the grid.
Please let me know if Telerik supports this and, if so, how?
No builtin feature available and this is one of many reasons why we are still thinking about other grids instead of telerik.
In the demo site there is a page where they show all the column names with checkboxes on top of the grid and you can check/uncheck to show/hide columns. see that sample source code, is simple to implement but still is custom code to add manually. I love the devexpress grid with customization popup and columns dragdrop from there but nothing like that for us in Telerik :-(

How to make an entire jqGrid disabled/readonly

How can I make an entire jqGrid disabled/readonly?
I have a page with a logical "edit section" which I show when the user selects something to edit, and hide when the user is done editing (save or cancel). While the edit section is shown, I disable several other elements on the page. I would like to disable their ability to click in the jqGrid, so they can't change selected rows, re-sort, etc. But I cannot find a way to disable/enable the grid as a whole.
Apologies if this has been answered already - other questions seemed to focus on disabling only certain behaviors within the jqGrid.
Edit: Preferably, I'd like an approach that isn't dependent on yet another 3rd-party addon. Nothing wrong with them, of course! But my client has a degree of reluctance with them, so my life would be a little easier with a purely jQuery/jQueryUI/jqGrid solution. :)
You could use blockUI to block the grid.
Try using $("#lui_" + myGridId).show().
The grid has created this overlay internally an uses it as one part of the loader message.
You can just show it or hide it and it will disable/enable the grid for you.

Modal Pop-up Image Viewer for Asp.net

I am looking for a control which can show me selected image detail view which is actually gonna be bigger image in a modal pop up to show a better view of image to my customers. You know those standard modal pop-up resizeable to selected image original size. Dynamicly resizable modal pop-up is actually what I am looking for and of course it should be for Asp.net (if possible for 3.5)
I've searching for a while but I haven't been able to come up with a acceptable solution yet.
Thanks in advance.
Although not asp.net, but rather javascript based, Lightbox is the granddaddy of displaying a popup with a larger image. http://www.lokeshdhakar.com/projects/lightbox2/
There are many other similar open-source client-side 'controls' that would do what you want.
You may also need to roll your own from jQuery of YUI to build the resizeable requirement that you want.
You might want to have a look at Telerik:
http://www.telerik.com/products/aspnet-ajax.aspx
The have some controls that would probably get the job done.
Otherwise search for Infragistics, they have similar controls.

Resources