generating serial number in datagrid
-
hai all, i would like to generate autogenerate serial number in datagrid... can anyone help me with this.. its too urgent .. plz
with Regards, Imthiyas Ahamed.A
hi buddy, You know the page size and page number where you are on the datagrid. then whats the problem to generate page numbers. anyway you start from the first page so you can put serial number from 1 * 10 - 9 to 1 * 10. when you move to 3rd page it would be 3*10-9 to 3*10 I assume Page size as 10 you can add a label control as template and do this in itemdatabound all the best
Regards, Sylvester G Senior Software Engineer Xoriant Solutions sylvester_g_m@yahoo.com
-
hi buddy, You know the page size and page number where you are on the datagrid. then whats the problem to generate page numbers. anyway you start from the first page so you can put serial number from 1 * 10 - 9 to 1 * 10. when you move to 3rd page it would be 3*10-9 to 3*10 I assume Page size as 10 you can add a label control as template and do this in itemdatabound all the best
Regards, Sylvester G Senior Software Engineer Xoriant Solutions sylvester_g_m@yahoo.com
-
hai, Thanks For ur reply.... But i am not using paging.. i am using scroll bar with fixed header in my datagrid....So, Is there anyother way to do for this???
with Regards, Imthiyas Ahamed.A
Are you showing all the records in one page ? if yes then its simple page number is from 1 to number of records
Regards, Sylvester G Senior Software Engineer Xoriant Solutions sylvester_g_m@yahoo.com
-
Are you showing all the records in one page ? if yes then its simple page number is from 1 to number of records
Regards, Sylvester G Senior Software Engineer Xoriant Solutions sylvester_g_m@yahoo.com
-
k....... but i am using a search page in my project it should bind after checking the condition.... Is it possible sir????
with Regards, Imthiyas Ahamed.A
yes. Try it out. Or Just paste some of your code snippet here. I will check it out
Regards, Sylvester G Senior Software Engineer Xoriant Solutions sylvester_g_m@yahoo.com
-
yes. Try it out. Or Just paste some of your code snippet here. I will check it out
Regards, Sylvester G Senior Software Engineer Xoriant Solutions sylvester_g_m@yahoo.com
SqlConnection con=new SqlConnection(s); SqlCommand cmd=new SqlCommand ("Sp_search",con); cmd.CommandType =CommandType.StoredProcedure ; cmd.Parameters.Add ("@cname",DblCname.SelectedItem.Text.ToString()); SqlDataAdapter ADA=new SqlDataAdapter(); ADA.SelectCommand =cmd; DataSet Ds=new DataSet(); ADA.Fill(Ds); if (Ds.Tables[0].Rows.Count!=0) { DataGrid1.DataSource=Ds; DataGrid1.DataBind(); DataGrid2.DataSource=Ds; DataGrid2.DataBind(); } else { }
with Regards, Imthiyas Ahamed.A
-
SqlConnection con=new SqlConnection(s); SqlCommand cmd=new SqlCommand ("Sp_search",con); cmd.CommandType =CommandType.StoredProcedure ; cmd.Parameters.Add ("@cname",DblCname.SelectedItem.Text.ToString()); SqlDataAdapter ADA=new SqlDataAdapter(); ADA.SelectCommand =cmd; DataSet Ds=new DataSet(); ADA.Fill(Ds); if (Ds.Tables[0].Rows.Count!=0) { DataGrid1.DataSource=Ds; DataGrid1.DataBind(); DataGrid2.DataSource=Ds; DataGrid2.DataBind(); } else { }
with Regards, Imthiyas Ahamed.A
yes you can do it Item DataBound event
Regards, Sylvester G Senior Software Engineer Xoriant Solutions sylvester_g_m@yahoo.com
-
yes you can do it Item DataBound event
Regards, Sylvester G Senior Software Engineer Xoriant Solutions sylvester_g_m@yahoo.com