|
I want brief info about editable datagrid
|
|
|
|
|
|
I will have multiple datagrids on a page. Each data grid will be the same in structure, but seperate from the others due to user requirements of collabsibility, totalling, etc. Now the database will determine how many datagrids I will need to display. in addition to the datagrids I need to display a bunch of descriptive text for each datagrid
|
|
|
|
|
Hi,
The contents of my asp.net page get all jumbled up when I view it using Firefox! I heard that there is an article here at code project that dealt this problem but I couldnt find it. Can any1 help me out here !
There is no patch for ignorance
-- modified at 2:22 Saturday 13th May, 2006
|
|
|
|
|
I guess it's rather an HTML mismatch.. as you're HTML is not fully W3C compliant..
Firefox interpretes things a wrong way. Another local forum here had the same problem, and it was a too much..
Just a thought,
Mike
|
|
|
|
|
The problem is just related to the uploading file.
Let me explain.
I have grid in which i place the file upload control.Now when i pick up the file from my system(LocalHost) to the system connected to my network i take the path with the file name and bind with the lable placed in grid on insert command.
Now, When i clicked on save button which is placed on page.
It produces an exception some thing like that "remote system is locked"
if i used the file.copy("Path form remote system","path on server").
But it will copy file if i pick up the file from same system.
Now, When i swiched over to FSO and try to copy file from remote file to the server than it will produce the another exception some thing like "Bad user and Password to access the remote file"
Please help me out it's very urgent.
Any kind of help appreciated.
thanks
Tirthesh jain
Tirthesh jain
|
|
|
|
|
Hi
My boss asked me to develop an application where it uses datagrid and left most corner I will have "+" and "-" image buttons. On click of "+", a blank record need to be added into datagrid, so that user can insert a new record. Onclick of "-", it should delete the particular record.
Well I implemented the same. But I used Static datatable to insert new record, so that the value will persist across post backs. Everything worked fine, as soon I started testing I found a big error.
While two persons starts working in same page from different PCs, other person's insertions are visible to the first person. I understood its because of static. The static datatable is being shared across the users!!.
But I gone so long that I can not think of going back now. I have done around 15 pages in the same way!!!, so going backward I can not even imagine.
Is there any alternative?, instead of using static datatable, can I use any other alternative?
below is my code snippet
//Declared as class variable
static DataTable dt;
//// When user clicks "+" or "-" button in datagrid
private void dgGoals_ItemCommand(object source,System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
//Each row in datagrid will have + and - imagebuttons at left most column
//Updates the datatable
updateDataTable();
//IF the user has clicked "+" image in datagrid right most column
if(e.CommandName.ToString()=="+")
{
// Adds a new row to datatable, so that after binding
// to datatagrid, it shows a blank row in datagrid
DataRow drow=dt.NewRow();
dt.Rows.Add(drow);
updateDataTable();
bindData();
}
//If the user clicks "-" image button in datagrid's left most column
else if(e.CommandName.ToString()=="-")
{
//The first column of Datagrid has serial number(1,2,3,4...)
//If the user clicks "-" it removes row at that position
dt.Rows.RemoveAt(Convert.ToInt32(e.Item.Cells[0].Text)-1);
}
bindData();
}
}
}
/* Update the datatable before moving to some other page in Datagrid etc*/
private void updateDataTable()
{
for(int k=0;k
|
|
|
|
|
Hi there,
The simple way to persist user-sepcific data is to use the Session object. To work around the issue with few changes, you may define a property named dt in lieu of the static variable dt.
DataTable dt
{
get
{
return Session["dt"] as DataTable;
}
set
{
Session["dt"] = value;
}
}
|
|
|
|
|
i want write a number and with click a button convert it for text
for example:
123 convert to: onehundered twenty two
can any body help me???????????
|
|
|
|
|
ptvce wrote: i want write a number and with click a button convert it for text
for example:
123 convert to: onehundered twenty two
can any body help me???????????
Homework question? I remember getting a question like that when I was at uni'.
You might like to take some time to think about any patterns in the language for articulating numbers. If you've ever learnt a foreign language this might be quite easy as you have to do the same when learning the new language.
Once you have made an attempt at solving this and if you have any more problems then we might be able to help you further.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
i want write a number and with click a button convert it for text
for example:
123 convert to: onehundered twenty two
can any body help me???????????
|
|
|
|
|
I’d suggest to divide your current number first.
With the number “123”:
Divide a copy of your number by 100, that would give you 1, which you can hardcode to be onehundred
Subtract that number from your original number, which will leave you with 23””. Then divide another copy by 10, which would give you 2. (make sure to store as integers, without decimals).. This can be hard coded as “twenty”.. Subtract that data, and the remainder are the single units.. which, again hardcoded would give you 3 ..
Probably there’s a much easier way that would increase cpu and decrease headache speed..
Michael
www.code.ae
|
|
|
|
|
You can do it on the client side with the help of javascript.
Go through this link this will help you.
http://4umi.com/web/javascript/numbertoword.htm
Hope this will solve your problem.
Best Regards,
Apurva Kaushal
|
|
|
|
|
thanks that is very good example very thanks
|
|
|
|
|
How can i make Dynamic data grid or repeate
I fetch records from database depending on them i have to make and display their corresponding records in datagrid
for ex if i got three value from database three data grids shod be come and their record
if i got five value from database five data grids shod be come and their record
|
|
|
|
|
better use repeter inside repeter
put a repeter
<asp:repeter id="outer" ...="">
<itemtemplate>
<asp:repeter id="innerRep">
..
The outer repeted should be repeting the number of records u have
in the itemdatabound event of the outer repeter write
(e.item.findControl("innerRep") as Repeter).datasource=ds.tables[i]
|
|
|
|
|
Pls give some example of this inever faced this kind of task
|
|
|
|
|
actually my requirement is
I will have multiple datagrids on a page. Each data grid will be the same in structure, but seperate from the others due to user requirements of collabsibility, totalling, etc. Now the database will determine how many datagrids I will need to display.
|
|
|
|
|
hi,
i h a class a.aspx.cs which is derive from another class b.cs and a.spx also h a materpage M.aspx which mean it also inherite M.aspx.cs
now the problem is that when i call this page it is being loaded towice without being postback .i second time page load the Post back is still false
due to which gridview column get twice as i m declaring them dynamically but i h solved this problem using Clear() Method .
what might be the reason can some one help me in this regard .
is using Master page and also deriving from basic page causing the problem
Thnx in advance
|
|
|
|
|
Hi there,
I doubt that what you said here is not the code that causes the error, one of the reasons is that the Master page normally does not end with the .aspx extension. Could you post your real code?
|
|
|
|
|
Hi
I want to bind a tree view to a collection object.
I bind the tree view's datasource in the code behind. how do i bind the data items.
I try doing it but i get this error :
System.InvalidOperationException: HierarchicalDataBoundControl only accepts data sources that implement IHierarchicalDataSource or IHierarchicalEnumerable.
I dont have any problem when i bind the collection to a datagrid.
Any help appreciated.
thanks
Jo
|
|
|
|
|
The DataGrid control inherits from the base class BaseDataList which simply requires that the datasource is an object implementing the IEnumerable or IListSource . Meanwhile, the TreeView control (and the Menu control) inherits from the HierarchicalDataBoundControl which only accepts the datasource implementing the IHierarchicalDataSource [^] or IHierarchicalEnumerable [^] interface like you're seeing. For example, in the .net framework the abstract class HierarchicalDataSourceControl implements IHierarchicalDataSource and has two child derived classes SiteMapDataSource and XmlDataSource , and the SiteMapNodeCollection is an example of implementing the IHierarchicalEnumerable inferface. In your case, your custom class needs to satisfy this requirement if you want to bind it to the TreeView control, otherwise you need to manually create the child node collection of the TreeView control.
|
|
|
|
|
Hi All
I am new to developing ASP code behind (VB) via Microsoft Visual Studio .NET 2003, is anyone kind enough to point me in the right direction to connect to MSDE 2000?
I have managed to make connections to a MSDE2000 SQL dbase as console and VB but am struggling to get connected as a webform.
I have searched the web for examples but this is obviously so simple that there are no examples or comments explaining how to do this!
Here is my test code...
Dim sqlconn As New SqlClient.SqlConnection
sqlconn.ConnectionString = "Integrated Security=True;" & _
"Data Source=LocalHost;Initial Catalog=Test;"
sqlconn.Open()
Dim sqlComm As New SqlClient.SqlCommand("SELECT * FROM " & _
"tblDocuments", sqlconn)
Dim sqlReader As SqlClient.SqlDataReader
sqlReader = sqlComm.ExecuteReader
DataGrid1.DataSource() = sqlReader
DataGrid1.DataBind()
When I run the app I get...
SQL Server does not exist or access denied.
Exception Details: System.Data.SqlClient.SqlException: SQL Server does not exist or
access denied.
Source Error:
Line 119: sqlconn.ConnectionString = "Integrated Security=True;" & _
Line 120: "Data Source=LocalHost;Initial Catalog=Test;"
Line 121: sqlconn.Open()
Line 122:
Line 123: Dim sqlComm As New SqlClient.SqlCommand("SELECT * FROM " & _
The database is OK because I can connect to it in 'Server Explorer' within VS Studio and view all the data.
Can someone outline each step required? as I am obviously mising something really silly.
Thanks
|
|
|
|
|
Taterface wrote: Line 119: sqlconn.ConnectionString = "Integrated Security=True;" & _
The connection string must have the sql instance name .
------------------------------ "The Soapbox has been so ..."
|
|
|
|
|
Hello,
Using a LinkButton how can I ReLoad or Navigate to a different page in an IFRAME.
Thank you for the help.
RB
|
|
|
|