|
Take a look at this[^] article.
Books are as useful to a stupid person as a mirror is useful to a blind person. - Chanakya
|
|
|
|
|
hi sir,
this code not run in window application sir simple code send me.
please sir..
|
|
|
|
|
Well, I downloaded the code from that article, it compiled and yeah it is a Windows Forms Application. You have to go through the complete article to understand how to implement paging in DataGridView.
Good Luck!!
If you fail to plan, you plan to fail!
Books are as useful to a stupid person as a mirror is useful to a blind person. - Chanakya
|
|
|
|
|
hi sir
i am using following code for encrypt my textbox value and save it in encrypted form to our database.
Public function encrp(ByVal enc As String) As String
Dim ctr As Byte() = System.Text.ASCIIEncoding.ASCII.GetBytes(enc)
Dim c As String = System.Convert.ToBase64String(ctr)
Return c
End function
and following code for decrypt the value for showing in textbox
Public function decryp(ByVal c As String) As String
Dim b1 As Byte() = System.Convert.FromBase64String(c)
Dim f As String = System.Text.ASCIIEncoding.ASCII.GetString(b1)
Return f
End function
but sir i am unable to decrypt my dataset with the help of this function to show the record in datagridview.so please help me for decrypt the dataset.
|
|
|
|
|
You call converting a string to Base64 encrypted? That's not encrypted at all.
The code is correct as far as I can see. You're going to have to double-check what you're passing into each method and what you're getting back.
|
|
|
|
|
hi sir ,
send code in decrypted dataset in database
please sir
|
|
|
|
|
No, I'm not giving you any code.
You've already got the code that does the job. For some reason, you've either not following what youre passing into the encryption/decryption methods or you're not storing or retrieving the data from the database properly.
|
|
|
|
|
I need Readonly ComboBox in vb.net windows application, for this requirement i used to use textbox & combobox together in the same place.
TextBox Properties
ReadOnly=True
TabStop=False
ComboBox Properties
AutoCompleteMode=SuggestAppend
AutoCompleteSource=ListItems
TabStop=True
in ADD/EDIT events set ComboBox Enabled=True, if the event is done ComboBox Enabled=False
this is my code
Private Sub ComboBox1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs)
Handles ComboBox1.GotFocus
TextBox1.Visible = False
End Sub
Private Sub ComboBox1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs)
Handles ComboBox1.LostFocus
TextBox1.Visible = True
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles ComboBox1.SelectedIndexChanged
TextBox1.Text = ComboBox1.SelectedItem().ToString
End Sub
in design TextBox on top of the ComboBox, can see only the ComboBox Button.
Please give me any simple solution for this....
N.K.Veeramani
Software Engineer
InteriTech SDN. BHD.,
Malaysia
|
|
|
|
|
Your logic, at a form level, seems wrong. When you display the dialog you should know if CRUD is required at which point you display a combo so the user can edit the data. If the user is opening the form as RO then either disable the combo or display a textbox with the required value.
I cheat, if the user does not have CRUD rights on the form/data I make the save button invisible/disabled. The user can do what they like, just can't save the results.
|
|
|
|
|
thanks for the reply.
i will tell why i need like this
if i set ComboBox enabled=false the user can't the value clearly. thats-why i needed like that
so how to solve this
N.K.Veeramani
Software Engineer
InteriTech SDN. BHD.,
Malaysia
|
|
|
|
|
My point is why are you making the combo readonly. Simply disable the save button.
If you insist on readonly then have a textbox on display when the form is in the view only mode and swap for a combo box on the add/edit event. If the act of entering the combobox changes the state of the form to edit mode then why are you bothering to have it readonly.
|
|
|
|
|
Someone didn't like your answer...
I'll pay you back
I don't speak Idiot - please talk slowly and clearly
I don't know what all the fuss is about with America getting it's first black president. Zimbabwe's had one for years and he's sh*t. - Percy Drake , Shrewsbury
Driven to the arms of Heineken by the wife
|
|
|
|
|
Considering Yogi's answer, I didn't like it either but thanks anyway.
|
|
|
|
|
I need Readonly ComboBox in vb.net windows application, for this requirement i used to use textbox & combobox together in the same place.
TextBox Properties
ReadOnly=True
TabStop=False
BackColor=Window
ComboBox Properties
AutoCompleteMode=SuggestAppend
AutoCompleteSource=ListItems
TabStop=True
in ADD/EDIT events set ComboBox Enabled=True, if the event is done ComboBox Enabled=False - now the user can see the value clearly b'coz of textbox
this is my code
Private Sub ComboBox1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs)
Handles ComboBox1.GotFocus
TextBox1.Visible = False
End Sub
Private Sub ComboBox1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs)
Handles ComboBox1.LostFocus
TextBox1.Visible = True
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles ComboBox1.SelectedIndexChanged
TextBox1.Text = ComboBox1.SelectedItem().ToString
End Sub
in design TextBox on top of the ComboBox, can see only the ComboBox Button.
Please give me any simple solution for this....
N.K.Veeramani
Software Engineer
InteriTech SDN. BHD.,
Malaysia
|
|
|
|
|
I assume you want to make the combox box read only, so that user can't type in. For that try changing the DropDownStyle property to "DropDownList"
Books are as useful to a stupid person as a mirror is useful to a blind person. - Chanakya
|
|
|
|
|
I really, really hate missing the bloody obvious, all the faffing about with text boxes and events must have confused me, change the style, of course. mutter mutter bloody idiot
|
|
|
|
|
Oh please calm down.. I guessed the issue because I know how some newbie ask the question. They want to do something else and ask something totally irrelevant.
Books are as useful to a stupid person as a mirror is useful to a blind person. - Chanakya
|
|
|
|
|
you can change the dropdownstyle property of combobox to dropdownlist. Then the user will not be able to change the content.
|
|
|
|
|
that is ok but i want the same style in dropdown not in the dropdownlist
thanks for your reply
N.K.Veeramani
Software Engineer
InteriTech SDN. BHD.,
Malaysia
|
|
|
|
|
Hi friends
I am developing my project in .net framework2.0 and c#.I am using microsoft reporting services and created an rdlc file.I am using reportviewer control to load and display the report.
But I am not able to get the report and i am not getting any error.
Below is my code.
private void BindCustomersreport()
{
ds = new DataSet();
RBLL = new ReportBLL();
ds = RBLL.ShowCustomersReport(RBLL);
if (ds.Tables[0].Rows.Count != 0)
{
reportViewer1.Visible = true;
reportViewer1.ProcessingMode=Microsoft.Reporting.WinForms.ProcessingMode.Local;
reportViewer1.LocalReport.ReportEmbeddedResource = @"C:\Inetpub\wwwroot\Tirumala Gruha Nirman\Tirumala Gruha Nirman\CustomersContactList.rdlc";
reportViewer1.LocalReport.DataSources.Clear();
bindingSource1.DataSource = ds.Tables[0].DefaultView;
rpt.Name = "Customerscontactinfo_sp_showcontactlistofcustomers";
reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("Customerscontactinfo_sp_showcontactlistofcustomers",bindingSource1));
// reportViewer1.LocalReport.DataSources.Add(rpt);
reportViewer1.DocumentMapCollapsed = true;
reportViewer1.LocalReport.Refresh();
}
else
{
reportViewer1.Visible = false;
}
}
Please suggest me my mistake...
With Regards
Shashi.
|
|
|
|
|
Have you stepped through your code to see if your if condition is false, therefore running your reportViewer1.Visible = false; line?
In other words, does ds.Tables[0].Rows.Count == 0 ?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi Henry
I am getting data as ds.Tables[0].rows.count!=0
and reportviewer1 is also set to true.I am able to see the report control but not the data in the win form.
I hope data is not binding to the report or report is not loading..
|
|
|
|
|
In that case, I'm stumped.
Sorry!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi,
Along the lines of what Henry suggested, is there data in
ds.Tables[0].DefaultView
(You said there are rows in the dataset, but how about the default view?)
Also, looking at what I've done when using the report viewer, I've also set the LocalReport.ReportPath to the path of the .rdlc file, as well as using the ReportEmbeddedResource. I'm not sure it's necessary, but maybe you can try it
|
|
|
|
|
Can WPF Controls used in normal existing windows application.?
|
|
|
|