473,545 Members | 2,095 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 2319
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
4858
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
1407
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...
1
3772
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,...
3
2569
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
1720
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
1634
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
1726
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...
9
2710
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...
8
1974
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...
0
7656
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7805
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7413
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...
0
7751
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...
1
5323
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...
0
3449
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...
0
3440
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1874
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
700
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...

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.