Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
Tina #1
DataGrid Won't come back
(please ignore my earlier post - it apparently had nothing to do with it
being in an ascx control)
I have, dozens of times, displayed datagrids, datasourced by an .xsd
dataset, with textboxes in template columns and always been able to spin
through those grids on, say a button click event.
In a new project I am dynamicaly populating the datagrid columns, after
which I retrieve data and do the following...
da.fill(DataSet1) 'this is an untyped dataset
dg.datasource = DataSet1
dg.Databind()
At this point my datagrid displays exactly like I want it to.
BUT, on the button click event (which occurs after the user might changes
some fields) my datagrid is empty!!!!
This brings up a question: How was it that I am able to get the grid back in
my other dozen programs where the grid is datasourced by a .xsd dataset?
Why doesn't the grid contents (as changed by the user) exist in the click
event?
Thanks,
T
Tina Guest
-
Datagrid paging keeps going back to the first group
Sorry to post this in 2 groups, but I just found this group after posting to the other group. I am using the datagrid. I have allowpaging=true. ... -
UserControl inside of datagrid - loses its viewstate when datagrid is re-bound on postback
I have a simple usercontrol, a datepicker which contains 3 dropdownlist , it resides inside a datagrid column and i set the selecteddate property of... -
How to restrict the user to go back ones the user haslogged out. Or, if he goes back, how to generate custom errorfor
:music; How to restrict the user to go back ones the user has logged out. Or, if he goes back, how to generate custom error for Page Expire ? :music; -
To all Gurus: How can I edit/update a DataGrid in a DataGrid (nested DataGrid)? Possible?
Hello, I am searching the whole Internet for a good example how to edit/update a DataGrid in a DataGrid (nested DataGrid). I know how to... -
"Back end not found. Or back end is busy"
Hello, I get this message when I try to connect to my IDS 9.4 via the bde16. I use the client version 4 (sqld_inf.dll). The version 5 gave me... -
Scott M. #2
Re: DataGrid Won't come back
Did you remember to re-bind the grid in the postback event?
"Tina" <tinamseaburn@nospammeexcite.com> wrote in message
news:uBK$m7TxFHA.3864@TK2MSFTNGP12.phx.gbl...> (please ignore my earlier post - it apparently had nothing to do with it
> being in an ascx control)
>
> I have, dozens of times, displayed datagrids, datasourced by an .xsd
> dataset, with textboxes in template columns and always been able to spin
> through those grids on, say a button click event.
>
> In a new project I am dynamicaly populating the datagrid columns, after
> which I retrieve data and do the following...
>
> da.fill(DataSet1) 'this is an untyped dataset
> dg.datasource = DataSet1
> dg.Databind()
>
> At this point my datagrid displays exactly like I want it to.
>
> BUT, on the button click event (which occurs after the user might changes
> some fields) my datagrid is empty!!!!
>
> This brings up a question: How was it that I am able to get the grid back
> in my other dozen programs where the grid is datasourced by a .xsd
> dataset? Why doesn't the grid contents (as changed by the user) exist in
> the click event?
> Thanks,
> T
>
Scott M. Guest
-
Tina #3
Re: DataGrid Won't come back
Do you mean in the Page_Load event if isPostBack is true?
I have never done that before in any of my successful program but I tried it
anyway in this one but nothing was changed. Everything that was built in
the grid is gone.
T
"Scott M." <s-mar@nospam.nospam> wrote in message
news:OlsQVXgxFHA.788@tk2msftngp13.phx.gbl...> Did you remember to re-bind the grid in the postback event?
>
>
> "Tina" <tinamseaburn@nospammeexcite.com> wrote in message
> news:uBK$m7TxFHA.3864@TK2MSFTNGP12.phx.gbl...>>> (please ignore my earlier post - it apparently had nothing to do with it
>> being in an ascx control)
>>
>> I have, dozens of times, displayed datagrids, datasourced by an .xsd
>> dataset, with textboxes in template columns and always been able to spin
>> through those grids on, say a button click event.
>>
>> In a new project I am dynamicaly populating the datagrid columns, after
>> which I retrieve data and do the following...
>>
>> da.fill(DataSet1) 'this is an untyped dataset
>> dg.datasource = DataSet1
>> dg.Databind()
>>
>> At this point my datagrid displays exactly like I want it to.
>>
>> BUT, on the button click event (which occurs after the user might changes
>> some fields) my datagrid is empty!!!!
>>
>> This brings up a question: How was it that I am able to get the grid back
>> in my other dozen programs where the grid is datasourced by a .xsd
>> dataset? Why doesn't the grid contents (as changed by the user) exist in
>> the click event?
>> Thanks,
>> T
>>
>
Tina Guest
-
Scott M. #4
Re: DataGrid Won't come back
No, not in the Postback. In the event handler that caused the postback.
What button is being clicked that causes the grid to postback to the server
(Edit, Delete, Update, Cancel)? That's where you need it.
"Tina" <tinamseaburn@nospammeexcite.com> wrote in message
news:uXDYvbhxFHA.2516@TK2MSFTNGP12.phx.gbl...> Do you mean in the Page_Load event if isPostBack is true?
> I have never done that before in any of my successful program but I tried
> it anyway in this one but nothing was changed. Everything that was built
> in the grid is gone.
>
> T
> "Scott M." <s-mar@nospam.nospam> wrote in message
> news:OlsQVXgxFHA.788@tk2msftngp13.phx.gbl...>>> Did you remember to re-bind the grid in the postback event?
>>
>>
>> "Tina" <tinamseaburn@nospammeexcite.com> wrote in message
>> news:uBK$m7TxFHA.3864@TK2MSFTNGP12.phx.gbl...>>>>> (please ignore my earlier post - it apparently had nothing to do with it
>>> being in an ascx control)
>>>
>>> I have, dozens of times, displayed datagrids, datasourced by an .xsd
>>> dataset, with textboxes in template columns and always been able to spin
>>> through those grids on, say a button click event.
>>>
>>> In a new project I am dynamicaly populating the datagrid columns, after
>>> which I retrieve data and do the following...
>>>
>>> da.fill(DataSet1) 'this is an untyped dataset
>>> dg.datasource = DataSet1
>>> dg.Databind()
>>>
>>> At this point my datagrid displays exactly like I want it to.
>>>
>>> BUT, on the button click event (which occurs after the user might
>>> changes some fields) my datagrid is empty!!!!
>>>
>>> This brings up a question: How was it that I am able to get the grid
>>> back in my other dozen programs where the grid is datasourced by a .xsd
>>> dataset? Why doesn't the grid contents (as changed by the user) exist in
>>> the click event?
>>> Thanks,
>>> T
>>>
>>
>
Scott M. Guest
-
Scott M. #5
Re: DataGrid Won't come back
....And, is the grid's data source property being set in Page_Load (but
outside of the If Not IsPostBack statement?
"Tina" <tinamseaburn@nospammeexcite.com> wrote in message
news:uXDYvbhxFHA.2516@TK2MSFTNGP12.phx.gbl...> Do you mean in the Page_Load event if isPostBack is true?
> I have never done that before in any of my successful program but I tried
> it anyway in this one but nothing was changed. Everything that was built
> in the grid is gone.
>
> T
> "Scott M." <s-mar@nospam.nospam> wrote in message
> news:OlsQVXgxFHA.788@tk2msftngp13.phx.gbl...>>> Did you remember to re-bind the grid in the postback event?
>>
>>
>> "Tina" <tinamseaburn@nospammeexcite.com> wrote in message
>> news:uBK$m7TxFHA.3864@TK2MSFTNGP12.phx.gbl...>>>>> (please ignore my earlier post - it apparently had nothing to do with it
>>> being in an ascx control)
>>>
>>> I have, dozens of times, displayed datagrids, datasourced by an .xsd
>>> dataset, with textboxes in template columns and always been able to spin
>>> through those grids on, say a button click event.
>>>
>>> In a new project I am dynamicaly populating the datagrid columns, after
>>> which I retrieve data and do the following...
>>>
>>> da.fill(DataSet1) 'this is an untyped dataset
>>> dg.datasource = DataSet1
>>> dg.Databind()
>>>
>>> At this point my datagrid displays exactly like I want it to.
>>>
>>> BUT, on the button click event (which occurs after the user might
>>> changes some fields) my datagrid is empty!!!!
>>>
>>> This brings up a question: How was it that I am able to get the grid
>>> back in my other dozen programs where the grid is datasourced by a .xsd
>>> dataset? Why doesn't the grid contents (as changed by the user) exist in
>>> the click event?
>>> Thanks,
>>> T
>>>
>>
>
Scott M. Guest
-
Tina #6
Re: DataGrid Won't come back
Scott:
Thanks for the help but I have now found that if I check the "Create columns
automatically at run time" checkbox in the datagrid property builder, the
data grid is there on the click event without having to do anything else.
So, I've made progress on my problem and made a new post about the Columns
collection not being there in this case.
Thanks,
T
"Scott M." <s-mar@nospam.nospam> wrote in message
news:OtSWMfixFHA.3588@tk2msftngp13.phx.gbl...> No, not in the Postback. In the event handler that caused the postback.
> What button is being clicked that causes the grid to postback to the
> server (Edit, Delete, Update, Cancel)? That's where you need it.
>
>
> "Tina" <tinamseaburn@nospammeexcite.com> wrote in message
> news:uXDYvbhxFHA.2516@TK2MSFTNGP12.phx.gbl...>>> Do you mean in the Page_Load event if isPostBack is true?
>> I have never done that before in any of my successful program but I tried
>> it anyway in this one but nothing was changed. Everything that was built
>> in the grid is gone.
>>
>> T
>> "Scott M." <s-mar@nospam.nospam> wrote in message
>> news:OlsQVXgxFHA.788@tk2msftngp13.phx.gbl...>>>>> Did you remember to re-bind the grid in the postback event?
>>>
>>>
>>> "Tina" <tinamseaburn@nospammeexcite.com> wrote in message
>>> news:uBK$m7TxFHA.3864@TK2MSFTNGP12.phx.gbl...
>>>> (please ignore my earlier post - it apparently had nothing to do with
>>>> it being in an ascx control)
>>>>
>>>> I have, dozens of times, displayed datagrids, datasourced by an .xsd
>>>> dataset, with textboxes in template columns and always been able to
>>>> spin through those grids on, say a button click event.
>>>>
>>>> In a new project I am dynamicaly populating the datagrid columns, after
>>>> which I retrieve data and do the following...
>>>>
>>>> da.fill(DataSet1) 'this is an untyped dataset
>>>> dg.datasource = DataSet1
>>>> dg.Databind()
>>>>
>>>> At this point my datagrid displays exactly like I want it to.
>>>>
>>>> BUT, on the button click event (which occurs after the user might
>>>> changes some fields) my datagrid is empty!!!!
>>>>
>>>> This brings up a question: How was it that I am able to get the grid
>>>> back in my other dozen programs where the grid is datasourced by a .xsd
>>>> dataset? Why doesn't the grid contents (as changed by the user) exist
>>>> in the click event?
>>>> Thanks,
>>>> T
>>>>
>>>
>>>
>>
>
Tina Guest



Reply With Quote

