|
This is what you can do: convert the desired field in your outer GridView into a templated field, then go back and click on the Edit Templates. Select that specific templated field, delete any other control that might be there by default, and drag-drop a GridView. You can bind the inner gridview just as you would for the outer GridView.
To manipulate data/attributes of the inner GridView, you will have to “find” that control within an event that is wired to the outer GridView:
protected void yourGridView_RowDataBound(object sender, GridViewRowEventArgs e)<br />
{<br />
if (e.Row.RowType == DataControlRowType.DataRow)
{<br />
GridView _yourInnerGrid = ((GridView)e.Row.FindControl("innerGrid"));<br />
_yourInnerGrid.SelectedIndex = 14; <br />
}<br />
}
Let me know if you have any questions, good luck!
Nila
|
|
|
|
|
How to EDIT,CANCEL and SAVE in Datagrid...
means bubbling ..
Hello this is Ravi
|
|
|
|
|
|
I store articals in a Memo data typed field (Access DB).
Articals has paragraph.
I read data from DB. if I show data in label, dashes are not seen.
But if i show in multiline textbox, dashes are seen, but i couldnt fix the textbox heigh to whole text and scrollbars are seen.
what i can do?
"i would like to show text as at textbox but i have to manage textbox height and hide scrollbars"
SAMPLE
at label
"Ölsem, ölsem, ölsem... hemen şimdiKaçsam, gitsem, kaçsam... tam da şimdiBu kez pek bir afili yalnızlık Aldatan bir kadın kadar düşman Ağzı bozuk üstelik... bırakmıyor acıtmadan Bu kez pek bir afili yalnızlık Ağlayan bir kadın kadar düşman Tuzaklar kurmuş üstelik Bırakmıyor acıtmadan "
at textbox
"Ölsem, ölsem, ölsem... hemen şimdi
Kaçsam, gitsem, kaçsam... tam da şimdi
Bu kez pek bir afili yalnızlık
Aldatan bir kadın kadar düşman
Ağzı bozuk üstelik... bırakmıyor acıtmadan
Bu kez pek bir afili yalnızlık
Ağlayan bir kadın kadar düşman
Tuzaklar kurmuş üstelik
Bırakmıyor acıtmadan
"
-- modified at 3:58 Tuesday 14th November, 2006
|
|
|
|
|
By dashes, do you mean new line? If so, the Replace method can help you, but you have to play around with it to make it; this works for me in Oracle:
yourLabel.Text = _someVariable.Replace("\r\n", "<br/>");
Goodluck!
Nila
|
|
|
|
|
but i have to do opposite
Think u type a text in textbox
then how could i find the newlines in text?
Because when i see Text property of textbox, it seems like
"Think u type a text in textbox then how could i find the newlines in text? Because when i see Text property of textbox, it seems"
|
|
|
|
|
The \r\n or sometimes the \n (from within the application at runtime) is the special character for new line... you won't be able to see it in the designer or at app runtime, but trust me, it is there if you see the newline in a text box. And it is up to you how to manipulate it; I do it with the Replace() method.
Nila
|
|
|
|
|
ohh AT THE END
NewText=txtDesc.Text.REPLACE (vbCRlf," ")
|
|
|
|
|
there you go
Nila
|
|
|
|
|
I have an issue..
I have many alertBoxes in my code (ASP.NET - C# is used). I want to distinguish between AlertBoxes. For that i want to change the background color of the alertbox or use an icon inside alert. Or add a title to the alert.
My code is similar to this.
My .aspx page contains the following
<br />
<HTML><br />
<HEAD><br />
<script language=javascript><br />
function LoadWindow()<br />
{<br />
<br />
<% <br />
if(PageInvocation.Trim().Length <= 0)<br />
{ <br />
Response.Write("window.history.go(+1); ");<br />
} <br />
%><br />
<br />
<%=PageInvocation%><br />
<% PageInvocation=""; %> <br />
<br />
} <br />
</script><br />
</HEAD><br />
<body bottomMargin="0" leftMargin="0" topMargin="0" rightMargin="0" onload="LoadWindow()" onunload="CleanUp()"> <br />
.<br />
.<br />
.<br />
</body><br />
</HTML><br />
My .aspx.cs has the following code.
<br />
public Page_load()<br />
{<br />
PageInvocation = "alert('Hi- First Time!!!'); ";<br />
PageInvocation = "alert('Hi- Second Time!!!'); ";<br />
}<br />
<br />
I want to distinguish the 2 alerts by giving a different background color or adding icon or by adding a different title.
Plzzz.. Help me out.
Mads
|
|
|
|
|
Hello,
You could try something better then alert(). What about http://www.codeproject.com/aspnet/asppopup.asp[^] ?
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
|
|
|
|
|
Thanks a lot. i think its really useful.
mads
|
|
|
|
|
It is really helpful.but i am not able to add a pop up with OK and CANCEL buttons inside. Can u suggest me with something about this.
mads
|
|
|
|
|
i hav created the proxy of my web service and its dll as well but my cient application that is a asp.net application is giving this error wen im adding the reference to the service
The type 'Service' is ambiguous: it could come from assembly 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mywebservice\522ada3f\21d22f71\App_Code.bahepogz.DLL' or from assembly 'C:\Inetpub\wwwroot\WebSite1\bin\Serviceproxy.DLL'. Please specify the assembly explicitly in the type name.
bia
|
|
|
|
|
I got a table in ASP.NET page..How to make a user control for example a menu toolbar take the width and height of table cell?
Best regards
|
|
|
|
|
hi,
give the height and width in percent - %
Thanks & Regards...
Amit
|
|
|
|
|
My aspx page always display the old data , so i need to manually refresh the page only the page display the latest data, how to diable browser save the cache ?
Best regards,
Chee ken
|
|
|
|
|
i have not done it but you can get help from this
Response.AddHeader("Cache-Control", "no-cache");
Response.AddHeader("Cache-Control", "no-store");
Response.AddHeader("Pragma", "no-cache");
Google it i think you will definatly get it
Enjoy coding
|
|
|
|
|
still can not disable the cache.
Best regards,
Chee ken
|
|
|
|
|
Hi All,
i m using c#,asp.net with 1.1 framework. i m trying that user must be able to
navigate only in forward direction, i.e. clicking on back button must display
an error page like "Page Expire". how can i implement this fuctionality...
Thanks in advance...
Regards...
Amit
|
|
|
|
|
Hi there,
Write the following header settings in Page Load event, Page will always rendered from the server rather than from cache... and displays a message stating that page is expired.
Response.AddHeader ("Pragma", "no-cache");
Response.Cache.SetCacheability (HttpCacheability.NoCache);
Response.Cache.SetExpires (DateTime.Now.AddHours (-1));
Confidence comes not from always being right, but from not fearing to be wrong.
Mihir..
|
|
|
|
|
how can i trap the back button in Internet Exploer using asp.net2005.i want to stop back button or disabl back button at a particular page.
Deepak
Smile a Lots,Its Costs Nothing
|
|
|
|
|
I am not sure of disabling the back button but using javascript you can keep the user on the same page i.e. forwarding again to the same page after clicking on the back button.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Also you can remove all this buttons from the browser if you don't need them
|
|
|
|
|
how can i do tht?
may u help me more?
Deepak
Smile a Lots,Its Costs Nothing
|
|
|
|