|
HI
How can i calculate datagrid Row
I want calculate the total row of a datagrid
EX :
------
----------------------------
ID Name Marks
----------------------------
1 aaa 200
2 bbb 250
3 ccc 200
----------------------------
Total 650
THX
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
you can get it with items.count
Best Regards,
Apurva Kaushal
|
|
|
|
|
HI
I want to calculate the ROW items Total in Datagrid
Itiems
-------
10
20
30
-------------
Total = 60
---------------
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
Ohh I actually misunderstood your question. For this you can take a label control in the footer of the datagrid to display the total and to calculate the total you can use the Onitemdatabound event there you can take a variable and keep adding all the corresponding values of all the rows.
Best Regards,
Apurva Kaushal
|
|
|
|
|
int j=0;<br />
int RowCount=myDataSet.Tables["tablename"].Rows.Count;<br />
for(int i=0;i<RowCount;i++)<br />
j += Convert.ToInt32(DgDiscovered[i,1].ToString());<br />
textBox1.Text=j.ToString();<br />
Where the mydataset is the datasource of data grid and "tablename" is the data member of the datagrid.
Sathik
|
|
|
|
|
Hi Thx For reply
I am using VB.NET Can U plz CHK Is it right
--------------------------
Dim j As Integer = 0
Dim RowCount As Integer = dsCustomers.Tables("Tottime").Rows.Count
Dim i As Integer
Dim DgDiscovered
While i
j += Convert.ToInt32(DgDiscovered(i, 1).ToString()) '
End While
rc.Text = j.ToString()
-----------------------------------------
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
Hi Friends,
I am having 2 submit buttons on one page. One is to search and other is for newsletter subscription.
When i add text to search textbox and press enter, it validates the other text box which is to enter emailID for the subscription button.
I am not using the .NET validators. I am using my own javascript file.
I tried to check the enter keycode for search textbox and then make the search button click in the javascript, but still the validator fires and then the search button clicks.
Please Help.
Sushant Duggal.
|
|
|
|
|
you have to write a javascript function which will trap the enter key and then envoke the button which you want to.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi,
I already did that
function gotoSearch()
{
if(event.keyCode == 13)
{
document.getElementById('btnSearch').click();
return false;
}
}
It validates the other textbox validation, and then fires the btnsearch click event.
Sushant Duggal.
|
|
|
|
|
Are you getting inside this function? Put a alert and check whether this function is getting called correctly or not.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi Friends,
I am having 2 submit buttons on one page. One is to search and other is for newsletter subscription.
When i add text to search textbox and press enter, it validates the other text box which is to enter emailID for the subscription button.
I am not using the .NET validators. I am using my own javascript file.
I tried to check the enter keycode for search textbox and then make the search button click in the javascript, but still the validator fires and then the search button clicks.
Please Help.
Sushant Duggal.
|
|
|
|
|
Button1.Attributes.Add("onClick","javascript:return confirm( 'are u sure for Delete ');");
i write this code and it work right when show msgbox i see tow button with ok and cancel but
i want see ok and cancel with persian font how can i change them
|
|
|
|
|
i have quiz application. it has several pages. each page contains 1 question. when i answered that question it will go to next page. if i click on Back also it wont come back. only forward navigation. how can i do?;)<
Thanks N regards.... Murali
|
|
|
|
|
Dont repost.
With Regards
Satips
|
|
|
|
|
Hi,
I have a table in MS SQL, with filename[varchar], filecontent[image datatype]. I have the code for uploading a file to the database.
Now i want to retrieve the contents from the database.
The requirement is that, i have to show a datagrid with the file names as one column and a hyperlink column stating "download". On clicking the "download" hyperlink, the popup which comes for file download "Download--Open--Cancel" should appear and when the download button is clicked, the file stored in the database should be downloaded.
TIA,
Sam.
|
|
|
|
|
HI
Guys in my application in crystal reports, the following exception arises some times :
System.Web System.Runtime.InteropServices.COMException (0x80004005): The process cannot access the file because it is being used by another process.
at
CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(Export
Options pExportOptions, RequestContext pRequestContext)
at
CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequ
estContext reqContext)
at
CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportReq
uestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.y(ExportOptions
1)
at
CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportF
ormatType formatType)
Can any one let me know the solution for this exception , plzzzzzz ASAP , thankx in advance.
|
|
|
|
|
Can you show the code, where the exception are firing?
Sathik
|
|
|
|
|
i have a templete couluand in header of that column i have a button. i want when i push that button i can do sorting. where should i write code behine of this button for sorting
|
|
|
|
|
you can use onitemcommand event commant to write the code and rebind the datagrid.
Best Regards,
Apurva Kaushal
|
|
|
|
|
|
always welcome..
Best Regards,
Apurva Kaushal
|
|
|
|
|
what is ur mean from alwayas welcom?
|
|
|
|
|
ptvce wrote: what is ur mean from alwayas welcom?
Actually it is always welcome...
It is a normal courtesy to say that you are always welcome..
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi
i am new to asp.net
i have a control <asp:dropdownlist runat="server" id="dblist">
i want to populate it dynamically. i am using asp.net 2.
can anybody help me plz?
Regards
Saqib
sAqIb
sAqIb
|
|
|
|
|
If you r using a textbox then use:
TextBox txt=new TextBox();
sameer
|
|
|
|