Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
zhuang #1
Complex DataGrid
Hi,
Based on the article I have read so far, I know we could customize
datagrid at column level, how about cell level?
What I want to achieve is the datagrid only have one column, some cells
are just like normal BoundColumn, some of them are comboBox. Is it
possible?
Thanks
zhuang Guest
-
Complex SQL?
Hi, I have a table which contains subscriptions from students, bu they are tagged with a date (so I have a kind of history). Both 'email' and... -
Complex Paths
Whats up: Anyone know of some good turotials that concentrate on creating mid-to-advanced paths in Illustrator CS... I'm getting the hang of it on... -
Presenting complex query results through datagrid
lets assume that i run a query that returns the following records countryID,countryName,cityID,cityName 1,USA,1,Chicago 1,USA,2,Los Angeles... -
Bind Complex Custom Business Object to DataGrid
Guys, Still fairly new to ASP.NET. I want to bind a collection of (what I think are) fairly complex Business Objects to a DataGrid. The... -
complex condition
I know there must be a way to do the following: if (($foobar > 3) || ($foo="t" && $bar = "b")) {print "yup"} Of course this is wrong, but what... -
S.M. Altaf [MVP] #2
Re: Complex DataGrid
Hi,
I don't know what article you're talking about but it is quite possible to
customize your datagrid at even the cell level. What you can do is to use
the ItemDataBound event, (or in any subroutine loop through the
DataGridItemCollection) and actually add controls or remove controls from a
cell. This way you can have a column with a cell containing a combobox, and
the next one with a textbox.
It'd be best in your case if you set that column as a template column to
start with. Then in your template, add whatever controls you feel can be
present in the cell. Now when binding the datagrid, the ItemDataBound event
will fire. You can look for the control
(e.Cells(0).FindControl("controlname")) and hide it, or set its value, or
replace it with a literal containing the text you want from the dataset.
HTH
Altaf
--------------------------------------------------------------------------------
All that glitters has a high refractive index.
[url]www.mendhak.com[/url]
"zhuang" <zhuang.lui@caudwellcommunications.co.uk> wrote in message
news:1131116359.136193.265030@g49g2000cwa.googlegr oups.com...> Hi,
>
> Based on the article I have read so far, I know we could customize
> datagrid at column level, how about cell level?
>
>
> What I want to achieve is the datagrid only have one column, some cells
> are just like normal BoundColumn, some of them are comboBox. Is it
> possible?
>
>
> Thanks
>
S.M. Altaf [MVP] Guest



Reply With Quote

