|
I want to show on Column called Sr No in my datagrid. At runtim this column will show values like 1,2,3.... for each selected row based on the records available in dataset. How to acheive this!!!!!!!
Thanks,
Mini Thomas
|
|
|
|
|
you can create an Autoincrement column and seed by 1 and bind with sr. no column.
Be
Bye
|
|
|
|
|
hi,
here is the code to display Sr No. in datagrid. In the following code loadDs is dataset.
if (loadDs.Tables.Count > 0)
{
loadConsultant.Tables[0].Columns.Add(new DataColumn("Sl_NO", System.Type.GetType("System.String")));
foreach (DataTable table in loadConsultant.Tables)
{
int i = 1;
foreach (DataRow row in table.Rows)
{
foreach (DataColumn column in table.Columns)
{
row["Sl_NO"] = i.ToString();
}
i = i + 1;
}
}
}
Regards,
Prya
|
|
|
|
|
Hello Prya,
In ur code how do I bind the row with Datagrid
also there is error on line
foreach (DataColumn column in table.Columns)
{
can u help mi out
Thanks,
Mini Thomas
|
|
|
|
|
hi,
Use the autoincrement column as told by arvind rather than looping through the dataset.
using autoiuncrement column is more efficient than going through loops.
thanks,
Kapil Thakur
(Where's there is Kapil , there is a way)
|
|
|
|
|
Hi!!!
Thanks for attending at my cuestion.
My cuestion is that simple: ¿How can I use CSS with a Multiview Control and some View control within?
It mightbe silly, but I can´t do that. I've googling for a time now and I've founded some examples that apply CSS to make a "tab control" using a Menu control, a Multiview control and view controls, but not interest in that, just in using the CSS with the Multiview and the view.
Greattings, any advice is welcome...
The limits of my language are the limits of my mind
|
|
|
|
|
Hi,
I have got the following problem, maybe one of you guys already ran into it and knows the answer:
I have a Formview bound to a ObjectDataSource for my class [Product]. It contains a Checkboxlist, bound to another ObjectDataSource which gets its Items from my class' [Category] SelectAll() method.
Now every [Product] instance belongs to n categories (Product holds an IList with [Category] instances), and I need to bind them to the CheckboxList's Checked state.
Unfortunately via DataBinding I can only access the SelectedValue (or SelectedIndex) field, which allows only for a single value and can select only one field.
I cannot reach the CheckBoxList via code because evey control within a FormView seems to be completely out of reach. There aren't any visible instances (there is no protected CheckBoxList CheckBoxListCategories anywhere).
So I am completely lost. I hope somebody can help me out of here
--
Jan
|
|
|
|
|
What you want to do exactly i did not got.
If you want to access the checkboxgroup in the formview try
CheckBoxList chkGroup = objFrm.FindControl("objChkGroup") as CheckBoxList ;
and iterate through it.
int index=0;
for(index =0 ; index < chkGroup.Count ; index++)
{
}
I hope this is your problem
|
|
|
|
|
hi friends
how to create the bar chart from database dynamically in asp.net
thanx
regards
saravanan
|
|
|
|
|
|
hi
when i try to use Reporting Services to render a report from aspx page
(web app) (vb.net) by using ReportingServices.dll referennces
i get this erorr :
==================
System.Web.Services.Protocols.SoapException: The permissions granted to user 'NT AUTHORITY\NETWORK SERVICE' are insufficient for performing this operation. ---> Microsoft.ReportingServices.Diagnostics.Utilities.RSException .
note:
=====
i have windows 2003 - sql 2000 sp3 - Reporting Services sp2
i am login as administrator
pls tell me what i can do ?
thank you all
mr nsr
|
|
|
|
|
Do you have permission on reporting server? Can you browse to the reporting service web service? To test this paste the URI you are using to connect to the web service into a browser.
You said: "using ReportingServices.dll referennces ". You added reporting services as a web reference to your application?
Maybe also post the code where the error occurs.
Also check out the MSDN forum on reporting services
http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=82&SiteID=1[^]
|
|
|
|
|
I am working on a web-page in ASP.NET c# that searches the values from the database as per the search criteria and then display the results on the datagrid...This operation takes a while...
Can anyone guide me on how to show up a simple progress bar on the screen until the background database operation is completed...
Thanks
Joe
JO
|
|
|
|
|
I've been going round in circles all day with this.
I'm using a 3rd party library that generates some data and sends it to the http response.
The method signature is
<br />
void ALibrary.WriteTo(HttpResponse Response)<br />
and I would use it like:
<br />
ALibrary myLibraryInstance = new ALibrary();<br />
...
myLibraryInstance.WriteTo(Page.Response);<br />
and it replaces the standard html with its custom response data.
This is great when I want to output the result to a file for download (e.g. PDF, DOC, XLS), but I also want to capture that file to stick it into a blob field in a database.
How do I create a dummy response object and capture the data to a byte array rather than returning it to the browser?
Thanks in advance.
ChrisB
|
|
|
|
|
One of our clients wishes to view company MS Excel reports through their corporate intranet so to accomodate this, I'm referencing the "Microsoft Office 11 Object Library" DLL in vs2005. Through this DLL, I can create any ms excel report I wish. One of my co-workers however, strongly believes generating ms excel reports by using a copy of ms office on the server is a bad idea, however, up to this point, I've been unable to find any bugs in my sample application.
So my question is, are there any serious downsides to generating ms excel reports on the web this way?
The only problem I've come up with so far is the fact that ms office is not a multi-threaded application. Meaning I had to setup some code so that if one user is currently generating a report, a 2nd user cannot begin their report generation until the 1st user is finished.
Other than that though, I haven't had any problems however this is going to be a very involved application (they use 57 different excel reports) so I don't want to spend the next month developing an app using this process only to find out it was the wrong approach to take.
Thanks.
-Goalie35
|
|
|
|
|
|
Thanks for the link indianet. After reading that article, I'll definately be avoiding server-side excel automation.
Can anyone then recomend an alternative to this problem? Creating a CSV file isn't really an option because the reports this company uses contain tabs, background colors, a few pivottables, and an image or two. Our current backup plan is to use Crystal reports which can be exported in xls format however there are a ton of headaches associated with this approach also such as the ability to properly align all of the cells and how to create tabs.
Thanks again.
-Goalie35
|
|
|
|
|
Hi
I have a problem in Event handling, I have two eventhandlers attached with single button. According to checkbox condition i should switch over these event handlers. How can i do it? Please help me.
Raghavendra
|
|
|
|
|
RaghavendraB wrote: I have two eventhandlers attached with single button
What do you mean by this?
Is this waht you want to do?
Button_ClickHandler()
{
if(Checkbox.checked)
Foo();
else
Bar();
}
only two letters away from being an asset
|
|
|
|
|
hii all,
i have check boxes as template colums in data grid, in same form i have two other grid, which is require same functionalty..
i have some code from this site, to check and unchek all the check boxes in grid of header check box , but the porblem is it is checking all the checkboxes of all the grids on the page..
how to apply this to particular grid..
function SelectAllCheckboxes(spanChk){ debugger
// Added as ASPX uses SPAN for checkbox
var xState=spanChk.checked;
var theBox=spanChk;
elm=theBox.form.elements;
for(i=0;i
|
|
|
|
|
hi
u refer this code
function SelectAllCheckboxes(spanChk){
// Added as ASPX uses SPAN for checkbox
var oItem = spanChk.children;
var theBox=(spanChk.type=="checkbox")?spanChk:spanChk.children.item[0];
xState=theBox.checked;
elm=theBox.form.elements;
for(i=0;i
|
|
|
|
|
hii.. i will check with that
thanks for ur help
|
|
|
|
|
Hi,
We are building a webapplication in Asp.net 2.0. We want to make sure that only one instance of application running on Client.
In our current system when an user is logged in . He can open a new window and able to login with other user( or as same user).i want to redirect the user to home page if an user is already logged in.
Simmly one seesion should be allowed for a client machine at a time.
How can we implement this.
|
|
|
|
|
I don't think you can. Why must you have only one instance running on a client? I'm not even sure how to do that in a windows app let alone a web app. You could only allow one session per log in, but what would you do when the user closes a browser but the session is not expired?
|
|
|
|
|
Hi,
Thanks for your reply
Say if the user request the page we need to hook him to the current session if its still active. i am not sure its possible or not.
|
|
|
|