|
hi friends
i need create tabele in codebehind how can i create it..
for example;
how can achive in code behind
Known Is Drop.Unknown Is Ocean
|
|
|
|
|
saravanan05 wrote: hi friends
i need create tabele in codebehind how can i create it..
for example;
how can achive in code behind
Your given example is not coming properly. Which kind of table you want create ?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
hi
i need to create like this:
i need to create in codebehind..
Known Is Drop.Unknown Is Ocean
|
|
|
|
|
hi,
Sorry dear but again its not displayed. If this is the image then send to
me at anil.bly@gmail.com
Or explain through text only.
Regards
Anil Pal
|
|
|
|
|
Edit your post and use ignore HTML tags option.
|
|
|
|
|
You have done the same mistake. before post please checked "Ignore HTML tags in this message (good for code snippets) " Check Box
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
hi
i need to create table in code behind
<table>
<tr>
<td>
</td>
</tr>
</table>
Known Is Drop.Unknown Is Ocean
|
|
|
|
|
You could place a literal control on the page. In the code behind write the code to generate the Table and assign the result to the Literal control's Text property.
|
|
|
|
|
hi,
You can also use HtmlTable, HtmltableCell. row ect class to create the table from code behind.
Regards
Anil Pal
|
|
|
|
|
That would work. But the OP seemed to be indicating that he wanted to write the HTML directly. Either that or he thought we might not know what a table looked like in HTML.
|
|
|
|
|
i have a web page which issue product all products issue smoothly without error on local system but when i publish same page on server,and try to issue prodect(perticuler one product) gives error
error is
Input string was not in a correct format.
while code is for that perticular product
cmd.CommandText = "select * from total_stock where ptype='RJ-45 SIMPLE' ";
adp.Fill(ds, "ab");
foreach (DataRow dm in ds.Tables["ab"].Rows)
{
lblval.Text = dm["pqty"].ToString();
}
n = Convert.ToDouble(TextBox2.Text);
if(Convert.ToDouble(lblval.Text) < Convert.ToDouble(n))
{
Page.RegisterStartupScript("onClick", "<script
Language=JavaScript>alert('Please check the Stock !')</script>");
}
else
{
o = Convert.ToDouble(lblval.Text) - Convert.ToDouble(n);
lblval.Text = Convert.ToString(o);
con.Open();
cmd.CommandText = "update total_stock set pqty='" +
lblval.Text + "' where ptype='RJ-45 SIMPLE'";
cmd.ExecuteNonQuery();
con.Close();
//end
cmd.CommandText = "select * from material_issue";
adp.Fill(ds, "re");
dr = ds.Tables["re"].NewRow();
//cmd.CommandText = "select * from total_stock";
cb = new SqlCommandBuilder(adp);
adp.Update(ds.Tables["re"]);
dr = ds.Tables["re"].NewRow();
dr["ptypename"] = "RJ-45 SIMPLE";
dr["materialissue_date"] = DateTime.Now;
dr["issue_to"] = TextBox1.Text;
dr["entered_by"] = Label28.Text
dr["qty"] = TextBox2.Text;
dr["remarks"] = "ISSUE TO TECHNICIEAN";
ds.Tables["re"].Rows.Add(dr);
cmd.CommandText = "Select * from material_issue";
cb = new SqlCommandBuilder(adp);
adp.Update(ds.Tables["re"]);
Page.RegisterStartupScript("onClick", "<script
Language=JavaScript>alert('RJ-45 is Issued !')</script>");
}
|
|
|
|
|
prateekfgiet wrote: I have a web page which issue product all products issue smoothly without error on local system but when i publish same page on server,and try to issue prodect(perticuler one product) gives error
error is
Please do not cross post. You have asked same question just few hours back. please continue with the same thread.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
i have dropdown list which contain the name of states and last option is other if user select the option other,then a textbox will apper on page and value save from textbox,how i will do? thanx in advance
|
|
|
|
|
hi,
you can do code to display the textbox on select index change event of dropdownlist.
like:
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
if(DropDownList1.SelectedValue=="others")
{
// Code to display the textbox
}
}
feel to free ask
Regards
Anil Pal
|
|
|
|
|
prateekfgiet wrote: i have dropdown list which contain the name of states and last option is other if user select the option other,then a textbox will apper on page and value save from textbox,how i will do? thanx in advance
Did you tried to implement it ? What problem are you faceing?
When user select the other from Dropdown lost, you can check it on Dropdown list selectedIndexChanged event, and on that time just make visible Textbox. And then save the data when you want. For unnecessry postback avoiding you can use Java script for that also.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
i m doing in this manner
protected void DropDownList6_SelectedIndexChanged(object sender, EventArgs e)
{
if (DropDownList6.SelectedValue == "OTHER")
{
TextBox12.Visible = true;
}
}
and for saving in database
if (DropDownList6.SelectedValue == "OTHER")
{
dr["remarks"] = TextBox12.Text;
}
else
{
dr["remarks"] = DropDownList6.SelectedValue.ToString();
}
but the problem is that textbox will not apper on selection of others and null value saved at database
|
|
|
|
|
i m doing in this manner
protected void DropDownList6_SelectedIndexChanged(object sender, EventArgs e)
{
if (DropDownList6.SelectedValue == "OTHER")
{
TextBox12.Visible = true;............
hi this happens with me ones and there is no need to be panic on that just try the code here is:
protected void DropDownList6_SelectedIndexChanged(object sender, EventArgs e)
{
if (DropDownList6.SelectedIndex == "OTHER index value in numeric")
{
........
ok hope this sorts out the problem well.
|
|
|
|
|
Hi all,
I am migrating a project to web for a company with aroun 1000 users. I need ideas about easy to use gridviews with ability to do operations like add/update/delete multiple times and then save one like windows grid. any ideas about 3rd party tools or someone did something similar.
thanks in advance.
|
|
|
|
|
I think Telerik component is best for the grid and one more coponent DevXperience is also good for the grid.its depend on your clint web theme.
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
I am using GridView1 to populate records. But I have problem with Rows height of GridView1.
When GridView1 has more than 10 records then GirdView1 rows height is normal. But when the record count is one...Then Rows height goes bigger and bigger...
How to fix this issue?
|
|
|
|
|
hi,
I think is should not be happen.
Please check if u have set min height somewhere.
if u find everything fine then send yr html code to me.
Regards
Anil Pal
|
|
|
|
|
<div>
<asp:Panel ID="Panel1" runat="server" ScrollBars="Both" Style="z-index: 1; left: 23px;
top: 70px; position: absolute; height: 475px; width: 1296px">
<asp:GridView ID="GridView1" AllowSorting="True" AutoGenerateColumns="true" AutoGenerateSelectButton="true"
AllowPaging="true" SelectedIndex="0" runat="server" Style="z-index: 1; left: 0px;
top: 1px; position: absolute; height: 471px; width: 1297px" BackColor="#99CCFF"
BorderColor="#000099" BorderStyle="Solid" ForeColor="Black" OnRowDataBound="GridView1_RowDataBound"
OnSelectedIndexChanging="GridView1_SelectedIndexChanging" OnPageIndexChanging="GridView1_PageIndexChanging"
OnSelectedIndexChanged="GridView1_SelectedIndexChanged1">
<FooterStyle BorderColor="Black" />
<HeaderStyle BackColor="#CCCCCC" BorderColor="#3366CC" ForeColor="#003399" />
<RowStyle Height="10px" />
<SelectedRowStyle BackColor="LightCyan" ForeColor="DarkBlue" Font-Bold="true"/>
</asp:GridView>
</asp:Panel>
</div>
|
|
|
|
|
Hi,
I would like to suggest u please dont use style anymore.
Please use table in place od div if possible.
Regards
Anil Pal
|
|
|
|
|
|
what is the container of your Grid control ? Are you using any DIV to contain Grid ?
cheers,
Abhijit
CodeProject MVP
|
|
|
|