473,389 Members | 1,097 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,389 software developers and data experts.

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:Edit 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 2305
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********@nospam.xact-solutions.com> wrote in message
news:uD**************@TK2MSFTNGP09.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:Edit 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.(forgot 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***@ubicsindia.com> wrote in message
news:ev**************@TK2MSFTNGP11.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********@nospam.xact-solutions.com> wrote in message
news:uD**************@TK2MSFTNGP09.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:Edit 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
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...
2
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...
1
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...
3
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(); ...
1
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...
3
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...
4
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...
9
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...
8
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.