|
Check the Link[^]
Cheers!!
Brij
|
|
|
|
|
I need to bind infragistics grid (with template columns of type DropDown) to data from different tables on different servers.There is no relationship between these tables.
I tried following options but no luck
1. Tried merging data from 2 datasets into one. But that needs me to have relationship between datasets.
2. Adding table from one dataset to another, but got an error "Data Table already belongs to another Data Set".
3.Adding columns to DataSet, error: RowCollection has to be serializable.
4.Setting Value List properties for the columns, but it doesn't reflect.
Just wondering if this is possible or should I try following option:
Get Data from different datasets into a Serializable class and bind the grid to this class.
Not sure if I am on the right track..
Please help!
modified on Wednesday, December 31, 2008 4:22 AM
|
|
|
|
|
Hi,
1. You can only merge two datasets if they are identical. If they are then proceed as follows
DataSet third = new DataSet();
third = first.Tables[0].clone();
//Now Loop through thorough each dataset(First, second) and add row by row to third.
2. I think you are using
dsNew.tables.add(datatable);
Try using
dsNew.tables.add(datatable.Copy());
Use copy command of DataTable to add new table to dataset.
3. I used to add columns to dataset using
dsNew.Tables[0].columns.add("colname",typeof(System.string));
and it works fine
4. I cannot understand what you mean
|
|
|
|
|
Thanks a lot..
1. Datasets are not identical.So I guess I can't use Merge.
2. Copy command of DataTable worked I copied table from one dataset into another dataset.
So now I have a consolidated DataSet with 2 tables(from different datasets)
3. I wanted to add existing columns of a table into another dataset and hence it was giving an error.but since above (2) worked this is fine.
4.I want to bind different columns of infragistics grid with columns from different tables, something like this:
grid.col[0] -> ds.table[0].col[0]
grid.col[1] -> ds.table[2].col[3] etc..
But I can set DataSource property of the grid as only one of the tables:
grid.datasource = ds.tables[0]
now all the columns are bound to cols from tables[0] mentioned above and the individual column bindings are overridden...
|
|
|
|
|
PritiP wrote: 4.I want to bind different columns of infragistics grid with columns from different tables, something like this:
grid.col[0] -> ds.table[0].col[0]
grid.col[1] -> ds.table[2].col[3] etc..
But I can set DataSource property of the grid as only one of the tables:
grid.datasource = ds.tables[0]
You cannot bind a single column of grid to a dataset.
Rather construct the single dataset that servers the purpose
|
|
|
|
|
I was able to bind a column to different table of the dataset as below:
grid.Columns[0].Type=ColumnType.DropDownList;
ValueList vlist = grid.Columns[0].ValueList;
vlist.DataSource=ds;
vlist.DataMember="table_name";
vlist.ValueMember="id";
vlist.DisplayMember="col_name";
vlist.DataBind();
Could do this in Infragistics..Not sure if we can do this with .NET grid though.
|
|
|
|
|
Hi,
I am developing an addin for Outlook 2003. Here I use a CommandBarComboBox for searching purpose. The change event is fired following two situations.
1. Hitting Enter(Return) key after typing search keyword.
2. Clicking the mouse button anywhere in the outlook after typing search keyword.
I need the event will be fired only when hitting Enter(Return) key.
If any solutions exist please share it.
(I need the same functionality as help textbox on the top right corner of the outlook screen)
Thanks,
Prasad J.
|
|
|
|
|
Dear All
I have a problem in crystal report line. I want to make the single line into double line.so i increased the width. And this doesn't work. Then i tried giving "Double Line Property" then i have the error like this.
"Exception of type 'System.Runtime.InteropServices.ExternalException' was thrown." This error occurs and i am not able to set the property.
Can anyone help me
Thanks in advance
|
|
|
|
|
Hi all,
How to connect windows xp sp2 from windows server 2008?They are all on the same network (a workgroup, not domain), with no firewalls in between (excepting Windows Firewall, which I have disabled on windows xp sp2)this is my code.Remote access is success for server 2008 from windows xp sp2.but i can't access windows xp sp2 from windows server 2008.can any one help me? how to solve the problem?
ConnectionOptions connection = new ConnectionOptions();
connection.EnablePrivileges = true;
ManagementScope scope = null;
connection.Authority = "NTLMDomain:" + domain;
connection.Username = "userName";
connection.Password = " password";
//Local Machine
if (compName.ToUpper() == Environment.MachineName.ToUpper())
{
scope = new ManagementScope(@"\root\cimv2", connection);
}
else //Remote Machine
{
scope = new ManagementScope(@"\\" + compName + @"\root\cimv2", connection);
}
scope.Options.EnablePrivileges = true;
scope.Connect();//Getting the error here. Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
//
ObjectQuery query = new ObjectQuery("SELECT * FROM Win32_OperatingSystem");
ManagementObjectSearcher objsearcher = new ManagementObjectSearcher(scope, query);
ManagementObjectCollection objcol = objsearcher.Get();
|
|
|
|
|
Access Denied means the account your code is running under doesn't have the permissions to connect to the WMI provider on the other machine. If your machines are in a workgroup environment, each machine maintains its own accounts and doesn't trust the accounts of another machine. In a domain envirionment, every machine in the domain trusts the same account database.
So, if in a workgroup, you're running the code under an admin account, that account has no meaning to the other machine.
|
|
|
|
|
|
Hi,
I need to generate preprocessed files of all the projects in a solution.To do this,I just want to compile all the files and DONT want to do the linking.
I am working on Visual Studio .Net 2005
I have made the "CompileOnly" property of "VCCLCompilerTool" of a project to TRUE, so that I am expecting only compilation to happen and NO linking. Then I have executed the "Build.Solution" command. But I could see the result that both compilation and linking is taking place for that project, even though that option is true.
Please guide me why this option is NOT working?
regards,
Reshmi
|
|
|
|
|
Actually i am given a project for "mashup"
application in C#..... initially am asked to access a website which
provide " C# API " .... can someone tell websites that provide C# API..
(for ex: google provides API in javascript)....
|
|
|
|
|
Google's got a lot of .Net APIs, check here[^]
|
|
|
|
|
Hi ALl,
Session.Refresh(Entity) is not refreshing data of Iset, it is working properly with property and Object.
But if I am using Iset then I am not getting fresh data.
Bellow is code example.
[ManyToOne(Column = "NoteID", Class = "Note", Cascade = CascadeStyle.All)]
public virtual Note Note
{
get { return _Note; }
set { _Note = value; }
}
I am ussing following tech to retrieve data.
public T Get(int Id)
{
// JISPAT for cache
T Obj;
try
{
if (Id == 0)
{
Obj = this.Session.Get<t>(Id);
}
else
{
Obj = this.Session.Load<t>(Id,NHibernate.LockMode.Upgrade);
}
}
catch (NHibernate.StaleObjectStateException Exc)
{
string str = Exc.Message;
this.session.Evict(this.Session.Get<t>(Id));
Obj = this.Session.Get<t>(Id);
}
if (Obj != null)
this.session.Refresh(Obj);
return Obj;
// JISPAT for cache
//return this.Session.Get<t>(Id);
}
If you have any solution for that then please send me.
Thanks & Regards
Jitendra Patel (JISPAT)
|
|
|
|
|
can any 1 tell me where 2 find open source for forum like this shud be in asp.net,c#.
|
|
|
|
|
ranjithselvaraj wrote: can any 1 tell me where 2 find open source for forum like this shud be in asp.net,c#.
Is google is not accessible to you?try it you'll get a lot on it.
Cheers!!
Brij
|
|
|
|
|
Ditto. Is the CP forums your first search tool? GOOGLE IS YOUR FRIEND!
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Best way is to start yourself by Looking at this site
Think, work and accomplish
Thanks!
Develop2Program & Program2Develop
|
|
|
|
|
How will you create a login[user and administrator] form in asp.net with full coding?
|
|
|
|
|
Try the ASP.NET board[^].
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Check out this link[^]
And, as Mark said, next time use appropriate forum.
Regards,
Lev
|
|
|
|
|
senthil0505 wrote: How will you create a login
It depends on the context. I've never created a log in component the same way twice because on each project the requirements are different.
|
|
|
|
|
I'm running the following code:
StringBuilder sb = new StringBuilder();
byte[] buf = new byte[131072];
string url = null;
url = "http://google.com";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
if (request.HaveResponse)
{
Stream resStream = response.GetResponseStream();
string tempString = null;
int count = 0;
do
{
count = resStream.Read(buf, 0, buf.Length);
if (count != 0)
{
tempString = Encoding.ASCII.GetString(buf, 0, count);
sb.Append(tempString);
}
} while (count > 0);
}
richTextBox1.Text = sb.ToString();
and after code executed richTextBox1.Text contains the same code as I can see if I open in browser url and click on "view source".
But not always. There are some urls, that I can see server's replay in browser, and see html code in "view source", but richTextBox1.Text contains junk. May be there is some problem with page encoding or something?
Thanks.
|
|
|
|
|
What happens if you code your response stream handling as shown in the
example here[^] ?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|