As it turns out the information needed for my table I want to persist is not
going to come from a database afterall. Instead it will come from values
returned by a class library.
With that in mind, can anyone point me to a sample that demonstrates how to
populate a DataGrid control using data that comes from memory instead of a
db? I assume this is possible? In other words say I want my table to look
like this:
Value 1: val2
Value 2: val2
Value 3: val3
Value 5: val4
Value 5: val5
And I have these values ("val1" - "val5") in a string array. How do I
create a datagrid and populate it using this array's values instead of a db
value? Do I have to create an in memory dataset using other routines and
give the grid this data set, and if so, how is this done? Or can I set
these values directly? Any examples would be greatly appreciated.
Thanks.
"Natty Gur" <> wrote in message
news:#...
> Hi,
>
> The default behavior of Grid is to preserve it data using viewstate. On
> postback ASP.NET use viewstate data do rebuild your grid containing
> previous round data. Grids are actually tables that you can access via
> grid controls collection. You can use DataGridTable to access any rows
> and columns :
> string s = DataGrid1.Controls[0].Rows[1].Cells[0].Text;
>
> Natty Gur[MVP]
>
> blog : http://weblogs.asp.net/ngur
> Mobile: +972-(0)58-888377
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!