|
Hi,
I have one datatable and i applied select on that datatable now i have the result.
Now i am adding that result into arraylist. but it is giving runtime error.
The code which written is mentioned below
DataTable myTable=null ;
DataRow[] foundRows = null;
dsForData = new DataSet();
ArrayList RequiredList = new ArrayList();
dsForData= Session[strSessionDataList] as DataSet;
myTable = dsForData.Tables[0];
if (myTable.Rows.Count > 0)
{
foundRows = myTable.Select("val like '" + item + "%'");
for (int count = 0; count < (foundRows.Length) - 1; count++)
{
RequiredList.Add(foundRows[count].ItemArray[0]);
}
}
can anybody guide me.... How to bind the data into arraylist.
|
|
|
|
|
dayakar_dn wrote: but it is giving runtime error.
and what is the exception you are getting?
only two letters away from being an asset
|
|
|
|
|
But I use your code only (with a bit modification for putting the code into work).
And It is working fine.
Here is the code
protected void Button1_Click(object sender, EventArgs e)
{
DataTable myTable = null;
DataRow[] foundRows = null;
ArrayList RequiredList = new ArrayList();
myTable = functiongettable();
string item = "Nil";
if (myTable.Rows.Count > 0)
{
foundRows = myTable.Select("Name like '" + item + "%'");
for (int count = 0; count < (foundRows.Length) - 1; count++)
{
RequiredList.Add(foundRows[count].ItemArray[0]);
}
}
}
public DataTable functiongettable()
{
DataTable dt = new DataTable();
dt.Columns.Add("Name");
dt.Rows.Add("Nil1");
dt.Rows.Add("Nil5");
dt.Rows.Add("Nil6");
dt.Rows.Add("Nil3");
dt.Rows.Add("Nil6");
return dt;
}
Can you tell in which line and what error message you are getting?
Niladri Biswas
|
|
|
|
|
dayakar_dn wrote: but it is giving runtime error.
What is the error ? As per Nilidri's Answer, your code is correct. I guess you are missing with some Namespace or Session related part.
So, check what error its giving !
|
|
|
|
|
Hi all,
I have to integrate the webcame into Asp.net web application . i mean using the webcame i want to capture the picture and then store into database kindly suggest me good links where i can learn .
Best Regards
|
|
|
|
|
Rameez Raja wrote: I have to integrate the webcame into Asp.net web application .
ASP.NET has nothing to do with WEB CAM.
|
|
|
|
|
Abhijit Jana wrote:
ASP.NET has nothing to do with WEB CAM.
Thanks for fast reply , then how i deal with webcam ? Any Idea what i have to do ? suggest me the road map.
Best Regards
|
|
|
|
|
You really cannot, not without an ActiveX component ( which means your site will only work in IE ).
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
|
Thanks for reply
I googles allot bt not found the suitable artilce thatswhy i posted here for getting some help from ur experience else i will continue google it for webcam .
you people only give me the suggestions how i can integrate the webcam into Asp.net application
iam studying ur provided artilce link expect more suggestions
Best Regards
|
|
|
|
|
Hi All,
I have to show the reports in the form of graphs/charts on a web page
Is there any good tool available ?
I know there are many tools but want to check if any one has extensive experience on any of the tool who can give me some feeback.
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
Sandeep Akhare wrote: I have to show the reports in the form of graphs/charts on a web page
Is there any good tool available ?
Sandeep,
There are many option for Graph and Chart Available.
First of all, which .NET Framework are you using ? if it is 3.5 SP1 , then Microsoft has provided own Chart Control , you can download the plugins from net.
Now, if you look around for Third Party Control, I will suggest, you can have a look on Dundas Chart and Fusion Chart Control
Thank You !
|
|
|
|
|
you beat me by couple of seconds
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Manas Bhardwaj wrote: you beat me by couple of seconds
|
|
|
|
|
Thanks for quick reply ..
i am using dot net framework 3.5 but not sure if i am having SP1 or not
I think Dundas and Fusion Chart are not free.
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
Sandeep Akhare wrote: i am using dot net framework 3.5 but not sure if i am having SP1 or not
You can download the SP1 and also download the Microsoft Chart Control Extension and Visual studio Plugins.
Sandeep Akhare wrote: I think Dundas and Fusion Chart are not free
Yes, But if you are hosting your site, you can ask them weather they are providing the license for that or not.
And, Fusion Chart having some Nice Free Chart Control, You can check them
FusionCharts Free v2.1 - Free Flash Charts[^]
Hope this will help you !!
|
|
|
|
|
Sandeep Akhare wrote: Is there any good tool available ?
There are many , but most of them are not free.
MS also released their own charting control [^]some time back but it need .Net framework 3.5 SP1
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Thanks for the reply
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
you can use report viewer control to show reports,charts
One person's data is another person's program.
--J.Walia
|
|
|
|
|
For great support at a cheap price I use ChartDirector
|
|
|
|
|
How can I rotate advertisement images by using java script.
Images will come from Data Base dynamically.
You get the best out of others when you give the best of yourself.
|
|
|
|
|
and how is it related to ASP.Net.
Web Development forum is a better place to ask this. Infact, a simple google seach should help too.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
trilokharry wrote: How can I rotate advertisement images by using java script.
Images will come from Data Base dynamically.
You can use AJAX Slide Show, which is available with AjaxToolkit
or Here is an good application on Code project, using JavaScript
Slide-Show User Control[^]
Hope, this will help you !
|
|
|
|
|
I took advantage of some code I found on these forums and have created a form that has a nested gridview. The first gridview is bound using the SqlDataSource and on the OnRowBound event, bind data to the nested gridview. Then using JavaScript i hide the nested gridview until the user clicks on an image. The code I found for the javascript nested grid view is here. I then added code to highlight the selected row in the the first gridview. What i need to know is how would I go about adding code to make it so that I can do the same for the nested gridview?
Sample code
protected void Page_PreRenderComplete(object sender, System.EventArgs e)
{
//GridView nestedGrid = (GridView)GridView1.FindControl("GridView2");
foreach (GridViewRow y in GridView1.Rows)
{
y.Attributes.Add("onclick", "setSelected(this);");
}
}
function setSelected(selRow)
{
// alert(selRow.rowIndex);
var tbl = document.getElementById("GridView1");
for(var i = 1; i < tbl.rows.length; i++)
{
if(selRow.rowIndex == i)
{
selRow.style.fontWeight = "Bold";
selRow.style.backgroundColor = "Yellow";
}
}
}
But once i moved to child grid that time Click event of parent Grid cell does not fired so all highlited row of parent grid gone.
so how to solve it
Raghvendra
modified on Tuesday, June 30, 2009 12:06 PM
|
|
|
|
|
Hi all,
I have 2 questions about CSS for my ASP.Net app. (I'll admit this is heavily CSS skewed rather then ASP.Net, but it seems the most appropriate forum?)
1) I have a div inside another div. I have used CSS to position the inner div above the outer div so that I can make something appear to pop up on postback. This works fine in IE, but in other browsers it seems to stop me clicking on any control inside the inner div. Does anybody have any idea what I can do to avoid this problem?
2) If there is a disabled button on the form, what is the CSS to stop the font from appearing embossed? I can already change the basic appearance of the button, but I'm having problems when the button is disabled - any ideas?
Thanks in advance,
Chris
[Edit: It has been pointed out that this should be in the Web Development forum. I'm not going to delete this post so that it can be referenced later.]
[Edit 2: I have now found the solution to (1) - I accidently had an invisible div above the rest of the page - I used a px measurement rather then a % by accident in my CSS]
modified on Wednesday, July 1, 2009 4:34 AM
|
|
|
|