N
nurit
hi,
My program is going like that:
-choose criteria from dropdownlist
-press on submit bottun
-the results are display in datagrid
Now, here is the problem:
i need to display 4 different datagrids but i only have one on my aspx
file.
i tried to build a dynamic datagrid but couldn't find how to do
that.
i know there is a lot of info at the net but i wasn't able to
understand how to take the datatable with my data and change it to my
datagrid format.
im using c#.
I hope you will be able to help me because im about to give up.
or maybe there is other way to do that????????
this is the datagrid format:
<asp:datagrid id="DataGridRresults" runat="server"
OnPageIndexChanged="DataGridRresults_PageIndexChanged"
BorderStyle="Solid" ShowFooter="True" AllowPaging="True"
BackColor="White" PageSize="5" ForeColor="Black" GridLines="Vertical"
BorderWidth="1px" BorderColor="#999999" CellPadding="3"
HorizontalAlign="Center" AutoGenerateColumns="False">
<FooterStyle BackColor="#CCCCCC"></FooterStyle>
<SelectedItemStyle Font-Bold="True" ForeColor="White"
BackColor="#000099"></SelectedItemStyle> <AlternatingItemStyle
BackColor="#CCCCCC"></AlternatingItemStyle>
<ItemStyle Wrap="False" HorizontalAlign="Center"
VerticalAlign="Top"></ItemStyle>
<HeaderStyle Font-Bold="True" Wrap="False" HorizontalAlign="Center"
ForeColor="White" VerticalAlign="Middle"
BackColor="Black"></HeaderStyle>
<Columns>
<asp:TemplateColumn HeaderText="Company Name">
<ItemTemplate>
<a HREF='' onClick='window.open("<%#
Convert.ToString(DataBinder.Eval(Container.DataItem, "url"))%>",
"_blank",
"width=730,height=500,menubar=no,location=no,toolbar=no,status=yes,scrollbars=yes,resizable=yes");return
false;'><%# DataBinder.Eval(Container.DataItem, "Topic")%>
</a>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="E-Mail">
<ItemStyle VerticalAlign="Top"></ItemStyle>
<ItemTemplate>
<B>
<%# DataBinder.Eval(Container.DataItem, "Companyname") %>
</B>
<BR>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Business Phone">
<ItemStyle VerticalAlign="Top"></ItemStyle>
<ItemTemplate>
<B>
<%# DataBinder.Eval(Container.DataItem, "BusinessPhone") %>
</B>
<BR>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Mobile Phone">
<ItemStyle VerticalAlign="Top"></ItemStyle>
<ItemTemplate>
<B>
<%# DataBinder.Eval(Container.DataItem, "MobilePhone") %>
</B>
<BR>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
<PagerStyle HorizontalAlign="Center" ForeColor="Black"
BackColor="#999999" Mode="NumericPages"></PagerStyle>
</asp:datagrid>
thanks
nurit
My program is going like that:
-choose criteria from dropdownlist
-press on submit bottun
-the results are display in datagrid
Now, here is the problem:
i need to display 4 different datagrids but i only have one on my aspx
file.
i tried to build a dynamic datagrid but couldn't find how to do
that.
i know there is a lot of info at the net but i wasn't able to
understand how to take the datatable with my data and change it to my
datagrid format.
im using c#.
I hope you will be able to help me because im about to give up.
or maybe there is other way to do that????????
this is the datagrid format:
<asp:datagrid id="DataGridRresults" runat="server"
OnPageIndexChanged="DataGridRresults_PageIndexChanged"
BorderStyle="Solid" ShowFooter="True" AllowPaging="True"
BackColor="White" PageSize="5" ForeColor="Black" GridLines="Vertical"
BorderWidth="1px" BorderColor="#999999" CellPadding="3"
HorizontalAlign="Center" AutoGenerateColumns="False">
<FooterStyle BackColor="#CCCCCC"></FooterStyle>
<SelectedItemStyle Font-Bold="True" ForeColor="White"
BackColor="#000099"></SelectedItemStyle> <AlternatingItemStyle
BackColor="#CCCCCC"></AlternatingItemStyle>
<ItemStyle Wrap="False" HorizontalAlign="Center"
VerticalAlign="Top"></ItemStyle>
<HeaderStyle Font-Bold="True" Wrap="False" HorizontalAlign="Center"
ForeColor="White" VerticalAlign="Middle"
BackColor="Black"></HeaderStyle>
<Columns>
<asp:TemplateColumn HeaderText="Company Name">
<ItemTemplate>
<a HREF='' onClick='window.open("<%#
Convert.ToString(DataBinder.Eval(Container.DataItem, "url"))%>",
"_blank",
"width=730,height=500,menubar=no,location=no,toolbar=no,status=yes,scrollbars=yes,resizable=yes");return
false;'><%# DataBinder.Eval(Container.DataItem, "Topic")%>
</a>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="E-Mail">
<ItemStyle VerticalAlign="Top"></ItemStyle>
<ItemTemplate>
<B>
<%# DataBinder.Eval(Container.DataItem, "Companyname") %>
</B>
<BR>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Business Phone">
<ItemStyle VerticalAlign="Top"></ItemStyle>
<ItemTemplate>
<B>
<%# DataBinder.Eval(Container.DataItem, "BusinessPhone") %>
</B>
<BR>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Mobile Phone">
<ItemStyle VerticalAlign="Top"></ItemStyle>
<ItemTemplate>
<B>
<%# DataBinder.Eval(Container.DataItem, "MobilePhone") %>
</B>
<BR>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
<PagerStyle HorizontalAlign="Center" ForeColor="Black"
BackColor="#999999" Mode="NumericPages"></PagerStyle>
</asp:datagrid>
thanks
nurit