Editing an ASP.NET table control using the Design View in Visual Studio 2008 - asp.net

I have spent a while searching google for an answer to the following question, with no luck.
Does anyone know if there is any way (at all) to use the Design view to edit the contents of an ASP.NET table control (an <asp:Table runat="server">...)?
From all that I can tell, devs are stuck coding their <asp:TableRow>s and <asp:TableCell>s by hand! This is ludicrous, given that you can use the design view as a WYSIWYG editor for standard HTML tables.

In design view go to the properties of your table and select rows and click the button. You can add rows there. Likewise the row properties has a cells property that lets you add cells one at a time.
Still pretty bad but it would cut down on the hand typing.

There is a Rows property you can play with in the design view.
As you add rows to the Rows collection, you have access to the Cell property as well through the dialog presented to you.

Related

Read from sqlserver and insert each line values to a table cell programmatically or from design

I am working on a Dotnetnuke module and i try to read the products i have in my sql server database.
I managed to read the data from the asp tools LinqDataSource and ive inserted them in listview etc. This is now what i need.
The ideal would be if i could read from database my table, and for each row on the db.table to dinamically create a asp:table cell in the design. The asp table ould be 4x5. so 4 columns and 5 rows, and each cell would include an image and the text i load from the database(the image wont load from db, its the same image for all products).
Also if there are more than 20 products then a 2nd page is created with the rest, and page navigation at the bottom.
this is the result i want.
I didnt try much programmatically as i dont really know how to start this. Only from design i tried a few things but they are like a listview so it doesnt help much.
Any ideas or suggestions people?
I managed to make the interface of the picture i provided and made all products clickable, all this from the design view with a ListView.
You can ask if you want any details

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 :-(

Telerik RadScheduler - select multiple resources

I'm using Telerik scheduler to display a Timeline view of meetings. The resources derive from the Person class, and they are Advocate, and Legislator.
On the Y axis, I am listing Advocates, and on the X axis, I am listing blocks of time in one hour increments.
When I double click an appointment, the Edit Appointment modal dialog pops up and lists Advocates and Legislators.
Since meetings will have multiple advocates and possibly multiple legislators in attendance, I would like to have a checkbox list inside the resource dropdowns on the edit screen. Is there any way to accomplish this?
I believe this will allow me to solve one problem in that, if Peter Pan and Homer Simpson both are to attend the same meeting, clicking the meeting in the row for either of those two advocates will display 'Peter Pan' in both instances (or sometimes '-', not yet sure where that comes from) rather than 'Homer Simpson' where I open up the meeting from his row.
If it is not possible to introduce checkboxes to the resources list, can you suggest an alternate way around the ultimate issue in the above paragraph? Thanks in advance.
Telerik supports the adding of a listbox to support what you are trying to do. On the Scheduler itself add the code below that mimics your field names that your advocates are pulling from in your DB:
<ResourceTypes>
<telerik:ResourceType DataSourceID="SqlDataSource2" ForeignKeyField="Adv_AdvocateID"
KeyField="Adv_AdvocateID" Name="Advocate" TextField="Adv_FullName" AllowMultipleValues="true" />
</ResourceTypes>
The next step is to populate the resources using a custom provider. See this program here for a great project in which you can see resource population in action. Using the SchedulerDBProvider class you can then adjust their example to more represent your fields and populate the appointments accordingly with your desired ResourceTypes.
In terms of getting that particular drop down to have multiple selections via checkboxes you would most likely have to define your own custom advanced template. This route allows you to take a UserControl and use that as the edit view for your appointments. There's a demo that displays all of this (including source code) right here.
However, having that RadComboBox there might not even be the ideal approach to take. What about just a simple list of checkboxes? This demo shows off how a very simple declaration for the RadScheduler can achieve this functionality. Additionally, there is some code-behind (both in C# and VB.NET) that shows off how you can customize the text on each appointment, which might be helpful in the case that you're referring to.

Flex DataGrid sequencial inserting

I come from the Delphi school. I was really used and pleased with Delphi grids with the plus features of InfoPower. Not just me, my users loves all features that include grids. Some motives for that are:
With grids they have the ability to insert detail information using only the keyboard. Input, Tab, Input, Tab, Input Tab (automatically insert new row), input, tab, etc.
They were able to simply click in a row and edit it´s data.
They could navigate between records using only arrow keys.
In my flex apps I´ve being working arround this quite often, sometimes using a popup to insert data, sometimes using repeater instead of grid. But now I really really need some intuitive, fast way for my users to insert this data.
I am trying to use DataGrid (or AdvancedDataGrid) with inline editors and I am living a real hell to do that. For the last 3 days I am struggling, tweaking and workarrounding in order to try to mimic the features that I had with Delphi.
Main problems are:
DateField simply don´t work as an inline editor. It gets focus but never looses, only with pressing ESC, wich makes me loose the inputed data.
AdvancedAutoComplete: I have a component descendant from AdvancedAutoComplete with a custom browser. The custom browser is a popup, when I try to PopupManager.remove flex raises an exception of a null pointer inside it´s focus managing engines.
I couldn´t get to insert a new line focused in it´s first column when TABing in the last column of last row.
Having all these problems and not getting substantial material to solve them makes me think the (now obvious) fact that it is just not the way grids are intended to work in flex. My question is: what are the patterns used in flex applications to make sequencial, intuitive, fast, keyboard only insertions in a detail?
To answer your question bluntly, there are no specific established patterns to make editing or inserting data in the DataGrid fast and easy. Not being able to Tab between fields is one of the things I really wish Adobe had added to the DataGrid by default.
In order to get the functionality you want, you'll have to do some custom coding and extend/override the DataGrid's default functionality. Switch On The Code has an example up on tabbing between fields, but you would have to build upon their sample a bit further to include features like adding a new row when pressing tab in the last field of the last row in the DataGrid.
You may also want to consider Flexicious. Based on the Flexicious Ultimate demo, it looks like they have the functionality you're looking for (and then some!).

ASP.Net - Possible to edit multi rows in grid, then save all? PLUS...partial postback of single row with new value retrieval from dataset

I need to implement a grid in asp.net that behaves almost exactly like MS Excel.
- can navigate around with arrow keys
- you can edit the cell that currently has focus by simply typing
- supports checkboxes, dropdownlists, etc
One crucial requirement is....I need to be able to somehow, after update of any cell within a row, pass that updated value back to the server, as there is a calculation process that happens using that updated value that can update other cells in the row, and I need to essentially rebind all the cells in the current row with the updated values resulting from the calculation. AND...when I do this, I want to retain focus on the cell that had it after the update of the former cell. Without grid scrolling, etc, etc.
If you're wondering what I'm talking about, just imagine Microsoft Excel, but I need to perform the formula calculations on the server and refresh all cells in the current row with the results....and, not lose focus of my current cell.
I am more than happy to pay $1000 or whatever it is for one of the full blown commercial ASP.Net grid controls, but from the ones I have tried so far, they seem to not be capable of this, at least I don't know how.
Aspose Grid - would have worked great, except it is totally full of bugs
Telerik RadGrid - a colleague familiar with that grid is trying to figure it out with no luck
Farpoint Grid - looks promising but haven't tried it out yet
If anyone has any advice on how to specifically accomplish this, it would be much appreciated.
Have you tried the extjs sample?
It has a commercial licence, but you can try it for free.
I managed to find an example about Excel-like RadGrid by Telerik - if you are interested in it, you can see it here. And good luck with your implementation.
Did you look into using jQuery for this? Look into jQuery templates and ajax.

Resources