|
Your datasource should be dynamic. Make your datasourse (datatable, dataset) at runtime and bind it to the grid (grid should've it's property AutoGeneratedColumns to True)
Please don't forget to mark 'Good Answer', if you find it really a good one!
Kashif
|
|
|
|
|
I need to add some links and radiobuttons in gridview columns at gridview row bound event ,that 's the reason i myself adding fields in gridview,not setting its autogenerate columns ot true
|
|
|
|
|
You can still add link through rowdatabound event.
Please don't forget to mark 'Good Answer', if you find it really a good one!
Kashif
|
|
|
|
|
I need to add a column having radio button list.
how will this i add then
|
|
|
|
|
plz help me, i need to do this urgent
|
|
|
|
|
in rowdatabound create an object of radiobutton and add it to the column you want.
Please don't forget to mark 'Good Answer', if you find it really a good one!
Kashif
|
|
|
|
|
Thank you ,I think autogenerate =true is the solution
|
|
|
|
|
I am working on LMS application and I have added a scorm course in my application.
|
|
|
|
|
Member 4466059 wrote: I am working on LMS application and I have added a scorm course in my application.
OK, so you don't have a question at all then ?
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.
|
|
|
|
|
|
I am working on LMS application and I have added a scorm course in my application. when I run scorm test then its works fine and showing my quiz result in its flash window.
|
|
|
|
|
If you've done this, why did you post twice to tell us ? Perhaps if it's so good, you could write an article. This area is for questions.
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.
|
|
|
|
|
how did you create SCOM course and also how did you manage to transfer data from scorm object to LMS. Could you provide some basic examples. There is so much information but nothing is simple and takes u not to have headace while reading. I would much appreicat it.
|
|
|
|
|
Hi Guys,
I have a problem resizing the iFrame at runtime. I need to resize it based on different screen resolutions.
This is the html tag of my iFrame:
<a id="iiframe" href="livechat.aspx iframe=true&amp;width=394&amp;height=520" rel="prettyPhoto[mixed]">
<img src="images/corner.png" width="190" height="205" />
</a></div>
hifiger2004
|
|
|
|
|
Heyy,
give width and height in % rather than pixels
|
|
|
|
|
I m showing Product image, description, specification in datalist through database........this is asp code.......
<asp:datalist id="DataList1" runat="server" width="80%" cssclass="Datalist">
<itemstyle backcolor="White">
<itemtemplate>
<asp:imagebutton id="ImageButton2" runat="server" height="230px"
="" width="230px" imageurl="<%#Container.DataItem("Picture") %>">
| <asp:label id="lblHeading" runat="server" cssclass="ProductHead"
="" text="< %#Container.DataItem("Name") %>">
<asp:label id="lblDesc" runat="server" cssclass="ProductDesc"
="" text="<%#Container.DataItem("Description") %>">
<asp:label id="lblProductDetails" runat="server" cssclass="ProductDetails"
="" font-underline="True" text="Product Details">
<asp:label id="lblItem" runat="server" font-bold="True" font-names="Verdana"
="" font-size="Small" forecolor="Gray" text="Item #">
<asp:label id="lblIt" runat="server" cssclass="ProductPD"
="" text="<%#Container.DataItem("ItemNo") %>">
<asp:label id="lblTI" runat="server" cssclass="ProductDetails"
="" font-underline="True" text="Tanzanite Info">
<asp:label id="lblQuality" runat="server" font-bold="True" font-names="Verdana"
="" font-size="Small" forecolor="Gray" text="Quality:">
<asp:label id="lblQ" runat="server" cssclass="ProductPD"
="" text="<%#Container.DataItem("Quality") %>">
<asp:label id="lblDimensions" runat="server" font-bold="True"
="" font-names="Verdana" font-size="Small" forecolor="Gray" text="(LengthxWidthxHeight):">
<asp:label id="lblW" runat="server" cssclass="ProductPD"
="" text="<%#Container.DataItem("length") %>">
<asp:label id="X1" runat="server" cssclass="ProductPD" text="x">
<asp:label id="lblH" runat="server" cssclass="ProductPD"
="" text="<%#Container.DataItem("width") %>">
<asp:label id="X2" runat="server" cssclass="ProductPD" text="x">
<asp:label id="lblD" runat="server" cssclass="ProductPD"
="" text="<%#Container.DataItem("height") %>">
|
<asp:label id="lblPrice" runat="server" font-names="Verdana" font-size="Medium"
="" forecolor="Gray" text="PRICE:">
<asp:label id="Label13" runat="server" cssclass="ProductPrice" text="$">
<asp:label id="lblPr" runat="server" cssclass="ProductPrice"
="" text="<%#Container.DataItem("Price") %>">
<asp:button id="btnAddToBasket" runat="server" backcolor="#2165B0"
="" bordercolor="Black" borderstyle="Double" borderwidth="1px" font-names="Verdana" forecolor="White" text="ADD TO BASKET" commandname="atb">
<asp:imagebutton id="ibWishlist" runat="server"
="" imageurl="~/Images/wishlist.gif">
<asp:linkbutton id="lbAddtoWishlist" runat="server" font-names="Verdana"
="" font-size="X-Small" forecolor="#4B7BB0">Add to Wishlist
|
This is page behind code........
Dim id As Integer = Request.QueryString("id")
Dim cmd As String = "Select * from Products where StoneID=" & id & ""
Dim rdr As IDataReader = db.ExecuteReader(CommandType.Text, cmd)
DataList1.DataSource = rdr
DataList1.DataBind()
Now wht i want is whnvr user took mouse over on image..........a button of Enlarge will show.............and on click the image got enlarge...........and background become change in black color.........how to do in datalist................plz guide me a bit.........
|
|
|
|
|
Yaar,
Please post only relevent code snippet ,
"itni ramayan kaun padhega "
|
|
|
|
|
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
//TextBox t= (TextBox )GridView1.Rows[e.RowIndex ].FindControl ("txtId");
//TextBox t2=(TextBox )GridView1.Rows[e.RowIndex ].FindControl ("txtName");
GridViewRow row = GridView1.Rows[e.RowIndex];
TextBox t = (TextBox)row.FindControl("txtId");
TextBox t2 = (TextBox)row.FindControl("txtName");
con.Open();
cmd = new OdbcCommand("update table AdminAddNewItem set Node_Name= '" + t2.Text + "' where Node_Id=" + t.Text, con);
cmd.ExecuteNonQuery();
con.Close();
|
|
|
|
|
Apart from the part where your code is broken and I can erase your entire database with it ?
What's happening with this code ? Why do you feel it needs correcting ?
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.
|
|
|
|
|
|
Use stored procedure...or atleast use parametrised Query ,
Please don't write like this
|
|
|
|
|
Hi,
Please use the following line to access the data grid textbox value from code behind
Convert.ToString(CType(GridView1.Rows(i).FindControl("Text1"), Textbox).Text)
Thanks,
Raja.S
|
|
|
|
|
In a web based application i have some textboxes and on the button click the data from the textboxes should be displayed in a gridview or some other conrol where the data can be displayed, modified such that the data be sent back to the textboxes for modifying and back into the gridview .Another button for deleting the data and finally on the click of a button that is outside the gridview the data from it should go into the database.
I was able get the data into the gridview from the textboxes to the grid and back using the
select "textbox1.text" as data1,"textbox2.text"as data2 etc.and was able to modify the data.but for deleting the row i was not able to trace which row is getting deleted and am not able to sent the data to the database on the button click outside the gridview.What should I do? is there some way i can use the gridview itself for the same or i should use some other conrol ?
|
|
|
|
|
You can use a list of objects as a datasource. You don't need to use a database.
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.
|
|
|
|
|
Why dont u store the IDs of the deleted records and during saving the grid to DB delete the records from DB using thoseIDs.
|
|
|
|