Click here to Skip to main content
15,902,938 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionhow to show raw data into browser as pdf formate(generate pdf file on runtime) Pin
mkashifbutt17-Jun-09 18:27
mkashifbutt17-Jun-09 18:27 
AnswerRe: how to show raw data into browser as pdf formate(generate pdf file on runtime) Pin
Christian Graus17-Jun-09 18:44
protectorChristian Graus17-Jun-09 18:44 
GeneralRe: how to show raw data into browser as pdf formate(generate pdf file on runtime) Pin
mkashifbutt17-Jun-09 20:28
mkashifbutt17-Jun-09 20:28 
QuestionDisplaying Square character instead of showing a line space Pin
shijivijayan17-Jun-09 18:26
shijivijayan17-Jun-09 18:26 
AnswerRe: Displaying Square character instead of showing a line space Pin
Abhijit Jana17-Jun-09 18:29
professionalAbhijit Jana17-Jun-09 18:29 
AnswerRe: Displaying Square character instead of showing a line space Pin
Christian Graus17-Jun-09 18:46
protectorChristian Graus17-Jun-09 18:46 
QuestionGridView Problem Pin
BhavinBhatt17-Jun-09 18:08
BhavinBhatt17-Jun-09 18:08 
AnswerRe: GridView Problem Pin
CrazyCoder2617-Jun-09 19:28
CrazyCoder2617-Jun-09 19:28 
Just follow the following code :
private DataTable GetData(int count)
    {
        DataTable dt = new DataTable();
        dt.Columns.Add("col1");
        dt.Columns.Add("col2");
        dt.Columns.Add("col3");
        DataRow dr=null;
        for (int i = 0; i <= count; i++)
        {
            dr = dt.NewRow();
            dr["col1"] = "";
            dr["col2"] = "";
            dr["col3"] = "";
            dt.Rows.Add(dr);
        }
        return dt;
    }
    private DataTable GetNewData(int count)
    {
        DataTable dt = new DataTable();
        dt.Columns.Add("col1");
        dt.Columns.Add("col2");
        dt.Columns.Add("col3");
        DataRow dr = null;
        for (int i = 0; i < count; i++)
        {
           
                dr = dt.NewRow();
                dr["col1"] = ((TextBox)grdOrd.Rows[i].Cells[0].FindControl("txtCol1")).Text;
                dr["col2"] = ((TextBox)grdOrd.Rows[i].Cells[1].FindControl("txtCol2")).Text;
                dr["col3"] = ((TextBox)grdOrd.Rows[i].Cells[5].FindControl("txtCol3")).Text;
           dt.Rows.Add(dr);
          
        }
        dr = dt.NewRow();
        dr["col1"] = "";
        dr["col2"] = "";
        dr["col3"] = "";
        
        dt.Rows.Add(dr);
        return dt;
    }
protected void Page_Load(object sender,EventArgs e)
{
  if(!IsPostBack)
{
  GetData(0);
}
}

protected void btnAddNewRow_Click(object sender,EventArgs e)
{
  GridView1.DataSource = GetNewData(grdOrd.Rows.Count);
  GridView1.DataBind();
}


<asp:GridView runat="server" id="GridView1" AutoGenerateColumns="false">
<Columns>
<asp:TemplateField HeaderText="Col1">
<ItemTemplate>
<asp:TextBox runat="server" id="txtCol1" Text='<%#Eval("col1")%>'></asp:TextBox>
</ItemTemplate>
<FooterTemplate>
<asp:Button runat="server" Id="btnAddNewRow" OnClick="btnAddNewRow_Click"/>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Col2">
<ItemTemplate>
<asp:TextBox runat="server" id="txtCol2" Text='<%#Eval("col2")%></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Col3">
<ItemTemplate>
<asp:TextBox runat="server" id="txtCol3" Text='<%#Eval("col3")%></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>


ARINDAM

QuestionDataGridView with AJAX Modal popup extender Pin
cocoonwls17-Jun-09 17:32
cocoonwls17-Jun-09 17:32 
QuestionGridview onchange Pin
Peterson Luiz17-Jun-09 15:24
Peterson Luiz17-Jun-09 15:24 
AnswerRe: Gridview onchange Pin
Xmen Real 17-Jun-09 15:33
professional Xmen Real 17-Jun-09 15:33 
GeneralRe: Gridview onchange Pin
Peterson Luiz17-Jun-09 15:38
Peterson Luiz17-Jun-09 15:38 
AnswerRe: Gridview onchange Pin
Xmen Real 17-Jun-09 16:54
professional Xmen Real 17-Jun-09 16:54 
GeneralRe: Gridview onchange Pin
Peterson Luiz17-Jun-09 17:02
Peterson Luiz17-Jun-09 17:02 
GeneralRe: Gridview onchange Pin
Xmen Real 17-Jun-09 17:11
professional Xmen Real 17-Jun-09 17:11 
QuestionASP.net web controls Pin
mahichandu17-Jun-09 10:07
mahichandu17-Jun-09 10:07 
AnswerRe: ASP.net web controls Pin
Christian Graus17-Jun-09 11:03
protectorChristian Graus17-Jun-09 11:03 
GeneralRe: ASP.net web controls Pin
mahichandu17-Jun-09 11:33
mahichandu17-Jun-09 11:33 
GeneralRe: ASP.net web controls Pin
Christian Graus17-Jun-09 13:28
protectorChristian Graus17-Jun-09 13:28 
AnswerRe: ASP.net web controls Pin
DoctorMick17-Jun-09 23:21
DoctorMick17-Jun-09 23:21 
Question??Ajax Pop-up Window?? Pin
CSharpBeginner17-Jun-09 9:15
CSharpBeginner17-Jun-09 9:15 
AnswerRe: ??Ajax Pop-up Window?? Pin
Christian Graus17-Jun-09 11:28
protectorChristian Graus17-Jun-09 11:28 
GeneralRe: ??Ajax Pop-up Window?? Pin
CSharpBeginner17-Jun-09 15:22
CSharpBeginner17-Jun-09 15:22 
GeneralRe: ??Ajax Pop-up Window?? Pin
Christian Graus17-Jun-09 16:01
protectorChristian Graus17-Jun-09 16:01 
QuestionHow can I pass a asp.net text box value to an input text box name txtSearch2 Pin
HistoricalSocietyMember17-Jun-09 8:44
HistoricalSocietyMember17-Jun-09 8:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.