Is it possible to make some DataGrid's column editable, while some others
not editable? Thanks.

Re: Make some DataGrid columns editable while others are not editable by jim

jim
Wed Feb 11 14:36:38 CST 2004

you can accomplish this using the DataGrid.TableStyles.ColumnStyles
collection. You can manage each individual column's width.

I believe there's also a way to do this directly in the underlying
datasource, but that method escapes me at the moment.

I believe you can control table
"a" <a@nospam.com> wrote in message
news:uvTAPrN8DHA.3012@TK2MSFTNGP09.phx.gbl...
> Is it possible to make some DataGrid's column editable, while some others
> not editable? Thanks.
>
>



Re: Make some DataGrid columns editable while others are not editable by a

a
Wed Feb 11 15:39:28 CST 2004

Maybe the DataSource is the right solution. For now, I created a new class
DataGridReadOnlyTextBoxColumn inheriting from DataGridTextBoxColumn and
overrode Edit method to just return.

I can't set the width to zero, because I still want to display the columns.

Thanks.


"jim" <james_matthews_at_shi_dotcom> wrote in message
news:u$eoB7N8DHA.3648@TK2MSFTNGP11.phx.gbl...
> you can accomplish this using the DataGrid.TableStyles.ColumnStyles
> collection. You can manage each individual column's width.
>
> I believe there's also a way to do this directly in the underlying
> datasource, but that method escapes me at the moment.
>
> I believe you can control table
> "a" <a@nospam.com> wrote in message
> news:uvTAPrN8DHA.3012@TK2MSFTNGP09.phx.gbl...
> > Is it possible to make some DataGrid's column editable, while some
others
> > not editable? Thanks.
> >
> >
>
>



Re: Make some DataGrid columns editable while others are not editable by Tim

Tim
Wed Feb 11 15:45:46 CST 2004

What about setting the DataGridTextBoxColumn.ReadOnly property to True?

--
Tim Wilson
.Net Compact Framework MVP
{cf147fdf-893d-4a88-b258-22f68a3dbc6a}

"a" <a@nospam.com> wrote in message
news:OlZLIeO8DHA.1596@TK2MSFTNGP10.phx.gbl...
> Maybe the DataSource is the right solution. For now, I created a new class
> DataGridReadOnlyTextBoxColumn inheriting from DataGridTextBoxColumn and
> overrode Edit method to just return.
>
> I can't set the width to zero, because I still want to display the
columns.
>
> Thanks.
>
>
> "jim" <james_matthews_at_shi_dotcom> wrote in message
> news:u$eoB7N8DHA.3648@TK2MSFTNGP11.phx.gbl...
> > you can accomplish this using the DataGrid.TableStyles.ColumnStyles
> > collection. You can manage each individual column's width.
> >
> > I believe there's also a way to do this directly in the underlying
> > datasource, but that method escapes me at the moment.
> >
> > I believe you can control table
> > "a" <a@nospam.com> wrote in message
> > news:uvTAPrN8DHA.3012@TK2MSFTNGP09.phx.gbl...
> > > Is it possible to make some DataGrid's column editable, while some
> others
> > > not editable? Thanks.
> > >
> > >
> >
> >
>
>



Re: Make some DataGrid columns editable while others are not editable by jim

jim
Wed Feb 11 16:03:06 CST 2004

actually, yup. sorry about that. i got lost in thinking about something else
while answering this post and ended up providing an incorrect answer
(sorry!). I was thinking about how to set the width of a datagrid column to
0...

tim's answer is the best method that i know of.

"Tim Wilson" <Tim_Wilson@[DieSpamDie]Rogers.com> wrote in message
news:OY5glhO8DHA.3420@TK2MSFTNGP11.phx.gbl...
> What about setting the DataGridTextBoxColumn.ReadOnly property to True?
>
> --
> Tim Wilson
> .Net Compact Framework MVP
> {cf147fdf-893d-4a88-b258-22f68a3dbc6a}
>
> "a" <a@nospam.com> wrote in message
> news:OlZLIeO8DHA.1596@TK2MSFTNGP10.phx.gbl...
> > Maybe the DataSource is the right solution. For now, I created a new
class
> > DataGridReadOnlyTextBoxColumn inheriting from DataGridTextBoxColumn and
> > overrode Edit method to just return.
> >
> > I can't set the width to zero, because I still want to display the
> columns.
> >
> > Thanks.
> >
> >
> > "jim" <james_matthews_at_shi_dotcom> wrote in message
> > news:u$eoB7N8DHA.3648@TK2MSFTNGP11.phx.gbl...
> > > you can accomplish this using the DataGrid.TableStyles.ColumnStyles
> > > collection. You can manage each individual column's width.
> > >
> > > I believe there's also a way to do this directly in the underlying
> > > datasource, but that method escapes me at the moment.
> > >
> > > I believe you can control table
> > > "a" <a@nospam.com> wrote in message
> > > news:uvTAPrN8DHA.3012@TK2MSFTNGP09.phx.gbl...
> > > > Is it possible to make some DataGrid's column editable, while some
> > others
> > > > not editable? Thanks.
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Re: Make some DataGrid columns editable while others are not editable by a

a
Wed Feb 11 16:40:41 CST 2004

Oh my, how did that escape me? :) Thanks guys.


"jim" <james_matthews_at_shi_dotcom> wrote in message
news:efdqVrO8DHA.2764@TK2MSFTNGP09.phx.gbl...
> actually, yup. sorry about that. i got lost in thinking about something
else
> while answering this post and ended up providing an incorrect answer
> (sorry!). I was thinking about how to set the width of a datagrid column
to
> 0...
>
> tim's answer is the best method that i know of.
>
> "Tim Wilson" <Tim_Wilson@[DieSpamDie]Rogers.com> wrote in message
> news:OY5glhO8DHA.3420@TK2MSFTNGP11.phx.gbl...
> > What about setting the DataGridTextBoxColumn.ReadOnly property to True?
> >
> > --
> > Tim Wilson
> > .Net Compact Framework MVP
> > {cf147fdf-893d-4a88-b258-22f68a3dbc6a}
> >
> > "a" <a@nospam.com> wrote in message
> > news:OlZLIeO8DHA.1596@TK2MSFTNGP10.phx.gbl...
> > > Maybe the DataSource is the right solution. For now, I created a new
> class
> > > DataGridReadOnlyTextBoxColumn inheriting from DataGridTextBoxColumn
and
> > > overrode Edit method to just return.
> > >
> > > I can't set the width to zero, because I still want to display the
> > columns.
> > >
> > > Thanks.
> > >
> > >
> > > "jim" <james_matthews_at_shi_dotcom> wrote in message
> > > news:u$eoB7N8DHA.3648@TK2MSFTNGP11.phx.gbl...
> > > > you can accomplish this using the DataGrid.TableStyles.ColumnStyles
> > > > collection. You can manage each individual column's width.
> > > >
> > > > I believe there's also a way to do this directly in the underlying
> > > > datasource, but that method escapes me at the moment.
> > > >
> > > > I believe you can control table
> > > > "a" <a@nospam.com> wrote in message
> > > > news:uvTAPrN8DHA.3012@TK2MSFTNGP09.phx.gbl...
> > > > > Is it possible to make some DataGrid's column editable, while some
> > > others
> > > > > not editable? Thanks.
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Re: Make some DataGrid columns editable while others are not editable by Rob

Rob
Wed Feb 11 17:12:28 CST 2004

I had a very similar situation. I just used the readonly property and that
worked fine.... but.... the users were very happy when I also figured out
how to display any data in the 'writeable' columns in a different colour (I
used red... readonly data black). Just an idea... I'll try to dig out some
code tomorrow.


"a" <a@nospam.com> wrote in message news:JbyWb.30674$QX4.17740@clgrps13...
> Oh my, how did that escape me? :) Thanks guys.
>
>
> "jim" <james_matthews_at_shi_dotcom> wrote in message
> news:efdqVrO8DHA.2764@TK2MSFTNGP09.phx.gbl...
> > actually, yup. sorry about that. i got lost in thinking about something
> else
> > while answering this post and ended up providing an incorrect answer
> > (sorry!). I was thinking about how to set the width of a datagrid column
> to
> > 0...
> >
> > tim's answer is the best method that i know of.
> >
> > "Tim Wilson" <Tim_Wilson@[DieSpamDie]Rogers.com> wrote in message
> > news:OY5glhO8DHA.3420@TK2MSFTNGP11.phx.gbl...
> > > What about setting the DataGridTextBoxColumn.ReadOnly property to
True?
> > >
> > > --
> > > Tim Wilson
> > > .Net Compact Framework MVP
> > > {cf147fdf-893d-4a88-b258-22f68a3dbc6a}
> > >
> > > "a" <a@nospam.com> wrote in message
> > > news:OlZLIeO8DHA.1596@TK2MSFTNGP10.phx.gbl...
> > > > Maybe the DataSource is the right solution. For now, I created a new
> > class
> > > > DataGridReadOnlyTextBoxColumn inheriting from DataGridTextBoxColumn
> and
> > > > overrode Edit method to just return.
> > > >
> > > > I can't set the width to zero, because I still want to display the
> > > columns.
> > > >
> > > > Thanks.
> > > >
> > > >
> > > > "jim" <james_matthews_at_shi_dotcom> wrote in message
> > > > news:u$eoB7N8DHA.3648@TK2MSFTNGP11.phx.gbl...
> > > > > you can accomplish this using the
DataGrid.TableStyles.ColumnStyles
> > > > > collection. You can manage each individual column's width.
> > > > >
> > > > > I believe there's also a way to do this directly in the underlying
> > > > > datasource, but that method escapes me at the moment.
> > > > >
> > > > > I believe you can control table
> > > > > "a" <a@nospam.com> wrote in message
> > > > > news:uvTAPrN8DHA.3012@TK2MSFTNGP09.phx.gbl...
> > > > > > Is it possible to make some DataGrid's column editable, while
some
> > > > others
> > > > > > not editable? Thanks.
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Re: Make some DataGrid columns editable while others are not editable by a

a
Wed Feb 11 20:54:23 CST 2004

That's very interesting, and probably something I'll have to do some day
(change background color). Now, I don't believe there is a property for the
background color, right? :)


"Rob Oldfield" <rob@oldfield100_wow_freeserve_yikes_co_incredible!_uk> wrote
in message news:uMH4iQP8DHA.632@TK2MSFTNGP12.phx.gbl...
> I had a very similar situation. I just used the readonly property and
that
> worked fine.... but.... the users were very happy when I also figured out
> how to display any data in the 'writeable' columns in a different colour
(I
> used red... readonly data black). Just an idea... I'll try to dig out
some
> code tomorrow.
>
>
> "a" <a@nospam.com> wrote in message news:JbyWb.30674$QX4.17740@clgrps13...
> > Oh my, how did that escape me? :) Thanks guys.
> >
> >
> > "jim" <james_matthews_at_shi_dotcom> wrote in message
> > news:efdqVrO8DHA.2764@TK2MSFTNGP09.phx.gbl...
> > > actually, yup. sorry about that. i got lost in thinking about
something
> > else
> > > while answering this post and ended up providing an incorrect answer
> > > (sorry!). I was thinking about how to set the width of a datagrid
column
> > to
> > > 0...
> > >
> > > tim's answer is the best method that i know of.
> > >
> > > "Tim Wilson" <Tim_Wilson@[DieSpamDie]Rogers.com> wrote in message
> > > news:OY5glhO8DHA.3420@TK2MSFTNGP11.phx.gbl...
> > > > What about setting the DataGridTextBoxColumn.ReadOnly property to
> True?
> > > >
> > > > --
> > > > Tim Wilson
> > > > .Net Compact Framework MVP
> > > > {cf147fdf-893d-4a88-b258-22f68a3dbc6a}
> > > >
> > > > "a" <a@nospam.com> wrote in message
> > > > news:OlZLIeO8DHA.1596@TK2MSFTNGP10.phx.gbl...
> > > > > Maybe the DataSource is the right solution. For now, I created a
new
> > > class
> > > > > DataGridReadOnlyTextBoxColumn inheriting from
DataGridTextBoxColumn
> > and
> > > > > overrode Edit method to just return.
> > > > >
> > > > > I can't set the width to zero, because I still want to display the
> > > > columns.
> > > > >
> > > > > Thanks.
> > > > >
> > > > >
> > > > > "jim" <james_matthews_at_shi_dotcom> wrote in message
> > > > > news:u$eoB7N8DHA.3648@TK2MSFTNGP11.phx.gbl...
> > > > > > you can accomplish this using the
> DataGrid.TableStyles.ColumnStyles
> > > > > > collection. You can manage each individual column's width.
> > > > > >
> > > > > > I believe there's also a way to do this directly in the
underlying
> > > > > > datasource, but that method escapes me at the moment.
> > > > > >
> > > > > > I believe you can control table
> > > > > > "a" <a@nospam.com> wrote in message
> > > > > > news:uvTAPrN8DHA.3012@TK2MSFTNGP09.phx.gbl...
> > > > > > > Is it possible to make some DataGrid's column editable, while
> some
> > > > > others
> > > > > > > not editable? Thanks.
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Re: Make some DataGrid columns editable while others are not editable by Rob

Rob
Fri Feb 13 13:26:18 CST 2004

http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp?print=745

I changed it a touch so that I could pass the colours when calling the
class... other than that it pretty much worked right out of the box for me.


"a" <a@nospam.com> wrote in message news:zVBWb.31037$QX4.7425@clgrps13...
> That's very interesting, and probably something I'll have to do some day
> (change background color). Now, I don't believe there is a property for
the
> background color, right? :)
>
>
> "Rob Oldfield" <rob@oldfield100_wow_freeserve_yikes_co_incredible!_uk>
wrote
> in message news:uMH4iQP8DHA.632@TK2MSFTNGP12.phx.gbl...
> > I had a very similar situation. I just used the readonly property and
> that
> > worked fine.... but.... the users were very happy when I also figured
out
> > how to display any data in the 'writeable' columns in a different colour
> (I
> > used red... readonly data black). Just an idea... I'll try to dig out
> some
> > code tomorrow.
> >
> >
> > "a" <a@nospam.com> wrote in message
news:JbyWb.30674$QX4.17740@clgrps13...
> > > Oh my, how did that escape me? :) Thanks guys.
> > >
> > >
> > > "jim" <james_matthews_at_shi_dotcom> wrote in message
> > > news:efdqVrO8DHA.2764@TK2MSFTNGP09.phx.gbl...
> > > > actually, yup. sorry about that. i got lost in thinking about
> something
> > > else
> > > > while answering this post and ended up providing an incorrect answer
> > > > (sorry!). I was thinking about how to set the width of a datagrid
> column
> > > to
> > > > 0...
> > > >
> > > > tim's answer is the best method that i know of.
> > > >
> > > > "Tim Wilson" <Tim_Wilson@[DieSpamDie]Rogers.com> wrote in message
> > > > news:OY5glhO8DHA.3420@TK2MSFTNGP11.phx.gbl...
> > > > > What about setting the DataGridTextBoxColumn.ReadOnly property to
> > True?
> > > > >
> > > > > --
> > > > > Tim Wilson
> > > > > .Net Compact Framework MVP
> > > > > {cf147fdf-893d-4a88-b258-22f68a3dbc6a}
> > > > >
> > > > > "a" <a@nospam.com> wrote in message
> > > > > news:OlZLIeO8DHA.1596@TK2MSFTNGP10.phx.gbl...
> > > > > > Maybe the DataSource is the right solution. For now, I created a
> new
> > > > class
> > > > > > DataGridReadOnlyTextBoxColumn inheriting from
> DataGridTextBoxColumn
> > > and
> > > > > > overrode Edit method to just return.
> > > > > >
> > > > > > I can't set the width to zero, because I still want to display
the
> > > > > columns.
> > > > > >
> > > > > > Thanks.
> > > > > >
> > > > > >
> > > > > > "jim" <james_matthews_at_shi_dotcom> wrote in message
> > > > > > news:u$eoB7N8DHA.3648@TK2MSFTNGP11.phx.gbl...
> > > > > > > you can accomplish this using the
> > DataGrid.TableStyles.ColumnStyles
> > > > > > > collection. You can manage each individual column's width.
> > > > > > >
> > > > > > > I believe there's also a way to do this directly in the
> underlying
> > > > > > > datasource, but that method escapes me at the moment.
> > > > > > >
> > > > > > > I believe you can control table
> > > > > > > "a" <a@nospam.com> wrote in message
> > > > > > > news:uvTAPrN8DHA.3012@TK2MSFTNGP09.phx.gbl...
> > > > > > > > Is it possible to make some DataGrid's column editable,
while
> > some
> > > > > > others
> > > > > > > > not editable? Thanks.
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>