|
hi
i'm working on hiding data in structure of microsoft word document 2003
my problem is how i access to document stream and table stream in strucutre of word
i think i must entring the root first
please help me
|
|
|
|
|
you can use IFilter that reads pure text of a document. It's amazing )
but I don't know how to reach that table stream
|
|
|
|
|
There is a method called datatable.select(string) to filter rows from a datatalbe
But the string must contains one columnname in the datatable.I know nothing about the datatable,what i want to get is just the first N rows in the datatable.
what should i do? Thanks
|
|
|
|
|
The DataTable's Rows property contains all the rows in the table. Just loop through it.
|
|
|
|
|
IEnumerable<DataRow> dt = myDataTable.AsEnumerable().Take(3);
Now, you have a new DataRow list
modified on Wednesday, July 16, 2008 7:06 AM
|
|
|
|
|
thanks,thank you very much!
accrooding your way i have solve my question.I could get the first 100Rows,
But another question is how do i get the second 100 rows(101-200)?
because i want to display 100rows/page.
thanks for any help.
|
|
|
|
|
if you thing to make paging you can use this:
Maybe it's a bit long way but I couldn't find another way.
for first 100 records:
IEnumerable<DataRow> dt = myDataTable.AsEnumerable().Take(100);
for next n * 100
IEnumerable<DataRow> dt = myDataTable.AsEnumerable().Skip(n * 100);
I meant if someone clicked 5. page
n=5
IEnumerable<DataRow> dt1 = myDataTable.AsEnumerable().Skip(n * 100);
than you need new table with your new rows (dt1)
your secondTable = dt1
after that again
IEnumerable<DataRow> dt2 = secondTable.AsEnumerable().Take(100);
I hope it's helpfull
modified on Friday, July 25, 2008 8:31 AM
|
|
|
|
|
Thank you very much!i will try.
Thank you!
|
|
|
|
|
Hi all,
How do i know that there is some row exist in the grid or not ...
i have to test a condition like
if(this.abcgridview.CurrentRow.selected)
{
// do something
}
am calling this condition from two different places
in first case grid has some rows..that time no problem am able to execute my task
but in second one i dont have anyvalue in the grid that time it is throwing me error message ...
like "Object reference not set to an instance of an object".
can you please help me here ...
Thank you..
vikas da
|
|
|
|
|
if(dataGridView1.Rows[0].Cells[0].Value.GetType() == typeof(DBNull))
{
}
|
|
|
|
|
Thank for ur reply its done ...
if (this.abcDataGridView.CurrentRow == null)
{
//some message
return ;
}
i am trying with ur code now ..
vikas da
|
|
|
|
|
hi,
how can i get the data from i list and then put such data in textbox,
like that
DomainContext objContext = new DomainContext(new ManageInstitute());<br />
objContext.AddField(EntityMapper.School.SCHOOLID,8);<br />
IList objList= objContext.Load(EntityMapper.Entities.SCHOOL, DomainMapper.GET_SCHOOL_BY_ID);
then how can i put the data in "textbox" from "objlist"
textbox.Text=objlist??????
|
|
|
|
|
IList implements IEnumerable . So you can use foreach to iterate the collection and set necessary values to textbox.
foreach(object obj in objList)
{
textbox.Text = obj.ToString();
}
|
|
|
|
|
Hi everyone
I'm writing a web application which has a button called 'go', when it's clicked it takes long to execute, so I want to play a flash file while it's being executed, so I want to call two methods playflash function(written in javascript in the header of aspx file) and run(written with c# placed in the aspx.cs file), when this button is clicked how should I do this? I tried the following code but it didn't work onButtonClicked="playflash();run();"
Please help me.
|
|
|
|
|
You can use some AJAX calls to do this. Look at the AJAX toolkit.
|
|
|
|
|
Instead of onButtonClick, use onClientClick.
|
|
|
|
|
How to display thumbnail image in listview controller.
there are three type files in listview.
1,normal files : display system thumbnail.
2,image files : display image thumbnail.
how to do?
if you can provide the project ,very thank you!
|
|
|
|
|
I can supply you with my code which is downloaded from www.codeproject.com. I hope that you can get some information from my code.
|
|
|
|
|
I am executing a query
ObjectQuery query = new ObjectQuery("Select TimeWritten from Win32_NTLogEvent Where LogFile='Application' ");
it gives, Timewritten= 20080715091712.000000+330 which format of dateTime is it.
how could i compare it with DateTime having format mm/dd/yyyy HH:MM:SS, as i compare it with it gives error.
Regards
|
|
|
|
|
I think you must write your own method to compare it.
|
|
|
|
|
Hello,
I am using http to get a request from a server. The server has been setup to receive a customer ID and return the balance.
However, I am getting an error message with the code I am using below: "Invalid URI: The URI scheme is not valid."
From what I can make out by using wireshark is that the server expects a customerID and the balance will be returned. I am not sure that the data is another parameter that the server expects.
So how can I write the URL that expects a parameter like the customer ID?
Many thanks for any extra help,
<br />
private void btnGetBalance_Click(object sender, EventArgs e) <br />
{ <br />
try <br />
{ <br />
HttpWebRequest wr = (HttpWebRequest)WebRequest.Create("000.000.00.00:8080/billing/servlet/comm.billing.GetBalance?Date=17:54:24&CustomerID=8057"); <br />
HttpWebResponse res = (HttpWebResponse)wr.GetResponse(); <br />
StreamReader sr = new StreamReader(res.GetResponseStream()); <br />
string balance = sr.ReadToEnd(); <br />
} <br />
catch(UriFormatException ex) <br />
{ <br />
MessageBox.Show(ex.Message); <br />
} <br />
catch(Exception ex) <br />
{ <br />
MessageBox.Show(ex.Message); <br />
} <br />
} <br />
|
|
|
|
|
Problem solved.
I missed of the http://
|
|
|
|
|
Subtle, but it happens
|
|
|
|
|
Hi.
I'm currently creating a game that contains a lot of characters. I'm now facing the problem of getting a very high complexity in my application because of the high number of characters.
I wanted to make a CharacterHandler that creates instances of the characters (Need to be a factory patteren of a kind, character creations need to take game difficulty into accound etc.)
this is some code from a character:
public class Bananas : NormalBrush, ILevelObject, IPointObject
{
private readonly int _collisionGroup;
private readonly float _mass;
private Body _body;
private Geom _geom;
public Bananas(Vector2 position, int collisionGroup, float mass, float scale, ContentManager contentManager)
: base(Color.White, position, contentManager.Load<texture2d>("Content/Objects/Fruits/Bananas"))
{
_collisionGroup = collisionGroup;
_mass = mass;
base.Scale = scale;
}
}
Is there a way that i can change the inheritance of the objects to simplify the creation of the characters or maybe use C# generics to do the job?
Any improvements are welcome.
EDIT: To sum it up.
Instead of doing:
CharacterHandler.CreateBananas(position);
CharacterHandler.CreateOrange(position);
CharacterHandler.CreateApple(position);
I could do something like this:
CharacterHandler<bananas>.CreateCharacter(position);
and so on.
|
|
|
|
|
Hi,
I have a usercontrol inside a form.
The form has one toolStripButton.
I want change toolStripButton visibility from the usercontrol.
How can i do that?
I don´t want to open a new form!!!
In Form_Main:
public bool _visibility_form
{
set { ToolStripLabel_Username.Visible = value; }
}
In UserControl_Login:
private void button1_Click(object sender, EventArgs e)
{
Form_Main frm = new Form_Main();
frm._visibility_form = _visibility_usercontrol;
frm.Show();
}
bool visibilty = false;
public bool _visibility_usercontrol
{
get { return visibilty; }
}
|
|
|
|