Ask a Question related to ASP.NET General, Design and Development.
-
Anatoly #1
Re: DataGrid formatting - only one column without borders
Yes, it is possible
do it on datagrid ItemCreate event:
int i = getMyNonBorderColumnIndex();
e.Item.Cells[i].Style.Add("BORDER-TOP-STYLE", "none");
e.Item.Cells[i].Style.Add("BORDER-RIGHT-STYLE", "none");
e.Item.Cells[i].Style.Add("BORDER-LEFT-STYLE", "none");
e.Item.Cells[i].Style.Add("BORDER-BOTTOM-STYLE", "none");
in this event you can also determine if item is Alternative or not:
if(e.Item.ItemType == ListItemType.AlternatingItem){}
HTH
"Hrvoje Vrbanc" <hrvojev@recro.hr> wrote in message
news:OLysVNsSDHA.2252@TK2MSFTNGP12.phx.gbl...to> Hello all!
>
> I have a question considering DataGrid control formatting: is it possiblein> somehow set styles in such a way that rendered DataGrid displays borderspossible> certain columns and doesn't display borders in other columns (as isdifferently> e.g. with ordinary HTML table)? In fact, I would like to format> only one column that should have no borders and no AlternatingItem in
> different colour while the rest of the single DataGrid should look
> differently.
> Is it possible?
>
> Thank you,
> Hrvoje
>
>
Anatoly Guest
-
Formatting Date in Column of DataGrid
Hi guys, I have a WebServiceConnector component which is bound to a DataSet component, which is in turn bound to a DataGrid component. All is... -
Formatting the phone nos in the column in the datagrid
I want to format the phone nos displayed in the column of the datagrid to ###-###-#### i tried the following in the ItemCreated event but is not... -
Datagrid column formatting
Is it possible to set the column widths of a datagrid? This is driving me crazy, and I haven't found a solution yet. I'm pretty new to ASP.NET so... -
Formatting datagrid column to show boolean as Yes/no instead of truefalse
Is there a way to change the formatting expression of a column in the property builder of the datagrid to make boolean values appear as yes/no... -
How to use formatting expression on DataGrid bound column.
Refer http://www.c-sharpcorner.com/Code/2003/June/FormatDataGridData.asp http://www.c-sharpcorner.com/Code/2003/June/DataFormatString.asp HTH... -
Hrvoje Vrbanc #2
Re: DataGrid formatting - only one column without borders
It did help, thank you very much.
Hrvoje
"Anatoly" <anatolyr@gilat.com> wrote in message
news:%23etXbTsSDHA.3188@tk2msftngp13.phx.gbl...possible> Yes, it is possible
>
> do it on datagrid ItemCreate event:
>
> int i = getMyNonBorderColumnIndex();
> e.Item.Cells[i].Style.Add("BORDER-TOP-STYLE", "none");
>
> e.Item.Cells[i].Style.Add("BORDER-RIGHT-STYLE", "none");
>
> e.Item.Cells[i].Style.Add("BORDER-LEFT-STYLE", "none");
>
> e.Item.Cells[i].Style.Add("BORDER-BOTTOM-STYLE", "none");
>
> in this event you can also determine if item is Alternative or not:
>
> if(e.Item.ItemType == ListItemType.AlternatingItem){}
>
> HTH
>
>
> "Hrvoje Vrbanc" <hrvojev@recro.hr> wrote in message
> news:OLysVNsSDHA.2252@TK2MSFTNGP12.phx.gbl...> > Hello all!
> >
> > I have a question considering DataGrid control formatting: is it> to> in> > somehow set styles in such a way that rendered DataGrid displays borders> possible> > certain columns and doesn't display borders in other columns (as is> differently> > e.g. with ordinary HTML table)? In fact, I would like to format>> > only one column that should have no borders and no AlternatingItem in
> > different colour while the rest of the single DataGrid should look
> > differently.
> > Is it possible?
> >
> > Thank you,
> > Hrvoje
> >
> >
>
Hrvoje Vrbanc Guest



Reply With Quote

