473,385 Members | 2,180 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Data in Custom Web Control

Does anyone know how I can pass data to a Custom Web Control?
I have been able to pass a DataSet as an object but I can't use it.
DataSets don't seem to be available the namespaces will not load.

Thanks for any help.
Brian K. Williams
Nov 18 '05 #1
2 1149
You can pass data into a custom web control via properties or thru a method that accepts data as a parameters during runtime

How are you passing in the Dataset object?? Thru a method?

Suresh

----- Brian K. Williams wrote: ----

Does anyone know how I can pass data to a Custom Web Control
I have been able to pass a DataSet as an object but I can't use it
DataSets don't seem to be available the namespaces will not load

Thanks for any help
Brian K. William

Nov 18 '05 #2
What I am attempting to-do is pass a DataSet to my control to handle
generating the columns from a property.

I also want to use this same DataSet to handle sorting and paging within the
control.

This is the code I was attempting to use. I could not pass a DataSet to
createGrid because the namespace will not allow System.Data.

public void createGrid(object ds,DataGrid oGrid)

{

if(_datafieldsarray == null)

{ // Write Bound Columns automatically.

for (int i = 0; i < ds; i++)

{

}

}

else

{ // Write Bound Columns from _datafieldsarray value.

arrFields = _datafieldsarray.Split(',');

for (int i = 0; i < arrFields.Length; i++)

{

BoundColumn oCol = new BoundColumn();

oCol.HeaderText = arrFields[i];

oCol.DataField = arrFields[i];

oCol.SortExpression = arrFields[i];

oGrid.Columns.Add(oCol);

}

}

}

// Value would look like "FirstName,LastName"

private String _datafieldsarray;

[Category("_Custom SportPal")]

public String DataFieldsArray

{

get { return _datafieldsarray; }

set { _datafieldsarray = value; }

}

Thanks

Brian K. Williams
"Suresh" <an*******@discussions.microsoft.com> wrote in message
news:44**********************************@microsof t.com...
You can pass data into a custom web control via properties or thru a method that accepts data as a parameters during runtime.
How are you passing in the Dataset object?? Thru a method??

Suresh.

----- Brian K. Williams wrote: -----

Does anyone know how I can pass data to a Custom Web Control?
I have been able to pass a DataSet as an object but I can't use it.
DataSets don't seem to be available the namespaces will not load.

Thanks for any help.
Brian K. Williams

Nov 18 '05 #3

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

Similar topics

10
by: Rigs | last post by:
Hi, I have a textbox with a Custom Validator that utilizes the OnServerValidate method for that textbox. This works fine, however the method only executes when data exists in that textbox after...
1
by: Stephen Adam | last post by:
Hi there, I have written a custom validation control which checks to see of an input field is not empty and contains only numeric data. I was using a regular expression validation control but...
19
by: Simon Verona | last post by:
I'm not sure if I'm going down the correct route... I have a class which exposes a number of properties of an object (in this case the object represents a customer). Can I then use this...
3
by: Uma sakshi | last post by:
Hi I have one VB.NET application,in that application i have one datagrid control.The datagrid control contains somedata.I want to copy the data in a particular cell and paste it into my C#.NET...
7
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I...
3
by: MikeY | last post by:
Hi everyone, I'm having problems, or should I say still having problems with trying to pass data from my custom buttons in my custom controls to my main form listview box. Still scratching my...
14
by: Rolf Welskes | last post by:
Hello, I have an ObjectDataSource which has as business-object a simple array of strings. No problem. I have an own (custom) control to which I give the DataSourceId and in the custom-control...
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
9
by: =?Utf-8?B?VGVycnk=?= | last post by:
Think it is great the way that you can set up a datsource, value member, and display member for a combobox, and map a 'code' to a 'description' and back again by binding the combobox to a...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.