Three Tier Application Doubt to fill the data Grid view

Posted by Mdjack under ASP.NET on 9/28/2011 | Points: 10 | Views : 1858 | Status : [Member] | Replies : 5
Hi,

In my three tier application how to retrieve the records from Database and how to show records in Data Grid view. Can any give me the idea as well as code logic.

N. MOHAMED ZACKKARIAH


Responses

Posted by: Blessyjees on: 9/28/2011 [Member] Bronze | Points: 25

Up
0
Down
Hi,

I assume that your three tier as below

1. Presentation layer
2. Business layer
3. Data Layer

Datagrid view contains in presentation layer. You canmake call from presentation layer to Business layer
For example , you want to fill the products details in datagrid view
dataGrid.DataSource=ProductManager.GetProducts();// this method can be return dataset or product entirt list Like List<Product>
ProductManager class exist in the business layer and this has a method GetProducts. This method call a method in the database layer. The method in the dtabase layer will read data from the database and return that value to businesslayer, busineelayerpass this data to prentation layer.
If you need any more help, please ask.

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Mdjack, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mdjack on: 9/28/2011 [Member] Starter | Points: 25

Up
0
Down
Hi

tks to ur reply I am binding the values in grid view.

In my grid view i am using the Template Column i m binding the CheckBox.
<asp:TemplateColumn HeaderText="Update" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:CheckBox ID="chkUpdate" runat="server" Text='<%#Eval("Update") %>' />
</ItemTemplate>
<HeaderStyle CssClass="ItemTemplateColumnStyle GridBorderRight PL2"></HeaderStyle>
<ItemStyle Width="70px" CssClass="ItemTemplateColumnStyle GridBorderRight GridBorderTop GridBorderBottom PL2">
</ItemStyle>
</asp:TemplateColumn>

But the values are not binding in that control?

N. MOHAMED ZACKKARIAH

Mdjack, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Blessyjees on: 9/28/2011 [Member] Bronze | Points: 25

Up
0
Down
hi,
Check the value of the column "Update". Is this field fill with data from database.

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Mdjack, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mdjack on: 9/28/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

In my Temp DataTable filled the Value but that value is not binded

N. MOHAMED ZACKKARIAH

Mdjack, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: SheoNarayan on: 9/28/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Here is an article written by me long back that have a sample project as well http://www.dotnetfunda.com/articles/article71.aspx .

This should help you a lot.

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Mdjack, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response