Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
cindy #1
datagrid checkbox list edit item not working
I am using asp template columns. I display box values from a lookup table.
The datagrid displays field "bookid" and the checkbox displays "category"
field for the book. The category field is a string concatenation of category
values such as CT,MR,NM or just CT
When the grid goes into edit mode I use the itemdatabound to determine
whether to set checkbox as selected based on the value of the category field.
((CheckBoxList)e.Item.Cells[0].FindControl("cbl1")).SelectedValue =
ds.Tables[0].Rows[cnt]["Category"].ToString();
Ok if category = CT How do I get an array into the itemdatabound with comma
delimiter so CT,MR for example will see values as CT and a MR:
The update command for the grid builds the string by looping thru the
selected values from the checkbox. Am I completely missing a better way?
--
cindy
cindy Guest
-
Howto bind CheckBox to the datagrid/ Then update the database field when the checkbox is clicked.
I am trying to update the database field when the checkbox is clicked. I am trying to modified the following solution but.. got stuck on the... -
Datagrid Edit, Insert & Update Checkbox (ASP.NET Using VB.NET)
Hi you guys. If you could possible help me here. I am quite new to .NET coming over from VB and with limited ASP development. I am having a problem... -
How to set selected item in drop-down list in datagrid
Donald Welker wrote: SelectedValue='<%# DataBinder.Eval(Container.DataItem,"ABCField") %>' -- Jos -
Change style of a single row of the item list of datagrid, based on a field value of current item...
Sorry for the long subject guys, but I don't know how better I can resume the matter... Anyway, I have my datagrid showing items of an order. I... -
Datagrid Item Delete Confirmation not working
Hi Experts, All of sudden the delete confirmation is not working for me on my datagrid (it was working 2 days ago..couldn't figure out the... -
Steven Cheng[MSFT] #2
RE: datagrid checkbox list edit item not working
Hi Cindy,
Welcome to ASPNET newsgroup.
As for the problem you mentioned, I think your current approach on using
the DataGrid's ItemDatabound event is reasonable since we need to do some
complex data maniplating and bind to CheckBoxList. As for the string
concatenation data field, I think you can use the .NET string class's
"Split" and "Join" method which can help divide concatenation string into
string[] array or combine string[] array into single string (by specific
separator chars).
Hope helps. thanks,
Steven Cheng
Microsoft Online Support
Get Secure! [url]www.microsoft.com/security[/url]
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: datagrid checkbox list edit item not working
| thread-index: AcXUG8IE1CTNsUFCSb6nXy/kzi2d/Q==
| X-WBNR-Posting-Host: 71.136.160.120
| From: "=?Utf-8?B?Y2luZHk=?=" <cmello@nospam.nospam>
| Subject: datagrid checkbox list edit item not working
| Date: Tue, 18 Oct 2005 12:40:13 -0700
| Lines: 14
| Message-ID: <14E27119-5229-41A3-89B3-867DBBEA89BA@microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridc ontrol
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA02.phx.gbl!TK2MSF TNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet.datagridc ontrol:5812
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridc ontrol
|
| I am using asp template columns. I display box values from a lookup
table.
| The datagrid displays field "bookid" and the checkbox displays "category"
| field for the book. The category field is a string concatenation of
category
| values such as CT,MR,NM or just CT
| When the grid goes into edit mode I use the itemdatabound to determine
| whether to set checkbox as selected based on the value of the category
field.
| ((CheckBoxList)e.Item.Cells[0].FindControl("cbl1")).SelectedValue =
| ds.Tables[0].Rows[cnt]["Category"].ToString();
| Ok if category = CT How do I get an array into the itemdatabound with
comma
| delimiter so CT,MR for example will see values as CT and a MR:
| The update command for the grid builds the string by looping thru the
| selected values from the checkbox. Am I completely missing a better way?
| --
| cindy
|
Steven Cheng[MSFT] Guest



Reply With Quote

