|
hy
I created Gridview dynamically runtime according to Arraylist Datatable
Now in this very Gridview I want Delete And Checkbox Control to be used .
How ot write code for this
plz Help me
|
|
|
|
|
AnupOmi wrote: I created Gridview dynamically runtime according to Arraylist Datatable
Why you want to do that?
|
|
|
|
|
hy i needed this in my program
i have dynamically created the gridview but not getting any idea how to write code for it as i donot know the name and number of gridview created
All these are created dynamicaaly and i have assign ID to it dynamicaly
.Can we Add code to a button at runtime as it can be created .So help me
|
|
|
|
|
AnupOmi wrote: i have dynamically created the gridview
Why don't you bind the gridview directly to the arraylist instead of creating it dynamically?
|
|
|
|
|
Actually What i am planning to do is as not what u thinking .let me Clearify to u.
First of all i Have two Database table .
1-> It is a WatchTAble having userid and Watchname(Unique with userid)
2-> It contains Added row of field with UserID and Watchname.it can have one userid with many Watchname And related value.
now here comes the question:
I am displaying GridView with Watchname,Totalid of another table,date onbehalf of userid.
it has a button to display All Checkbox selected watchname to another page
so here i donot know how many he is selecting .
And in another page i want Gridview with delete button and checkbox respectively with gridview each created .
I can create the Gridview dynamically According to its selection (working on it) but not have any idea baout how to handle delete by row
|
|
|
|
|
AnupOmi wrote: so here i donot know how many he is selecting .
This is not a problem but you know which columns you are displaying in the next gridview.So no need to dynamically create second gridview.Create a list of objects with the selected rows in it.
just like,
gvwSecond.DataSource=listSecond;
gvwSecond.DataBind();
where listSecond is populated with the selected rows.
Add Template Column to gridview and add whatever controls you want.
|
|
|
|
|
Actually i want to add delete button in template field
which is bounded dynamically so i cannot use the Gridview row command
not getting any isdea how to do this
|
|
|
|
|
You can either use commandfield like,
<Columns>
<asp:CommandField ShowDeleteButton="True" />
</Columns>
or TemplateField like,
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="lbtnDelete" runat="server">Delete</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
For more info,
http://msdn.microsoft.com/en-us/library/bb288032.aspx[^]
|
|
|
|
|
hi i want to submit the value of dynamically created textbox dynamically.for this i have written following code but it is givin error:object refrence not set to an instance of an object.
the code is:
protected void Button2_Click(object sender, EventArgs e)
{
OleDbDataReader dr = null;
string str = "Select * From ProductSpecification";
OleDbCommand cmd = new OleDbCommand(str, conn);
conn.Open();
dr = cmd.ExecuteReader();
for (int i = 1; i < dr.VisibleFieldCount; i++)
{
while (dr.Read())
{
string s=dr["Specification"].ToString();
TextBox txtctrl=new TextBox();
txtctrl=(TextBox)Panel2.FindControl("txt" + s);
string s1 = txtctrl.Text;
string s2 = "Update ProductSpecification Set(Value='" + s1 + "')";
cmd = new OleDbCommand(s2, conn);
cmd.ExecuteNonQuery();
}
}
conn.Close();
}
|
|
|
|
|
mylogics wrote: txtctrl=(TextBox)Panel2.FindControl("txt" + s);
I think you are getting error may be because of this.Plz check if you are getting that control by using FindControl.
|
|
|
|
|
yaa m getting error on same line....
wat shud i do to remove this error...
wat line shud i write instead of this...
|
|
|
|
|
|
Button click will do a post back. Do you take care in you page load that your textbox does not get vanished?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
no shud i chek for ispostback at pageload event....
|
|
|
|
|
Make sure the dynamic control is added to Page_Load method. If not, when posting back, the control will lose
txtctrl.ID = "txt" + s;
Panel2.Controls.Add(txtctrl);
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 21:57pm.
|
|
|
|
|
(ASP.NET 3.5)
I m getting problem with ~ sign used to locate the master file.
The project is running on local but when hosted on web then an error "Home.Master" page not found.
===============
<%@ Page Title="" Language="C#" MasterPageFile="~/Home.Master" AutoEventWireup="true" CodeBehind="StudentRegistration.aspx.cs" Inherits="IUMS.SIS.StudentRegistration"
=================
Please suggest me some answer
Thax
|
|
|
|
|
gauravems wrote: MasterPageFile="~/Home.Master"
Shouldn't it be MasterPageFile="Home.Master" ?
Your current path does not make any sense to me.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hello,
I am a ASP.NET web developer. I need to design a Work Flow for an Application which has about 75+ forms & tables. I need a supporting toolkit which can be used by the end user of my application who can configure his own flows dynamically. The workflow engine should provide a web based graphical designer for the end user and an API for integrating the workflow designed by the end user graphically.
If you can suggest some product which is available in the market which can be a open source or even a commercial product, which should be reliable & more economical. The work flow engine should be more dynamic & more user friendly.
Regards
Darpan Perumal
|
|
|
|
|
Try this site many people are using for creating work flows
http://www.skelta.com/[^]
If It Helps Click It as Answer
|
|
|
|
|
Thanks for your reply,
I went through your referred vendor. But the product is not compatible with external forms tables & classes. If I need to use his product I need to create forms using his product.
I would like to know any product which has the capabilities or in-line with "Tibco Iprocess".
|
|
|
|
|
hi
i want display my table values in treeview control
my table has two columns
Pid sub Id
1 5
1 8
2 7
6 8
4 6
4 9
treeview i want like this
1
->5
->8
2
->7
6
->8
4
->6
->9
using vb.net code(for loop and if condition) is it possible to display the table content like this
|
|
|
|
|
Member 2657553 wrote: using vb.net code(for loop and if condition) is it possible to display the table content like this
Yes.
All you'd do is create your first set of nodes, then you'd look up each first level node to insert the second level ones.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
You can use a construction like this:
Dictionary<int, Listlt;int>> LlstTreeNodes = new Dictionary<int, List<int>>();
Fill it with the data from your table.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hi,
is there any components to play list of audio songs in asp.net web application, this wants to support different audio types or atleast .Mp3 and .wav formats. Please help me out, if any one knows.
Thanks in advance...
Regards
murthy
|
|
|
|
|