|
We have a VB 2010 ASPX program with a GridView that needs to support sortable columns.
There is no database.
Is there a way to just sort the entire grid based on 1 column without redoing the entire grid?
Do we have to use a DataTable as sort that?
|
|
|
|
|
How do you bind/add values to your gridview?
|
|
|
|
|
My guess is you can create a datatable hard coded out of the data you do have and then sort on that.
You also could use generics and inherit icomparable and then use the sort method in that custom data class.
My suggestion would be datatable will be easier..
And then run .sort on it.
=)
|
|
|
|
|
how to implement azure with .net
modified 17-Aug-13 17:10pm.
|
|
|
|
|
|
|
add below code in .aspx
<div>
UserName:
<asp:TextBox ID="txtUserName" runat="server">
</asp:TextBox>
Password:
<asp:TextBox ID="txtPassword" runat="server">
</asp:TextBox>
<asp:Button ID="login" OnClick="login_Click" Text="Login" runat="server" />
</div>
add below code in .code behind
protected void login_Click(object sender, EventArgs e)
{
Ektron.Cms.UserAPI userApi = new Ektron.Cms.UserAPI();
if (!String.IsNullOrEmpty(txtUserName.Text) && !String.IsNullOrEmpty(txtPassword.Text))
{
UserData userInfo = userApi.logInUser(txtUserName.Text, txtPassword.Text, "");
if (userInfo.Id > 0)
{
userApi.SetAuthenticationCookie(userInfo);
Response.Redirect("/Cmslogin.aspx");
}
}
}
|
|
|
|
|
|
the voice is not that clear ...try to post here...
|
|
|
|
|
|
did you figure out the code
|
|
|
|
|
String CLIENT_ID = "738844443590.apps.googleusercontent.com";
String CLIENT_SECRET = "53phjcJplNe1PLY-7rYNnmT9";
// Register the authenticator and create the service
var provider = new NativeApplicationClient(GoogleAuthenticationServer.Description, CLIENT_ID, CLIENT_SECRET);
Console.ReadLine();
//following giving error
var auth = new
OAuth2Authenticator<NativeApplicationClient> (provider, GetAuthorization);
|
|
|
|
|
What's your question?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
See Working with Google Drive in WPF[^]
It is a paradox that paradoxes would actually exist in reality.
That means of course that they don't exist.
However, they do!
∫(Edo )dx = Tzumer
∑k( this.Kid) k = this. ♥
|
|
|
|
|
I hope that's not your real client ID and secret key?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I saw bug solution of IE10, but IE11 got the similar issue again! all my Framework 4.0 applications are having "'__doPostBack' is undefined" issue. Because my web server is windows 2003, it is not possible to install Framework 4.5 to solve the problem. Do you have any suggestions? Moreover, I cannot find any hotfix from Microsoft to solve this issue
|
|
|
|
|
What code is causing this? I don't have the issue with the site I am working on so what is causing it?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Looks like this was fixed in the June 2013 .NET Framework update[^].
Links to patches for the other framework versions are available in this SO answer[^].
As a workaround, you could try setting Page.ClientTarget = "uplevel" in the Page_Init event.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi,
I have an asp.net web forms project. No master pages, no ajax, I have a file upload control and when I fire postback the HasFiles property is always empty. I started a new asp.net project. Copy/Pasted the code into it and it worked. HasFiles was retained. Does anyone know why? The code:
<table>
<tr>
<td>
<asp:FileUpload runat="server" ID="flImage" Width="400px" EnableViewState="True"/>
</td>
</tr>
protected void Page_Init(object sender, EventArgs e)
{
if(IsPostBack) return;
}
protected void Page_Load(object sender, EventArgs e)
{
if(flImage.HasFile){
Application["FileBytes"] = flImage.FileBytes;
Application["FileContent"] = flImage.FileContent;
Application["FileName"] = flImage.FileName;
Application["PostedFile"] = flImage.PostedFile;
}
HasFile is always false.
modified 14-Aug-13 10:35am.
|
|
|
|
|
Whoops! Looks like you've broken the forum.
Please edit your post and either remove or HTML-encode the <table> and other HTML tags in your question. The quickest option is to select the entire block of code and click the "code" button in the editor toolbar.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
You may want to edit your post, it has caused some weird behaviour in its formatting. Try putting your code between <pre> tags to see if that fixes it.
Use the best guess
|
|
|
|
|
Move your code from Page_Load to the Click event handler of the submit button, remove the EnableViewState property, and try again. Not sure if that's the reason, at least, it works in my projects.
|
|
|
|
|
hello pls try this circumstances
1 >> check that if you have updatepanel then you have applied trigger on that one
2 >> check that your page load have !isnotpostback and if yes then in that file upload is not getting null
this should be issues may be
regards...
|
|
|
|
|
Hi,
I have a datatable need to seperate or copy only duplicate record from that datatable to new datatable.
Ex
Input Table
Name ID
Ram 1
Raj 1
Vion 2
Result Table
Name ID
Ram 1
Raj 1
Please help to resolve this situation. Thanks in Advance!!!
|
|
|
|
|
Something like this should work:
static DataTable GetDuplicateRows(DataTable source, DataColumn id)
{
var rows = source.Rows.Cast<DataRow>()
.GroupBy(row => row[id])
.Where(rowGroup => rowGroup.Count() > 1)
.SelectMany(rowGroup => rowGroup)
.Select(row => row.ItemArray)
.ToList();
var result = source.Clone();
result.BeginLoadData();
rows.ForEach(values => result.Rows.Add(values));
result.EndLoadData();
return result;
}
DataTable source = ...;
DataTable duplicateRows = GetDuplicateRows(source, source.Columns["ID"]);
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|