|
First of all the question itself is not clear.
Case I
Assuming that it is database table
Solution
Produce a single resultset by aplying join or any other condition based on your demand
Case II
Assuming it is DataTable
Solution
Create a custom datatable table that will have all the fields.
Fill the table programatically and then make it as the datasource of your grid view
e.g. [ Some rough pseudo code]
Datatable dt1 = new Datatable();
dt1.Columns.Add(Col1);
dt1.Columns.Add(Col2);
dt1.Rows.Add("Val1","Val2");
dt1.Rows.Add("Val3","Val4");
Datatable dt2 = new Datatable();
dt2.Columns.Add(Year);
dt2.Columns.Add(Month);
dt2.Rows.Add("2001","Jan");
dt2.Rows.Add("2002","Feb");
Datatable dtFinal = new Datatable();
dtFinal .Columns.Add(Col1);
dtFinal .Columns.Add(Col2);
dtFinal .Columns.Add(Year);
dtFinal .Columns.Add(Month);
dtFinal .Rows.Add("Val1","Val2","2001","Jan");
dtFinal .Rows.Add("Val3","Val4","2002","Feb");
myDatagrid.DataSource = dtFinal;
myDatagrid.DataBind();
Hope this helps
vote please
Niladri Biswas
modified on Saturday, June 13, 2009 11:07 AM
|
|
|
|
|
Bandanenilima wrote: I want to add items from one table and
can add year and month value from another tables
If your both datatables follow same structure, you can use DataTable.Merge[^]. But it looks like you have different structure. Obvious method would be to get a single data structure which has all the data required for binding.
|
|
|
|
|
Hi,
In a multiline textbox control that i added a user can keep typing on the first line without pressing enter on newline character.
How can i force the user to press the 'enter' button or automatically take the user to the newline once the boundary
of the textbox is reached.
the problem i am facing is that when the user saves the content and the page is refreshed, then the whole article is displayed in one line only and the breadth of the textbox is unimaginable. It just keeps going to the right side.
Thanks,
NetQuestions
|
|
|
|
|
The text box has built in word wrapping. It would appear that on the postback you are setting the width of the text box to be the number of characters in the Text property or allowing something else do that for you. Don't do that.
Man who stand on hill with mouth open wait long time for roast duck to drop in
|
|
|
|
|
NetQuestions wrote: How can i force the user to press the 'enter' button or automatically take the user to the newline once the boundary
of the textbox is reached.
When user types text and reaches the right end of textbox, it usually takes you to the next line automatically. Are you saying the text entered by user is not getting displayed as it is when page is refreshed? Textbox adds \n to each line and you have to replace this with <br> when displaying. Also replace spaces with . Browsers don't understand \n or white spaces.
|
|
|
|
|
how to set multilingual setting to a whole website or to
many webpages
i hav set multilingual setting in only one page
i want it to apply to whole page
the code is
|
|
|
|
|
All the thing is is depends on your web site structure.
- Provide the supported language list on your Page header are
- When end use choose any language from the list then save the selected language into Cookies or session object.
- As you are doing for one page use the selected language on every pages.
Please let me know if your requirement is different or your way of implementation is other.
|
|
|
|
|
my code is like tis
tis code works on the same page only i want to set the language setting in all pages.....
Imports System
Imports System.Globalization
Imports System.Threading
Imports System.Resources
Imports System.Reflection.AssemblyName
Imports System.IO
Partial Class Testmultiligual
Inherits System.Web.UI.Page
Private rm As ResourceManager
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
con.ConnectionString = ConfigurationManager.ConnectionStrings("ESCConnection").ConnectionString
Dim ci As CultureInfo
If Not Page.IsPostBack Then
gridbind()
Thread.CurrentThread.CurrentCulture = New CultureInfo("en-US")
'get the culture info to set the language
rm = New ResourceManager("Resources.Strings", System.Reflection.Assembly.Load("App_GlobalResources"))
ci = Thread.CurrentThread.CurrentCulture
LoadStrings(ci)
Else
'get the culture info to set the language
rm = New ResourceManager("Resources.Strings", System.Reflection.Assembly.Load("App_GlobalResources"))
ci = Thread.CurrentThread.CurrentCulture
LoadStrings(ci)
End If
End Sub
Private Sub LoadStrings(ByVal ci As CultureInfo)
HylEdit.Text = rm.GetString("Add", ci)
BtnClear.Text = rm.GetString("Clear", ci)
BtnSave.Text = rm.GetString("Save", ci)
HylView.Text = rm.GetString("View", ci)
TDAwd.InnerText = rm.GetString("Awd", ci)
TDAwdDes.InnerText = rm.GetString("Awddes", ci)
TDAwdpic.InnerText = rm.GetString("Awdpi", ci)
TDFreq.InnerText = rm.GetString("Freq", ci)
TDAwdcri.InnerText = rm.GetString("Awdcri", ci)
TDAwdSt.InnerText = rm.GetString("AwdSt", ci)
TDAwdk.InnerText = rm.GetString("Awdk", ci)
'TDGrvTitle.InnerText = rm.GetString("GrvTitle", ci)
GVawdview.Columns(1).HeaderText = rm.GetString("AwdNam", ci)
GVawdview.Columns(2).HeaderText = rm.GetString("Awdesc", ci)
GVawdview.Columns(3).HeaderText = rm.GetString("Frequcy", ci)
GVawdview.Columns(4).HeaderText = rm.GetString("Active", ci)
End Sub
Protected Sub lnkEng2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnkEng2.Click
Thread.CurrentThread.CurrentCulture = New CultureInfo("en-US")
LoadStrings(Thread.CurrentThread.CurrentCulture)
gridbind()
End Sub
Protected Sub LnkEng1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LnkEng1.Click
Thread.CurrentThread.CurrentCulture = New CultureInfo("es-ES")
LoadStrings(Thread.CurrentThread.CurrentCulture)
gridbind()
End Sub
|
|
|
|
|
Follow the step:
1) Create a base class
- Create a method called Translate(Page controls)
2) Inherit the base with all web pages and in page code behind call method Translate from the base class and pass the Control collection of page.
3) and In Translate method check control tye (may be label) then get the value of resource file same set as label id as per display the data.
modify the below code for support all supported languages -
string lan=Get from the Cookies or Session variab
Thread.CurrentThread.CurrentCulture = New CultureInfo(lan)
|
|
|
|
|
First search in google.
Tons and tons of articles of this sort are there.
Niladri Biswas
|
|
|
|
|
Hi all,
how to integrating ssrs into asp.net app
can somebody help me
Regards
Koti
|
|
|
|
|
Google[^] gave me 1,270,000 for sql server reporting services asp.net. in 0.35 seconds.
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 Friends,
I got the following error when my page is load. sometime its work fine.
sometime its not work.i tried goggle, asp.net forum but yet not getting
satisfactory solution.
ERROR: The state information is invalid for this page and might be corrupted.
if u have any solution please let me know.
Thanks
Regards
Keyur Satyadev
|
|
|
|
|
Have a look here[^]
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.
|
|
|
|
|
that's i already seen. but any way we need to find the solution of this. that's
why i put this here. anyway i m working on that if i get any proper solution will tell
you.
thanks for reply
Regards
Keyur Satyadev
|
|
|
|
|
how to set image and background pic and background colour in theme file
tat is in skin file
tanx
|
|
|
|
|
you have to apply different css for different theme if u need different background for every theme.
put just
body
{background:"",
background-color:""
}
in CSS file apply in your skin file.
Regards
Keyur Satyadev
|
|
|
|
|
Hi guys, i have 2 questions...,
1)we cant use our ajax control toolkits in usercontrol?,
i tried in user control "auto complete extender" with page method...,
its not working...,
2)is there we can achieve cascading drop down with page method?(with out webservice concept)
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
I have a folder on the server with a web sharing permission.
if i add the Built-in security principals(Network) for sharing permission, i can use the scripting.fileobjectsystem to copy file from client to that folder. but the problem that i can access that folder from client. when i remove this permission then i cannot access the folder from client but also i cannot copy file using scripting object.(access denied exception)
Any idea ??
dghdfghdfghdfghdgh
|
|
|
|
|
Hello,
i want to copy a file to server side.
i thaught that maybe i can get the file using scripting.filesystemobject .getfile and then put it in an html input and then save it on the server. can i do that in javascript ??
is there any other idea to post file in vbscript without using scripting object . movefile to ...
regards.
dghdfghdfghdfghdgh
|
|
|
|
|
The HTML input control is highly locked down, to stop people from stealing files. If you want someone to send you a file, you need to ask them to select it. Unless you use an activeX control, then I'm not sure what's possible.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
I have uploaded data into Amazon site through my own web page. Where I am writing data into predefine Xml according to my Web page.
But right now I m trying to write that data into Predefine XSD with the help of predefine xml.
Can any buddy tell me how to write data in xsd from xml.
|
|
|
|
|
<asp:templatefield headertext="Award name">
i want to use header text in code behind
is their any method
how to change the header text of an template field dynamically
|
|
|
|
|
<asp:templatefield headertext="Award name">
i want to use header text in code behind
is their any method
|
|
|
|
|