Ask a Question related to Dreamweaver AppDev, Design and Development.
-
Les Matthews #1
DropDown in .NET DataGrid produces OnDataGridUpdate error
I have a DropDownList in a DataGrid EditItemTemplate region. The
DropDownList is populated by a dataset different than the one specificied as
the DataSource for the DataGrid. The DataSource for the DataGrid is
"dsCompanies", while the picklist in the EditItemTemplate region is
"dsCompanyTypes".
Whenever I update a row in the DataGrid, I receive the following error:
System.Exception: Control not found in DataGrid column: typeCode
at DreamweaverCtrls.DataSet.OnDataGridUpdate(Object Src,
DataGridCommandEventArgs E)
The field "typeCode" exists in both datasets. It is the PK for companyTypes
table and an FK in the companies table.
How should I go about populating a dropdown in a DataGrid with a dataset
other than the primary datasource for the DataGrid?
Thanks
Les Matthews Guest
-
Datagrid dropdown
I have a datagrid with two dropdowns and I can fill the dropdown from stored procedure, that's not a problem. The question is I need the fil the... -
How to add a Dropdown list to a datagrid at runtime (dynamic) without using template columns in ASP.NET and still have the ability to us the datagrid Update event.
How to add a Dropdown list to a datagrid at runtime (dynamic) without using template columns in ASP.NET and still have the ability to us the... -
DataGrid with Dropdown list
Any Help is appreciated! I have a datagrid with Drop down list and a remove hyperlink as two columns. When I remove the row of the datagrid by... -
dropdown in a datagrid
I can put a dropdown in a grid column, databind it, and it will work but how can I get the itemchanged event so that I can do something with it?... -
if mysql_query() produces an error...
....is it not true that mysql_error() will persist? I have a case on a site where the admin enters a new user and, for some reason, does it wrong,... -
Calvin Willman #2
Re: DropDown in .NET DataGrid produces OnDataGridUpdate error
Load the Company Types Table into the dsCompanies DataSet. I don't see why
you need to create separate DataSets for the two.
On 18/4/05 5:06 pm, in article d40lr6$9v6$1@forums.macromedia.com, "Les
Matthews" <LesAMatthews@yahoo.com> wrote:
> I have a DropDownList in a DataGrid EditItemTemplate region. The
> DropDownList is populated by a dataset different than the one specificied as
> the DataSource for the DataGrid. The DataSource for the DataGrid is
> "dsCompanies", while the picklist in the EditItemTemplate region is
> "dsCompanyTypes".
>
> Whenever I update a row in the DataGrid, I receive the following error:
>
> System.Exception: Control not found in DataGrid column: typeCode
> at DreamweaverCtrls.DataSet.OnDataGridUpdate(Object Src,
> DataGridCommandEventArgs E)
>
> The field "typeCode" exists in both datasets. It is the PK for companyTypes
> table and an FK in the companies table.
>
> How should I go about populating a dropdown in a DataGrid with a dataset
> other than the primary datasource for the DataGrid?
>
> Thanks
>
>Calvin Willman Guest
-
Calvin Willman #3
Re: DropDown in .NET DataGrid produces OnDataGridUpdate error
You can then also Add the DataRelation object passing in the two columns
try...
DataRelation dRel = new DataRelation("CompaniesCompanyTypes",
dsCompanies.Tables["Companies"].Columns["typeCode"],dsCompanies.Tables["dsCo
mpanies"].Tables["CompanyTypes"].Columns["typeCode"]
On 18/4/05 5:06 pm, in article d40lr6$9v6$1@forums.macromedia.com, "Les
Matthews" <LesAMatthews@yahoo.com> wrote:
> I have a DropDownList in a DataGrid EditItemTemplate region. The
> DropDownList is populated by a dataset different than the one specificied as
> the DataSource for the DataGrid. The DataSource for the DataGrid is
> "dsCompanies", while the picklist in the EditItemTemplate region is
> "dsCompanyTypes".
>
> Whenever I update a row in the DataGrid, I receive the following error:
>
> System.Exception: Control not found in DataGrid column: typeCode
> at DreamweaverCtrls.DataSet.OnDataGridUpdate(Object Src,
> DataGridCommandEventArgs E)
>
> The field "typeCode" exists in both datasets. It is the PK for companyTypes
> table and an FK in the companies table.
>
> How should I go about populating a dropdown in a DataGrid with a dataset
> other than the primary datasource for the DataGrid?
>
> Thanks
>
>Calvin Willman Guest
-
Calvin Willman #4
Re: DropDown in .NET DataGrid produces OnDataGridUpdate error
sorry.. Type error seconf line I types 'Tables["dsCompanies"]' which is
rubbish.
DataRelation dRel = new DataRelation("CompaniesCompanyTypes",
dsCompanies.Tables["Companies"].Columns["typeCode"],dsCompanies.Tables["Comp
anyTypes"].Columns["typeCode"]
But you probably don't need this anyway... so wouldn't worry about it
On 18/4/05 5:06 pm, in article d40lr6$9v6$1@forums.macromedia.com, "Les
Matthews" <LesAMatthews@yahoo.com> wrote:
> I have a DropDownList in a DataGrid EditItemTemplate region. The
> DropDownList is populated by a dataset different than the one specificied as
> the DataSource for the DataGrid. The DataSource for the DataGrid is
> "dsCompanies", while the picklist in the EditItemTemplate region is
> "dsCompanyTypes".
>
> Whenever I update a row in the DataGrid, I receive the following error:
>
> System.Exception: Control not found in DataGrid column: typeCode
> at DreamweaverCtrls.DataSet.OnDataGridUpdate(Object Src,
> DataGridCommandEventArgs E)
>
> The field "typeCode" exists in both datasets. It is the PK for companyTypes
> table and an FK in the companies table.
>
> How should I go about populating a dropdown in a DataGrid with a dataset
> other than the primary datasource for the DataGrid?
>
> Thanks
>
>Calvin Willman Guest
-
Les Matthews #5
Re: DropDown in .NET DataGrid produces OnDataGridUpdate error
I have it worked out now.
Thanks for your help, Calvin.
I'm not familiar with the DataRelation object - I'll have to look into it.
"Calvin Willman" <calvinwillman@orange.net> wrote in message
news:BE89A82D.86E%calvinwillman@orange.net...> You can then also Add the DataRelation object passing in the two columns
> try...
>
> DataRelation dRel = new DataRelation("CompaniesCompanyTypes",
> dsCompanies.Tables["Companies"].Columns["typeCode"],dsCompanies.Tables["dsCo
> mpanies"].Tables["CompanyTypes"].Columns["typeCode"]
>
>
>
> On 18/4/05 5:06 pm, in article d40lr6$9v6$1@forums.macromedia.com, "Les
> Matthews" <LesAMatthews@yahoo.com> wrote:
>>>> I have a DropDownList in a DataGrid EditItemTemplate region. The
>> DropDownList is populated by a dataset different than the one specificied
>> as
>> the DataSource for the DataGrid. The DataSource for the DataGrid is
>> "dsCompanies", while the picklist in the EditItemTemplate region is
>> "dsCompanyTypes".
>>
>> Whenever I update a row in the DataGrid, I receive the following error:
>>
>> System.Exception: Control not found in DataGrid column: typeCode
>> at DreamweaverCtrls.DataSet.OnDataGridUpdate(Object Src,
>> DataGridCommandEventArgs E)
>>
>> The field "typeCode" exists in both datasets. It is the PK for
>> companyTypes
>> table and an FK in the companies table.
>>
>> How should I go about populating a dropdown in a DataGrid with a dataset
>> other than the primary datasource for the DataGrid?
>>
>> Thanks
>>
>>
Les Matthews Guest



Reply With Quote

