|
Hi,
I have developed a project with asp.net 2.0 & sqlserver 2000. I want to sort gridview maually when it is bind with sqldatasource
I use
Protected Sub GridView1_Sorting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewSortEventArgs) Handles GridView1.Sorting
If e.SortDirection = SortDirection.Ascending Then
e.SortDirection = SortDirection.Descending
Populate()
Else
e.SortDirection = SortDirection.Ascending
End If
but it is not working.please help me?
|
|
|
|
|
farogh123 wrote: but it is not working.please help me?
what is it not working? did you try to debug it? what did you see/get?
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Just by looking at the code i
If e.SortDirection = SortDirection.Ascending Then
e.SortDirection = SortDirection.Descending
Populate()
Else
e.SortDirection = SortDirection.Ascending
End If
It looks like on descending you call Populate(), but on the Ascending sort you don't call Populate()
If i were to guess this is working one way but not the other. If this is not the case please provide a little more info.
Hope this helps.
|
|
|
|
|
Hi All
My requirement is read xml file, which generate the web service (web service from another application), so wht i have to do is i have call that service from my application and show some details, so wht is the best way read xml file from my application?is there any recommended way to do that
Thanks
|
|
|
|
|
Hi Friends,
I put a logincontrol in a page to login using Membership.If no such user exists then i write code in login_error event to show a message box that no such user.I want to clear the 2 textboxes if no such users exists.How i clear the textboxes for entering username and password in logincontrol if login fails.
|
|
|
|
|
Hi,
You can try textbox1.text="" or textbox1.text=String.Empty
|
|
|
|
|
I tried this also.but i the textbox wont be cleared.I used alert box to show no such user message.How i solve the textbox after displays the alert box.
|
|
|
|
|
hi,
alert will be run at client side.But u r checking for user at server side.have u written the given code at server side?have u tried to debug the same?what value it shows for textbox1.text=""
|
|
|
|
|
Alert also will be applied in serverside.
|
|
|
|
|
SreejithAchutan wrote: Alert also will be applied in serverside.
Quote Selected Text
huh? can you explain what you meant by that? How is Alert in Server side tied to client side?
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Ok Yusuf,
you can add client side code on server side and that will be execute on client side if you don't know then let me know thank You
Vinod
Software Engineer
EBC Publishing Ltd
Lucknow(India)
|
|
|
|
|
You can use ClientScriptManager[^] to add client scripts.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Hi,
Am working on ASP.Net windows application. I have a form2 which searches records from
database based on search word entered in textbox and it displays list of records in a datagridview in form2 and i have provided a view button inside datagridview column. on click of view button the particular record details will be displayed in form3. Now i have to place next button in the form3 which should move through all the records on click of next button. How to traverse through all records on click of a button. Am getting error as cannot convert from System.EventArgs to System.Windows.Forms.dataGridViewCellEventArgs.
Thanks in advance.
public void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
sample(this,e);
}
public int sample(object sender, DataGridViewCellEventArgs e)
{
currentRow = e.RowIndex;
try
{
IdString = dataGridView1[0, currentRow].Value.ToString();
nextrow = dataGridView1[0, currentRow + 1].Value.ToString());
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
if (dataGridView1.Columns[e.ColumnIndex] == editButton && currentRow >= 0)
{
string FileName = dataGridView1[1, currentRow].Value.ToString();
string Fileno = dataGridView1[2, currentRow].Value.ToString();
string Filetype = dataGridView1[3, currentRow].Value.ToString();
string Address = dataGridView1[4, currentRow].Value.ToString();
Form3 f3 = new Form3(IdString, nextrow);
f3.Show();
}
return nextrow;
}
}
public void button3_Click(object sender, EventArgs e)
{
exam(this, e);
}
public void exam(object sender, DataGridViewCellEventArgs e)
{
Form2 frm2 = new Form2();
test1 = frm2.sample(this, e);
myConnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\\DFMS\\DFMS.mdb");
myConnection.Open();
string query = "select SlNo, FileName, Fileno, Fileloc, Filetype, Address, Surveyno, A, G, Sqmt, Resdate, Issueddate, Remarks from SRCH where (id = " + test1 + ")";
OleDbCommand cmd = new OleDbCommand(query, myConnection);
OleDbDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
label26.Text = dr["SlNo"].ToString();
label24.Text = dr["FileName"].ToString();
label23.Text = dr["Fileno"].ToString();
label22.Text = dr["Fileloc"].ToString();
label21.Text = dr["Filetype"].ToString();
label20.Text = dr["Address"].ToString();
label19.Text = dr["Surveyno"].ToString();
label18.Text = dr["A"].ToString();
label17.Text = dr["G"].ToString();
label16.Text = dr["Sqmt"].ToString();
label15.Text = dr["Resdate"].ToString();
label14.Text = dr["Issueddate"].ToString();
label13.Text = dr["Remarks"].ToString();
}
myConnection.Close();
test1 = test1 + 1;
}
}
}
modified on Saturday, March 21, 2009 8:10 AM
|
|
|
|
|
pradeepc_mca wrote: Am working on ASP.Net windows application.
Seriously !
pradeepc_mca wrote: How to traverse through all records on click of a button.
Do you thing any body has the time to read your thousands line of code ?
Please. put those line which you think to relevant with your question. Otherwise nobody will going to give you the answer. If you ask question properly, it will help you get the answer and also help use to give the answer.
Thanks !
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
I ve edited the quote now by removing code. plz check it out now.
|
|
|
|
|
pradeepc_mca wrote: I ve edited the quote now by removing code. plz check it out now.
I have checked and it is nothing related with ASP.NET. You are doing it Windows Application. Am I right? Please post it properly in C# forum.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hello
Why it happens ?
i have used java.util.zip file to zip and unzip file.
when it is ziping it gives :
Server was unable to process request ---> exception of type java.util.zip.ZipException.
is Zip file is corrupted ?
Thank you
vijaya
|
|
|
|
|
kvijayajyothy wrote: have used java.util.zip file to zip and unzip file.
when it is ziping it gives :
Server was unable to process request ---> exception of type java.util.zip.ZipException.
Where are you getting this exception ?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Is this java code. Try the Java [^]forum
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
hello,
in order to jump to the cold water of asp i need a push.
i am getting this error :
Could not load type 'HelloWorld._Default'.
my web page is Default.aspx
what am i missing here?
|
|
|
|
|
Are you trying to access it from IIS ? Did you create Virtual Directory in IIS?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
no , haven't.
at the web configutation it stands on 'Use visual studio development server'
now i changed it to 'Use IIS web server'
how do i activate a virual IIS web server ?
start-> programs-> ... ?
i have it installed using the windows components add/remove but cant seem to find it
tnx
|
|
|
|
|
Hi,
Have You created a virtual directory of that Web site
If you have created the virtual directory then I think this should not come
|
|
|
|
|
shabya wrote: in order to jump to the cold water of asp i need a push.
sorry, I'm not pushing you to cold water. Try warm water instead.
Look, tell us the steps you took to build and publish your asp.net project. Something is not right.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|