473,714 Members | 2,434 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Q: How to use DataGrid in Edit Mode -- with more fields than shown?

Sky
Hello:
Another question about trying to wring functionality from a DataGrid...

Have a DB table of "Contacts" -- 14 or more fields per record
Show in datagrid -- but only 5 columns (First,Last, Fax, Phone, Category).
Put an Edit column at the end...

Now what?!
If you go into Edit mode -- you can only edit 5 cells -- not all the rest of
the Record's fields...not enough!

What options are there?
How to -- elegantly -- replace the Edit line with a nice mini custom form
(vertical layout, not horizontal as in the DataGrid)... Can this be done
with a DataGrid (override a single row's Render() with another scenario --
yet somehow figure out the values on return? I've seen that you can make
your own BoundColumn:Edi t template -- but since it's for one column, you
can't very well use it to Colspan the whole grid, and use it....

Question: Is there a DataGrid:Edit template that could be used for this?
Question: Is this where I should be looking at another control to do the
job? DataList? DataRepeater?
Question: Is there where most people popup a modal form? If so, how are they
catching the close of it to refresh the grid?


Nov 18 '05 #1
2 2336
A sugestion
========

In this senario, The numbers of coulms you are showing should be updatble.
There is no problem..

I f you want to update more no of fields you are showing, you can give a
link to another editpage.aspx which would take the primary key of the record
clicked and show you all the necessary fields for update....

I think this is the better approach.

Questions:
======
Why donot you show fields but want to update them?
Is it of space problem in dispalying all your fields???
Is there any security issue that prevetnts you from displayng...

let me know pl.
Thanks
Madan
"Sky" <ne********@nos pam.xact-solutions.com> wrote in message
news:uD******** ******@TK2MSFTN GP09.phx.gbl...
Hello:
Another question about trying to wring functionality from a DataGrid...

Have a DB table of "Contacts" -- 14 or more fields per record
Show in datagrid -- but only 5 columns (First,Last, Fax, Phone, Category).
Put an Edit column at the end...

Now what?!
If you go into Edit mode -- you can only edit 5 cells -- not all the rest of the Record's fields...not enough!

What options are there?
How to -- elegantly -- replace the Edit line with a nice mini custom form
(vertical layout, not horizontal as in the DataGrid)... Can this be done
with a DataGrid (override a single row's Render() with another scenario --
yet somehow figure out the values on return? I've seen that you can make
your own BoundColumn:Edi t template -- but since it's for one column, you
can't very well use it to Colspan the whole grid, and use it....

Question: Is there a DataGrid:Edit template that could be used for this?
Question: Is this where I should be looking at another control to do the
job? DataList? DataRepeater?
Question: Is there where most people popup a modal form? If so, how are they catching the close of it to refresh the grid?



Nov 18 '05 #2
Sky
Dear Madan:

The scenario I was envisioning was the following:

One 'app-module' called QuickPhoneList of members of the company. For a
quick lookup, most people just need the phonenumber/extension -- not the
rest of the info on that person, such as DateFirstHired, etc. This kind of
information is useful for other reports -- but not for the data that is the
QuickPhoneList. ..

Therefore, you only need to show 4 or 5 columns for this basic info -- but
when the user wants to update his entry, the form should be more complete.

I hear you as to linking to another EditPage to handle this -- I've seen it
also done as a popup...

But it appears to me that it should also be possible to custom design the
rendering of the grid to 'collapse/hide the EditRow -- and inject an empty
row, colspan = full, just below it to hold the mini edit form. The reason I
am thinking in this direction is that if the num of fields is minimal -- eg:
10 or so, but also it won't fit in the 4or5 columns we mentioned, maybe it's
not always a good thing to completly lose their place in the grid (could be
3 pages in on a paged query?) and visual context, to move them to a edit
page just to handle this...

Plus - I sort of have been feeling that a 'module' should be contain all
it's pieces: the View, the Edit, the Settings. Independant from the rest of
the framework of the pages...
If that idea doesn't have too big a flaw to it, then maybe it should be
possible, and possibly quite sexy to inject a mini form there. Of some
kind. Somehow....

Thinking about it a little more, if it can't be done by injecting a
ColSpan=full row here to hold the mini-form, this might be a good place to
inject a popup/iframe rather than a popup/window, to hold this
miniframe.(forg ot what those custom MS things are called)...

What do you think?

PS: Plus, even if not such a great idea to edit the data this way-- the
DataGrid is such a pervasive control, that learning how to control it's
edit/render templates to their fullest can't be bad to learn anyway!!! =;-)

"Madan Nayak" <ma***@ubicsind ia.com> wrote in message
news:ev******** ******@TK2MSFTN GP11.phx.gbl...
A sugestion
========

In this senario, The numbers of coulms you are showing should be updatble.
There is no problem..

I f you want to update more no of fields you are showing, you can give a
link to another editpage.aspx which would take the primary key of the record clicked and show you all the necessary fields for update....

I think this is the better approach.

Questions:
======
Why donot you show fields but want to update them?
Is it of space problem in dispalying all your fields???
Is there any security issue that prevetnts you from displayng...

let me know pl.
Thanks
Madan
"Sky" <ne********@nos pam.xact-solutions.com> wrote in message
news:uD******** ******@TK2MSFTN GP09.phx.gbl...
Hello:
Another question about trying to wring functionality from a DataGrid...

Have a DB table of "Contacts" -- 14 or more fields per record
Show in datagrid -- but only 5 columns (First,Last, Fax, Phone, Category). Put an Edit column at the end...

Now what?!
If you go into Edit mode -- you can only edit 5 cells -- not all the rest
of
the Record's fields...not enough!

What options are there?
How to -- elegantly -- replace the Edit line with a nice mini custom

form (vertical layout, not horizontal as in the DataGrid)... Can this be done
with a DataGrid (override a single row's Render() with another scenario -- yet somehow figure out the values on return? I've seen that you can make your own BoundColumn:Edi t template -- but since it's for one column, you
can't very well use it to Colspan the whole grid, and use it....

Question: Is there a DataGrid:Edit template that could be used for this?
Question: Is this where I should be looking at another control to do the
job? DataList? DataRepeater?
Question: Is there where most people popup a modal form? If so, how are

they
catching the close of it to refresh the grid?




Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
4878
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that the best method? Do you have a sample of how to do this?
2
1411
by: Jesper Stocholm | last post by:
I have a challenge, that I do not seem to be able to solve. I have an "overview"-page that presently displays data from 2 columns in a database table. The users should be allowed to edit data in the table, and I would think, that I could use an editable datagrid for this. However - I cannot find the right article that tells me how to do it. What I can't seem to figure out is this: The database table-row has 7 fields that should be...
1
3779
by: Harry Devine | last post by:
I have a DataGrid that is configured to use the Edit/Update/Cancel concept correctly. My grid shows values from 5 database fields. I only need to update that last 4 fields. The last field is a Yes/No value in Access. Using the OleDbCommand, if I do not consider the Yes/No field, the ExecuteNonQuery command, using my UPDATE SQL statement, updates the record correctly. However, if I put the Yes/No field into the mix, ExecuteNonQuery...
3
2574
by: Kenneth Keeley | last post by:
Hi, I have been trying to create a set of web pages that reads an xml file into a datagrid this I can do. Here is a sample of the code. DataSet myDataSet = new DataSet(); myDataSet.ReadXml("Addrbook.xml"); dgBooks.DataSource = myDataSet; dgBooks.DataBind();
1
1734
by: jason | last post by:
I've seen a few posts on this issue, but no clear solutions. I have a mulitiline textbox inside a datagrid. I use TemplateColumn to define as multiline with 3 rows. I have other field types like drop downs that have no issue displaying last values in edit mode with seemingly more complicated code. when I attempt to find my textbox with
3
1641
by: CharlesA | last post by:
Hi folks, I really need help with the following scenario, I'm going to describe as well as a I can what the setup is and what I can't understand I'm using the framework 1.1 using ASP.net with C# I have a datagrid that is bound to a datasource (through ADO.net) and all that works
4
1730
by: glenn | last post by:
Hi folks, I am getting an error "Object reference not set to an instance of an object". It seems I have everything in place but something is obviously in err. If you could take a quick peak at my code segments and provide any insight in a reply, I would be eternally grateful. My table name is "rfi" and the field with a dropdownlist control is called "contract". I have imported the System.Data and System.Data.OleDb libraries. ...
9
2721
by: rn5a | last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB table. Users can modify the records using this DataGrid for which I am using EditCommandColumn in the DataGrid. This is the code: <script runat="server"> Dim sqlConn As New SqlConnection(".....") Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs) If Not (Page.IsPostBack) Then FillDataGrid()
8
1983
by: =?Utf-8?B?bWlrZWc=?= | last post by:
Hi, I am building a small Help Desk application for my company and need to be able to edit "open" help desk issues. I use a simple datagrid to display each issue (6 per page) , with an Edit button. There are a lot of fields across, and my Network Admins would like a way of editing/updating each issue seperately in a a vertical form. I need a way of clicking on the edit button ,bringing up a form with the record, editng the fields, and...
0
8803
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
9076
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9020
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6636
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5948
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4464
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4726
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2523
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2112
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.