|
The .NET Compact Framework doesn't supporting printing. You'll have to use a third party solution to do this. I think HP has one, but I don't know what it's called.
|
|
|
|
|
i am using dotnet 2003.i want to move records using firstbutton,previous button,next button,last button in vb.net windows application(not web application).
|
|
|
|
|
Do you mean moving within the record index or moving a record within the index?
I think I'm going to call my next project "Chuck Norris". It's a sure way to guarantee it's unbreakable.
• • •
But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson
|
|
|
|
|
R U showing records in textboxes or in grid ???
regards,
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
I'm writing a device application that runs on Windows CE. Some of the command buttons have multiple lines of text which do not seem to display correctly at run time. I only see the first line of text followed by two boxes which must be the carriage return line feed characters. How can I display both lines of text?
|
|
|
|
|
I haven't done any mobile development, but it would appear that multi-line text on buttons is not supported.
|
|
|
|
|
|
|
This is a question for the ASP.NET Forum.
|
|
|
|
|
It would be better to put the code that adds the attribute to the onclick event to the pre-render event of the datagrid. javascript executes on the client so it will always happen before the item creted event. In the prereder event you can loop through the rows in the datagrid and add the attribute to the correct button based off the label on that row.
Hope that helps.
Ben
|
|
|
|
|
could you please provide some sample code? One more thing, I want "onclick" event fired after the button in datagrid clicked, because I want to get the value from that row. But it seem like the client scipt always fired before the item of datagrid created. Please help. I really appreciated.
|
|
|
|
|
First, the javascript will always fire before the post back to the page. That is ok you just have to set the javascript on the first page load of the page. I will give you the basics of what you need to do then I think you should try to do it, if you run into trouble let me know and I can try to help you with your code. It doesn't help you learn much if I just write the code for you.
prerender of the gridview event
foreach gridviewrow in gridview
lbl = gridviewrow.findcontrol 'This is where you get the label or whatever
'that has what info you need
btn = gridviewrow.findcontrol 'this is where you get the delete button
btn.Attributes.add("onclick","return deleteconfirm("+lbl.text+")"))
end forloop
Hope that helps.
Ben
|
|
|
|
|
Hi Ben,
Thanks for your suggestion, but i don't think it's going to work.
Here is what i have:
Sub dgProgram_PreRender(ByVal sender As Object, ByVal e As System.EventArgs)
Dim item As DataGridItem
For Each item In dgProgram.Items
Dim lbl As Label
Dim btn As Button
lbl = CType(item.FindControl("lblProgram"), Label)
Me.program.Value = lbl.Text
btn = CType(item.FindControl("btnDel"), Button)
btn.Attributes.Add("onclick", "return deleteTesting(" + program.ClientID + ");")
'btn.Attributes.Add("onclick", "return deleteTesting(" + lbl.Text + ")")
Next
End Sub
function deleteTesting(v)
{
//v = document.getElementById("<%= program.ClientID %>").value;
return confirm('are you sure to delete ' + v.value + '?');
}
You said the javascript always fire before the postback, then how can we pass the current value of the row that we click on to the javascript. I have tried it many ways, it only pass the value of the last row of the datagrid to javascript. Supposed I have 5 rows in datagrid, when i click "delete" on row 1 and row 3, how we pass the values of these 2 rows to javascipt if you said the javascipt fire before the postback? What am I missing? Please Help!
|
|
|
|
|
What you will want to do is pass in the lbl.ClientID. Then you will have the actual label getting passed into the javascript. So then the v.value should be correct.
Ben
|
|
|
|
|
Ben,
I know that. But what I am talking about is that if you have a datagrid of 5 rows, the label store only one value of the last row in datagrid, because when you loop through the datagrid items in prerender event, the label get only the value of the last row, and the javascript fire before the postback. So no matter which row you click on "delete", it only pass the value of the last row to javascript. You agree? Anyone out there have any idea how to get the value of the row you click on? Thanks
|
|
|
|
|
So you are saying that the label is not in the datagrid row, but out side of the datagrid itself? If that is the case I would suggest adding a template column that has a label that you set to visible = false. Then pass that label in from each datagrid row and you should be good.
Ben
|
|
|
|
|
Normally when you pass the clientID of a control into javascript it is just like passing the object itself. I would suggest debuging the javascript and seeing if the label object is getting passed in. I have a fair bit of code that does some very similar stuff so I know it can be done.
I have written an article on debugging javascript if that helps:
http://www.codeproject.com/useritems/UsingVSToDebugJavascript.asp[^]
Ben
|
|
|
|
|
Ben,
Your article is great
That is cool if i could debug the javascript. I did not know that.
I have tried it: I have set the breakpoint both in pagebehind code and the javacript. But when i debug it, it only run through the pagebehind code. how do i make the pointer go through the javascipt in aspx page where i set the breakpoint? Thanks.
|
|
|
|
|
Make sure your IE browser has unchecked the disable script debugging. Then in your Internet explorer click on view then script debugger and then break next statement. Then when you click the button it should go into the html file. Press F11 to step into the javascript call.
Ben
|
|
|
|
|
Hi all! I saw Damien's replies on the offer to help with some code, but havnt had any luck in contacting him. I reached a bit of a struggling point, and hope someone can be able to help? Im receiving GPS data through the COM port. Only the GPRMC sentence. I have to display the route (or path) a person moved, for example, on a graph of about 20mx20m... If anyone can help me with that code, id really appreciate it, its also for my final project at uni, and unfortunately its my first time with VB.I also have to display a box with total distance travelled, but that wont be to difficult i reckon, its only a simple Pythagoras with the x and y.
Thank all for the time to read this!
|
|
|
|
|
Hey,
I've created a word document and have added text to it. I now need to select this text and pass it to a string variable. Any ideas? Also, if this is possible, if some of the text was bolded...will those properties be passed through to the string variable? Just curious, thanks.
---
reegan41
|
|
|
|
|
reegan41 wrote: I now need to select this text and pass it to a string variable
Sure. You would need the Visual Studio Tools for Office or the Office Primary Interop Assemblies. Then, you would use the Word object model to select and copy the text. Something like this[^] exmaple.
reegan41 wrote: Also, if this is possible, if some of the text was bolded...will those properties be passed through to the string variable?
No. The string variable cannot hold the Word formatting objects. You'll get just the text, nothing more.
|
|
|
|
|
thanks alot man
Cheers,
reegan41
|
|
|
|
|
I have the need to group a set of text boxes and labels for ease of use. I want to put a simple box around these items and I am not sure if a GroupBox is overkill for it.
Any recommendations or is it fine to use a GroupBox for nothing but aesthetics?
Thanks,
Dan
|
|
|
|
|
A GroupBox is a pretty lightweight control. It'll work for what you want it to do. Just don't expect a lot of customization options with it.
|
|
|
|