11 Replies - 5303 Views - Last Post: 18 November 2009 - 09:23 AM Rate Topic: -----

#1 indranilbasu  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 17-November 09

C# Pagination

Post icon  Posted 17 November 2009 - 09:25 PM

hi,
I am new to C#.NET.
Please help me.
I have designed a page. In that i have put a panel to show the data on clicking a button in the grid view.
there is no problem in gridview.
just i am not able to show the data in the panel.
Also please help me is there anything to do with pagination?
Is This A Good Question/Topic? 0
  • +

Replies To: C# Pagination

#2 ramesh866  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 91
  • Joined: 03-October 09

Re: C# Pagination

Posted 17 November 2009 - 11:08 PM

usually panel is used for grouping controls and not for displaying datas...
and for pagination in grid view, just select the grid view in the design and click the glyph and then just check the enable paging

This post has been edited by ramesh866: 17 November 2009 - 11:10 PM

Was This Post Helpful? 0
  • +
  • -

#3 indranilbasu  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 17-November 09

Re: C# Pagination

Posted 17 November 2009 - 11:19 PM

View Postramesh866, on 17 Nov, 2009 - 10:08 PM, said:

usually panel is used for grouping controls and not for displaying datas...
and for pagination in grid view, just select the grid view in the design and click the glyph and then just check the enable paging


@Ramesh..
Thank you very much..
Ya i have put the question in the wrong way..
Thanx a lot again.. :D

View Postindranilbasu, on 17 Nov, 2009 - 10:15 PM, said:

View Postramesh866, on 17 Nov, 2009 - 10:08 PM, said:

usually panel is used for grouping controls and not for displaying datas...
and for pagination in grid view, just select the grid view in the design and click the glyph and then just check the enable paging


@Ramesh..
Thank you very much..
Ya i have put the question in the wrong way..
Thanx a lot again.. :D


Hi Ramesh,
One more query.
Please tell me how to insert a button in a gridview column..
and at the same time i want the details to be showed on clicking the button but it should not come from the database.(SQL SERVER 2008)
Was This Post Helpful? 0
  • +
  • -

#4 ramesh866  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 91
  • Joined: 03-October 09

Re: C# Pagination

Posted 17 November 2009 - 11:27 PM

inserting a button in grid view??? why would you do that.. can you explain the scenario that you working in?
Was This Post Helpful? 0
  • +
  • -

#5 indranilbasu  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 17-November 09

Re: C# Pagination

Posted 17 November 2009 - 11:41 PM

View Postramesh866, on 17 Nov, 2009 - 10:27 PM, said:

inserting a button in grid view??? why would you do that.. can you explain the scenario that you working in?


Ok.
Actually i am developing a Travel Application System.
I am tryin to make a dashboard where a manager on clicking a button would be shown with a form that is in a panel.
So by clicking on a button which is renamed as "Show Details" he will be able to se the list of the travel requisition made.
Therefore on clickin Approve button the manger approves the associate's reqisition.
i have attached the screen shot of the design.
Please help me and advise me as i am a beginner in C# ASP.NET
Was This Post Helpful? 0
  • +
  • -

#6 ramesh866  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 91
  • Joined: 03-October 09

Re: C# Pagination

Posted 17 November 2009 - 11:52 PM

i dont see the attachment...so its like people book tickets , which the manager sees and then approves it by clicking a button(show details) and that is stored in booked slots.. am i getting you correct?
Was This Post Helpful? 0
  • +
  • -

#7 indranilbasu  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 17-November 09

Re: C# Pagination

Posted 18 November 2009 - 12:14 AM

ok i am sendin it to u again..
aah itz lyk the manager can see the details of all the travels made by the associate by clickin on the button(Show Details).Now again on this click he would be provided with a pop up window where he gets the following field :
ReqID
Associate Id
Associate Name
Travel FromDate
Travel ToDate
Advance Taken(Radio Button)
Advance Amount


There is also a APProve and Reject Button.
On clicking this Approve Button it is stored.

[P.S. i am tryin to attach..but its failed givin this message : "Upload failed. You are not permitted to upload a file with that file extension."
Was This Post Helpful? 0
  • +
  • -

#8 ramesh866  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 91
  • Joined: 03-October 09

Re: C# Pagination

Posted 18 November 2009 - 12:33 AM

am not sure about the pop up window.. but i can suggest some other way. let the manager see all the entry made by his associate using grid view control, and near to it put an panel with an text box where you enter the reqid no and then with a click, the details of that particular reqid is show where in you can approve it or reject. you can also add two more buttons for approving all and rejecting all... are you getting the picture???
Was This Post Helpful? 0
  • +
  • -

#9 indranilbasu  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 17-November 09

Re: C# Pagination

Posted 18 November 2009 - 12:41 AM

View Postramesh866, on 17 Nov, 2009 - 11:33 PM, said:

am not sure about the pop up window.. but i can suggest some other way. let the manager see all the entry made by his associate using grid view control, and near to it put an panel with an text box where you enter the reqid no and then with a click, the details of that particular reqid is show where in you can approve it or reject. you can also add two more buttons for approving all and rejecting all... are you getting the picture???


ya it will do.but if i click on the button in the panel it has to show another page.am i sayin it properly???
Was This Post Helpful? 0
  • +
  • -

#10 ramesh866  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 91
  • Joined: 03-October 09

Re: C# Pagination

Posted 18 November 2009 - 12:51 AM

you want to display the details of the particular id in another form right. ya you can do it
Was This Post Helpful? 0
  • +
  • -

#11 indranilbasu  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 17-November 09

Re: C# Pagination

Posted 18 November 2009 - 01:25 AM

View Postramesh866, on 17 Nov, 2009 - 11:51 PM, said:

you want to display the details of the particular id in another form right. ya you can do it


ya exactly..
can u please guide me as how to do it in c# as i am a novice.

View Postindranilbasu, on 18 Nov, 2009 - 12:23 AM, said:

View Postramesh866, on 17 Nov, 2009 - 11:51 PM, said:

you want to display the details of the particular id in another form right. ya you can do it


ya exactly..
can u please guide me as how to do it in c# as i am a novice.


or am i supposed to do with javascript??
Was This Post Helpful? 0
  • +
  • -

#12 ramesh866  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 91
  • Joined: 03-October 09

Re: C# Pagination

Posted 18 November 2009 - 09:23 AM

after you enter the id in the text box on the click event this code comes
		Server.Transfer("Default3.aspx");



after you go to the next page in the page load event this code comes
  TextBox txt = (TextBox)Page.PreviousPage.FindControl("TextBox1");
		TextBox1.Text = txt.Text;
		string s = ConfigurationManager.ConnectionStrings["masterConnectionString"].ConnectionString;
		SqlConnection cn = new SqlConnection(s);
		cn.Open();
		SqlCommand cmd = new SqlCommand("select * from radio where names='" + TextBox1.Text + "'", cn);
		DataTable table = new DataTable();
		SqlDataAdapter adp = new SqlDataAdapter(cmd);
		adp.Fill(table);
		GridView1.DataSource = table;
		GridView1.DataBind();
		cn.Close();



here what happens is what ever you type in the previuos form in getting stored in the next forms text box(you can change to your requriment) and based on that value the data is displayed.
hope it helps

This post has been edited by ramesh866: 18 November 2009 - 09:25 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1