Click here to Skip to main content
15,886,806 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to pass a variable inside Try{} to outside of it? Pin
OriginalGriff30-Jul-21 23:27
mveOriginalGriff30-Jul-21 23:27 
AnswerRe: How to pass a variable inside Try{} to outside of it? Pin
Victor Nijegorodov30-Jul-21 23:28
Victor Nijegorodov30-Jul-21 23:28 
QuestionitextSharp with C# Pin
Ismael Oliveira 202129-Jul-21 6:08
Ismael Oliveira 202129-Jul-21 6:08 
AnswerRe: itextSharp with C# Pin
Dave Kreskowiak29-Jul-21 6:33
mveDave Kreskowiak29-Jul-21 6:33 
GeneralRe: itextSharp with C# Pin
Ismael Oliveira 202131-Jul-21 14:50
Ismael Oliveira 202131-Jul-21 14:50 
GeneralRe: itextSharp with C# Pin
Dave Kreskowiak31-Jul-21 15:05
mveDave Kreskowiak31-Jul-21 15:05 
QuestionHow to create filtering for DataTable based on toggle switches? Pin
Alex Dunlop27-Jul-21 21:46
Alex Dunlop27-Jul-21 21:46 
AnswerRe: How to create filtering for DataTable based on toggle switches? Pin
OriginalGriff27-Jul-21 21:53
mveOriginalGriff27-Jul-21 21:53 
I don't think string interpolation will work there: interpolated strings are a syntactic sugar for the older method using numbered parameters and are evaluated when the interpolated string is constructed, not when it is used:
C#
using System;

public class Program
	{
	static string name = "???";
	static string xxx = $"Hello {name}!";
	static string yyy = "Hello {0}!";
	public static void Main()
	{
		name = "Paul";
		Console.WriteLine($"Hello {name}!");
		Console.WriteLine(xxx);
		Console.WriteLine(yyy, name);
	}
}
Will give you:
Hello Paul!
Hello ???!
Hello Paul!
So setting a RowFilter to the value of a variable doesn't mean that it will change the View at all whcn checks change: it will only use the values at the moment when the string is created.

What you need to do is change the filter each time the user changes the check boxes.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!

GeneralRe: How to create filtering for DataTable based on toggle switches? Pin
Alex Dunlop27-Jul-21 22:03
Alex Dunlop27-Jul-21 22:03 
GeneralRe: How to create filtering for DataTable based on toggle switches? Pin
OriginalGriff27-Jul-21 22:13
mveOriginalGriff27-Jul-21 22:13 
GeneralRe: How to create filtering for DataTable based on toggle switches? Pin
Alex Dunlop27-Jul-21 23:35
Alex Dunlop27-Jul-21 23:35 
GeneralRe: How to create filtering for DataTable based on toggle switches? Pin
OriginalGriff28-Jul-21 0:47
mveOriginalGriff28-Jul-21 0:47 
GeneralRe: How to create filtering for DataTable based on toggle switches? Pin
Alex Dunlop28-Jul-21 20:11
Alex Dunlop28-Jul-21 20:11 
GeneralRe: How to create filtering for DataTable based on toggle switches? Pin
OriginalGriff28-Jul-21 22:00
mveOriginalGriff28-Jul-21 22:00 
AnswerRe: How to create filtering for DataTable based on toggle switches? Pin
jsc4227-Jul-21 23:35
professionaljsc4227-Jul-21 23:35 
QuestionHow to copy DataTable contents into SQLite table? Pin
Alex Dunlop26-Jul-21 20:37
Alex Dunlop26-Jul-21 20:37 
AnswerRe: How to copy DataTable contents into SQLite table? Pin
OriginalGriff26-Jul-21 21:06
mveOriginalGriff26-Jul-21 21:06 
GeneralRe: How to copy DataTable contents into SQLite table? Pin
Alex Dunlop26-Jul-21 21:16
Alex Dunlop26-Jul-21 21:16 
GeneralRe: How to copy DataTable contents into SQLite table? Pin
Alex Dunlop26-Jul-21 22:58
Alex Dunlop26-Jul-21 22:58 
GeneralRe: How to copy DataTable contents into SQLite table? Pin
OriginalGriff26-Jul-21 23:09
mveOriginalGriff26-Jul-21 23:09 
GeneralRe: How to copy DataTable contents into SQLite table? Pin
Alex Dunlop27-Jul-21 0:39
Alex Dunlop27-Jul-21 0:39 
AnswerRe: How to copy DataTable contents into SQLite table? Pin
Richard Andrew x6428-Jul-21 2:36
professionalRichard Andrew x6428-Jul-21 2:36 
QuestionRTD communication error (COM) / .ConnectData(Int32 topicId, Object[]& parameters, Boolean& newValue) Pin
Juliano Zucatti26-Jul-21 10:14
Juliano Zucatti26-Jul-21 10:14 
QuestionHow to shuffle an array VS Windows Form Application? Pin
Sofi081326-Jul-21 0:26
Sofi081326-Jul-21 0:26 
AnswerRe: How to shuffle an array VS Windows Form Application? Pin
OriginalGriff26-Jul-21 0:40
mveOriginalGriff26-Jul-21 0:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.