|
I have windows application in which i use Datagrid to populate values .datas in each cell inturn contains more information . so i like to display data in each cell as tree structure which on collapsing displays the related information.
Suggest a way to acheive this ......
Thanking you
Mani
Mani
|
|
|
|
|
I'd like to put images in gridview but i am constructing my gridview using DataTable and i do not know how to do this. I tried ResolveURL but it only writes the path of the file to the grid. Please help me...
|
|
|
|
|
Use templatefield like follows:
<asp:TemplateField><br />
<ItemTemplate><br />
<img src='<%# Eval("imagepath") %>' alt=''> <br />
</ItemTemplate><br />
</asp:TemplateField>
Regards
R.Arockiapathinathan
|
|
|
|
|
Hallo,
I have DataGrid (with hyperlinkcolumn) on "parent" page, and when click on the data in it want to open "child" page with data in another DataGrid, but just for the data I clicked before.
I have (in the "parent" DataGrid):
<asp:HyperLinkColumn DataNavigateUrlField="Ime" DataNavigateUrlFormatString="prikaz_komentar.aspx?Ime={0}"
DataTextField="Ime" HeaderText="Ime"></asp:HyperLinkColumn>
But, it opens me the new page (prikaz_komentar.aspx)with datagrid with all datas, not just for the one I clicked (choosen Ime).
Thank You
Katarina
-- modified at 7:01 Wednesday 28th June, 2006
|
|
|
|
|
HI Katarina,
Not clear with the thing u want.
Please mention the code and the problem.(elaborate)
Thanks,
Sushant Duggal.
|
|
|
|
|
HI Katarina,
Dear I am still not clear with your code. But If u want to send some data from datagrid to other page, you can do it like this.
You have used hyperlinkColumn, but I always prefer template column as it is much more flexible.
<asp:TemplateColumn>
<ItemTemplate>
<a href="pageWhereUWantToGo.aspx?valueThatYouWantTOPass=<%#DataBinder.Eval(Container.DataItem,"Value")%>">Text</a>
</ItemTemplate>
</asp:TemplateColumn>
In the other page you can get the value from Request.QueryString["valueThatYouWantTOPass"]
I hope it helps u
Thanks
Sushant Duggal.
-- modified at 8:20 Wednesday 28th June, 2006
|
|
|
|
|
Hi again,
I have a page with datagrid like this
Ime Prezime Grad Adresa
Gruja Kostadinovic Beograd Bul. Umetnosti 11
Borko Milojevic Beograd Nemanjina 6
Goca Stankovic Nis Vozdova 4
„Ime“ is hyperlinkcolumn, because I want ot click on, for example, „Borko“, and then open another page with datagrid with data for Borko from same table in database.
Other page has to be like this:
Ime Godine Skola
Borko 29 VSS
Found somewhere that this is the code in first page:
<asp:HyperLinkColumn DataNavigateUrlField="Ime" DataNavigateUrlFormatString="prikaz_komentar.aspx?Ime={0}"
DataTextField="Ime" HeaderText="Ime"></asp:HyperLinkColumn>
But, it doesn’t give me the data for „Borko“ in datagrid another page, but for all (Gruja, Borko, Goca). What I have to do, to get data only for one „Ime“ ("Borko")I clicked on the previous page?
Thanks for your trouble
KatarinaYU
-- modified at 5:11 Thursday 29th June, 2006
|
|
|
|
|
Hi Katrina,
If you have to display the contents of only one row in the next page , then y r u using dataGrid on the second page?
Show me the code of the second page also.
I think the trouble is in the second page.
Thanks,
Sushant Duggal.
|
|
|
|
|
Hi Sushant,
yes, I am using datagrid (dgLista2)on the second page. Here is the code:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
Prikazi()
End If
End Sub
Sub Prikazi()
Dim ds As New DataSet
Dim veza As New DBKonekcija
Dim adpLista As New OleDbDataAdapter
adpLista = New OleDbDataAdapter("Select Ime, Komentar from TDatum", veza.Konekcija)
Try
adpLista.Fill(ds, "Lista")
If ds.Tables("Lista").Rows.Count Then
dgLista2.DataSource = ds.Tables("Lista")
dgLista2.DataBind()
End If
Catch ex As Exception
End Try
veza.Konekcija.Close()
End Sub
Here is what I want: when click on the choosen Ime (first page), get data Ime and Komentar in datagrid second page (from table TDatum in database), but just for Ime I clicked on the first page.
Thank you very much
KatarinaYU
|
|
|
|
|
Hallo,
I manage to solve the problem.
Thanks for your time.
KatarinaYU
|
|
|
|
|
Hi,
Just came back from weekend tour.
I think the problem was with SQL Query, I think the where clause was missing.
Thats great that you solved the problem.
Happy Coding...
Thanks,
Sushant Duggal.
|
|
|
|
|
Hi,
I am writing a Web control library which contains a control to display multiple address lines, it has a property 'Addresses' which is an 'ArrayList' containing multiple 'Address' class objects, this works fine in code and I can add/remove addresses in code but I would like to be able to add them in design view (Like ListviewItems), and have them entered like this:
<br />
<MyControlLibrary:MyControl runat="server" ID="MyControl1"><br />
<Address Line1="Test" Line2="Test" /><br />
<Address Line1="Test" Line2="Test" /><br />
</MyControlLibrary:MyControl><br />
I think I need to use the 'ParseChildren' property but I have tried various ways and nothing seems to work, could somebody point me in the right direction?
Thanks
-- modified at 4:40 Wednesday 28th June, 2006
|
|
|
|
|
You may need to specify a couple of attributes for the custom property of your control to support at design time: Editor, DesignerSerializationVisibility, PersistenceMode . I believe that you can find the sample code from the artiles posted here on CP using the search functionality. For more information, see Attributes and Design-Time Support[^]
|
|
|
|
|
I am having an error while loading the dataset in crystal report. The error is login failed.
when we add a single element in the dataset by doing right click the dataset page and selecting the new element option. No error is coming that time.
But when i add multiple elements in the a single dataset and connecting that dataset to crystal report then error what i mentioned is coming.
can somebody please tell me whats the problem there and what the use of other options that r available in the right click options like new group, new element , new single type etc
|
|
|
|
|
how to load all data then page visible in asp net
parthiban
|
|
|
|
|
Hi! All,
Most of web program I used Iframe but I still got a problem when I used Iframe. I can't findcontrol textbox in Iframe.
my code is following this
Dim txtTitle1 As TextBox
txtTitle1 = CType(Me.IFrameDoc.FindControl("txtTitle1"), TextBox)
dim strTitle1 as string
strTitle1 = txtTitle1.Text
but it didn't work txtTitle1 returned nothing
Is there somebody who know how to find the control in IFrame?
Thank you in advance
Jibcht
|
|
|
|
|
Hi all,
I need to create a Web Controls Table which 3 columns namely Date, From Time, To Time.I have a button on my Web Form(parent) form which I open dialog window which has calender control and time combo.When I select the date and from time and to time,I have to display all the 3 values in the table.
Can any one tell me how do I create this table with headings and how do I display all the values??
Also I do need multiple rows I mean I do have to insert min 2 records in this table.
Please help me with the code.
Thanks in advance.
|
|
|
|
|
Its a bit tough to determine from your post exactly what you are trying to accomplish. The way I interpret it, there are 3 approaches that you might consider, depending on your needs.
The easiest way would be to simply force a postback with the row data each time you need to add to the grid. Your pop-up dialog could populate hidden textboxes that contain the row's information, and then use client side script to submit. The downside to this is that it is a very poor user experience.
Another way would be to use the DOM and client scripting to dynamically control the table on the client side. An example of this approach, with client script can be found here[^]. If that one isn't to your liking, many others can be found on the web. There are two downsides that I see to this method. First, older browsers will not support it. Secondly, the client manipulations will not be sent to the server. You would need to come up with a means of tracking the client side changes so that you could parse them on a postback.
Yet another option would be to use an AJAX-enabled interface to process handle the requests on the server in a real-time manner without degrading the user experience. There are plenty of this approach on the web, such as this[^] one. It may also be worth your time to check into a third party control to make this easier for you. Again, there are many to choose from, such as this[^] one that I've randomly selected.
If I were implementing it, I would probably go with a blend of the second and third methods. I would perform client side manipulation to the table directly and fire off an async request to the server to track the changes at the same time. In my opinion, that would give the best user experience without having to resort to dirty tricks to "remember" the sequence of changes as they occur.
Hopefully, that provides enough help to get you started. Best of luck.
--Jesse
|
|
|
|
|
with this code i could play video on my web page. but it just plays given file "C:\Inetpub\wwwroot\myProjectFolder\UserControl.wmv" how can i send file name ? i mean user will choose a file name which is already exist in the project folder and the choosen file will be played
<object id="play" style="WIDTH: 510px; HEIGHT: 370px" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6"
="" name="play" viewastext="">
PARAM NAME="URL" VALUE="C:\Inetpub\wwwroot\myProjectFolder\UserControl.wmv">
PARAM NAME="rate" VALUE="1">
PARAM NAME="balance" VALUE="0">
PARAM NAME="currentPosition" VALUE="0">
PARAM NAME="defaultFrame" VALUE="">
PARAM NAME="playCount" VALUE="1">
PARAM NAME="autoStart" VALUE="0">
PARAM NAME="currentMarker" VALUE="0">
PARAM NAME="invokeURLs" VALUE="-1">
PARAM NAME="baseURL" VALUE="">
PARAM NAME="volume" VALUE="50">
PARAM NAME="mute" VALUE="0">
PARAM NAME="uiMode" VALUE="full">
PARAM NAME="stretchToFit" VALUE="0">
PARAM NAME="windowlessVideo" VALUE="0">
PARAM NAME="enabled" VALUE="-1">
PARAM NAME="enableContextMenu" VALUE="-1">
PARAM NAME="fullScreen" VALUE="0">
PARAM NAME="SAMIStyle" VALUE="">
PARAM NAME="SAMILang" VALUE="">
PARAM NAME="SAMIFilename" VALUE="">
PARAM NAME="captioningID" VALUE="">
PARAM NAME="enableErrorDialogs" VALUE="0">
PARAM NAME="_cx" VALUE="11007">
PARAM NAME="_cy" VALUE="8043">
OBJECT>
openup your heart and let the sun shine in
-- modified at 5:23 Wednesday 28th June, 2006
|
|
|
|
|
i solved the proble i am using this code
<param name="URL" value="<%=gelen%>" />
gelen is a public variable . i am giving it the path in any event for ex.
in button_click event
{
gelen = "c:/film.wmv";
}
when a user clicks this button film.wmv is being ready for playing
my english isnt ok i couldnt explain what i think i hope you can understand
openup your heart and let the sun shine in
|
|
|
|
|
Hi,
I am new to .Net. I developed a web application in ASP.Net and C#. Here I included a reference to Acrobat COM dll. I actually want to remove the toolbars from the PDF Document. But when I try to run the application, it throws a runtime error "Access Denied". I tried to register the COM dll using:
"regsvr32 Interop.Acrobat.dll". But here the error message is that: "the dll was loaded but entry point was not found".
To deal with the error "Access denied", I included "<identity impersonate="True">" in the web.config file. This helps run the application only on the server. When I try to run the application form a client, it throws a "runtime error" or "Server eror".
Can anyone suggest me a solution. Either how to run the application on clients using identity impersonate="true" or a solution to the Acrobat COM object.
I am facing a tough time and any help would be really appreciated.
Thanks,
Awase.
|
|
|
|
|
Hi,
i have written following code
TextBox tb = new TextBox();
tb.Text = "ghjhgjh";
Label lbl = new Label();
lbl.Text = "Hello, World!";
lbl.Font.Bold = true;
Controls.Add(lbl);
Controls.Add(tb);
foreach (Control c in Controls)
Label1.Text += c.ToString() + " - " + c.ID + " ";
but on running i get the following exception --> Control 'ctl03' of type 'TextBox' must be placed inside a form tag with runat=server.
also please explain how to retain the view state of the text box.
|
|
|
|
|
On the HTML tab of the .aspx page you should see the <textbox> tags. Make sure that it is within the tags. I've had that happen before. Within the textbox you can do
<asp:textbox id="abc" runat="server" viewstateenabled="true/">
Hope that helps!
|
|
|
|
|
Hi,
adding within controls inside form tag is not under my control unless i use addat function.
Moreover pls help with retaining the view state .Many say that it should be added in the init ftion.But still doesnt work.Pls write a small snippet if possible because couldnt find a suitable link i require in net.
|
|
|
|
|
Go to the properties of the text box and make view state as true.
View state will be automatically saved.
Make sure That textbox is server control.
Go to html, make sure that is within tag and include runat = server
hope that helps
|
|
|
|