Click here to Skip to main content
15,072,051 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
i am new user of asp.net any body provide help to bind dynamically data in grid view i use grid view and on gv_RowDataBound event i write this code
if(e.Row.RowType.ToString()==ListItemType.Item.ToString())
{
((Literal)e.Row.FindControl("LtrName")).Text=DataBinder.Eval(e.Row.DataItem,"name").ToString();
}



i take a literal name LtrName in gv.
this will not show error but not display value
help anybody
thanks
:)
Posted
Updated 3-Mar-11 21:34pm
v2

1 solution

Think you might be better with something like this:

if (e.Row.RowType == DataControlRowType.DataRow)
{
    // Do whatever...
}
   
Comments
UD(IA) 4-Mar-11 3:48am
   
Thanks for reply its work properly.
now please help me
i talke two mannual buttons with gridview and bind it. now i want to click on firstbutton than it will open a new panel and where i edit that data to fill it with value of selected item.
thnaks again.
R. Giskard Reventlov 4-Mar-11 3:51am
   
Did you just vote me one and accept the answer??? You're supposed to vote 5 if you like and/or accept the answer!!! As for your supplementary question you have not explained it too well: post it as a new question and give more detail.
UD(IA) 4-Mar-11 3:59am
   
sorry dear as u know i am new here i want to vote 5 but i didnot know how its work. i am really sorry.
its bound dear properly thanks
tell me how can i given u snap shot of my application so i will explain u more ...
thanks again and sorry agin for my mistake of vote.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900