473,493 Members | 3,174 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

webcontrols.datagrid problem...

EMW
On my ASPX page I have datagrid control with 6 columns.
4 of them are bound columns, two are link columns.

In the properties I defined the columns with their widths and names.
In designtime I see the column names appear in the datagrid.

Above the datagrid is linkbutton and when the user clicks on it, the
datagrid is supposed to be filled with info.
In the click-event of this linkbutton, first a function is called to fill a
dataset with that info.

then the following is called:

Dim dv As New DataView(ds.Tables("pdalijst"))
Me.dgLijst.DataSource = dv
Me.dgLijst.DataBind()

But the problem is, nothing appears in the datagrid.

If I use the automatic column property, I get to see the info from the
dataset, but the widths of each column is then automaticly set and that is
not what I want.

What am I doing wrong?

rg,
Eric
Nov 18 '05 #1
5 1058
Hello EMW,
On my ASPX page I have datagrid control with 6 columns. 4 of them are
bound columns, two are link columns.

In the properties I defined the columns with their widths and names.
In designtime I see the column names appear in the datagrid.


Have you also set the DataField property to correspond to the fields in ds.Tables["pdalijst"]?

--
Matt Berther
http://www.mattberther.com
Nov 18 '05 #2
EMW
nope, that must be the problem...

thanks!
"Matt Berther" <mb******@hotmail.com> schreef in bericht
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hello EMW,
On my ASPX page I have datagrid control with 6 columns. 4 of them are
bound columns, two are link columns.

In the properties I defined the columns with their widths and names.
In designtime I see the column names appear in the datagrid.
Have you also set the DataField property to correspond to the fields in

ds.Tables["pdalijst"]?
--
Matt Berther
http://www.mattberther.com

Nov 18 '05 #3
EMW
Could you give me an example, because I cannot find one in msdn.
I think you meant DataKeyField?

rg.
Eric
"Matt Berther" <mb******@hotmail.com> schreef in bericht
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hello EMW,
On my ASPX page I have datagrid control with 6 columns. 4 of them are
bound columns, two are link columns.

In the properties I defined the columns with their widths and names.
In designtime I see the column names appear in the datagrid.
Have you also set the DataField property to correspond to the fields in

ds.Tables["pdalijst"]?
--
Matt Berther
http://www.mattberther.com

Nov 18 '05 #4
Hello EMW,
Could you give me an example, because I cannot find one in msdn. I
think you meant DataKeyField?


<asp:BoundColumn DataField="MyField" HeaderText="MyFieldHeader"></asp:BoundColumn>

--
Matt Berther
http://www.mattberther.com
Nov 18 '05 #5
EMW
thanks!
Solved it!

I needed to set something in the column properties.

rg.
Eric
"Matt Berther" <mb******@hotmail.com> schreef in bericht
news:ut**************@tk2msftngp13.phx.gbl...
Hello EMW,
Could you give me an example, because I cannot find one in msdn. I
think you meant DataKeyField?
<asp:BoundColumn DataField="MyField"

HeaderText="MyFieldHeader"></asp:BoundColumn>
--
Matt Berther
http://www.mattberther.com

Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
5253
by: Sue | last post by:
On code-behind page: (attributes set programatically for each of these elements) linkbutton added to tablecell textbox added to tablecell tablecells added to tablerow tablerow added to table...
0
314
by: Nuno Monteiro | last post by:
Hello! Anyone knows how to add scroll bars in WebControls.DataGrid? -- Cumprimentos, Nuno Monteiro nuno@rcsoft.pt RCSoft - Desenvolvimento de Software, Lda. Telef: 239708708 Fax: 239708701
5
270
by: EMW | last post by:
On my ASPX page I have datagrid control with 6 columns. 4 of them are bound columns, two are link columns. In the properties I defined the columns with their widths and names. In designtime I...
5
2585
by: martin | last post by:
Hi, I am using vb.net and visual studio 2003. I have dragged a table webcontrol onto the designer server and configured a few columns and cells in the editor for the table control. Next I...
1
1799
by: Martin Dew | last post by:
I have a HyperLinkColumn inside my Databound grid on a page, I have been using the URL Field property set to a field name in my bound data, and then using the URL Format String as...
3
2771
by: vcornjamb | last post by:
Hello, I am developing a web form that contains some buttons and a data grid which has as its last column link buttons that will delete the data associated with that row. Everything works fine,...
0
1476
by: I am Sam | last post by:
Ok whats wrong with my toolbar? When I debug I don't get an error message and the databinding is working correctly but the toolbar itself and the <iewc:ToolbarDropDownlist /> control isn't showing...
7
1330
by: Roger Moore | last post by:
Hi all, I have a beginner's question: If webcontrols are rendered to suit different browsers using different HTML syntax for each, how can I create a unified CSS stylesheet to them (using the...
2
1343
by: kito | last post by:
I have the following problem. I have a list of products in a Database. Now I would like to list them on a DataGrid, but in a special manner. In the first cell of a row in the DataGrid I would like...
0
7119
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6989
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7367
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5453
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4889
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4579
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
644
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.